﻿/* Hide on mobile */
@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
}

/* Hide on desktop */
@media (min-width: 768px) {
    .mobile-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
}

/* Card spacing */
.lead-card {
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.lead-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .lead-details {
        grid-template-columns: 1fr 1fr;
    }
}

.infinite-scroll {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.card {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.lead-data-table {
    width: 100%;
    border-collapse: collapse;
}

    .lead-data-table th {
        text-align: left;
        background: #f3f3f3;
        padding: 6px;
        width: 30%;
    }

    .lead-data-table td {
        padding: 6px;
        border-bottom: 1px solid #ddd;
        word-break: break-word;
    }


.status-badge {
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

/* Status colors */

.status-new {
    background-color: #0a58ca;
    color: #ffffff;
}

.status-contacted {
    background-color: #ffd800;
    color: #000000;
}

.status-qualified {
    background-color: #23734e;
    color: #ffffff;
}

.status-converted {
    background-color: #f15d00;
    color: #ffffff;
}

.status-closed,
.status-completed {
    background-color: #2a9b00;
    color: #ffffff;
}

.status-default {
    background-color: #eceff1;
    color: #455a64;
}

/* ELDER-FRIENDLY CSS */
.status-checkbox {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

    .status-checkbox input {
        width: 22px;
        height: 22px;
    }

textarea {
    font-size: 1rem;
}

.timeline {
    list-style: none;
    padding-left: 0;
}

    .timeline li {
        display: flex;
        margin-bottom: 16px;
    }

.timeline-badge {
    width: 36px;
    height: 36px;
    background: #198754;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 36px;
    font-weight: bold;
    margin-right: 12px;
}

.timeline-panel {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
}

.app-topbar {
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    padding: 0 1rem;
    flex-direction: row-reverse;
}

/* Hide TopBar on mobile */
@media (max-width: 767px) {
    .app-topbar {
        display: none;
    }
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    font-weight: 500;
    white-space: nowrap;
}

.topbar-link {
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #0366d6;
    font-size: 0.9rem;
}

    .topbar-link.logout {
        color: #b00020;
    }


/*------- SEO page ---------*/
.seo-page {
    padding: 28px;
    min-height: 100vh;
}

.seo-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

    .seo-header h1 {
        margin: 8px 0 6px;
    }

    .seo-header p {
        margin: 0;
    }

.seo-back {
    text-decoration: none;
    font-weight: 800;
}

.seo-header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.seo-save-btn,
.seo-preview-btn,
.seo-small-btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
}

.seo-save-btn {
    background: #006bb7;
    color: #fff;
}

.seo-preview-btn {
    background: #111;
    color: #fff;
}

.seo-small-btn {
    background: #f3ead7;
    color: #111;
    padding: 7px 12px;
    font-size: 0.82rem;
}

.seo-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 18px;
}

.seo-card {
    background: #fff;
    border: 1px solid rgba(17,17,17,.1);
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 14px 40px rgba(17,17,17,.06);
}

    .seo-card.full-width {
        grid-column: 1 / -1;
    }

.seo-card-title h2 {
    margin: 0 0 6px;
    color: #111;
}

.seo-card-title p {
    margin: 0 0 20px;
    color: #6b6b6b;
    line-height: 1.5;
}

.seo-form-group {
    margin-bottom: 18px;
}

    .seo-form-group label,
    .seo-status-box label {
        display: block;
        font-weight: 900;
        color: #111;
        margin-bottom: 7px;
    }

.seo-label-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.seo-input {
    width: 100%;
    border: 1px solid rgba(17,17,17,.14);
    border-radius: 16px;
    padding: 12px 14px;
    outline: none;
    background: #fff;
}

    .seo-input:focus {
        border-color: #006bb7;
        box-shadow: 0 0 0 4px rgba(200,162,74,.14);
    }

.seo-textarea {
    min-height: 110px;
}

.seo-large-textarea {
    min-height: 170px;
}

.seo-help {
    display: block;
    margin-top: 6px;
    color: #6b6b6b;
    font-size: .82rem;
}

    .seo-help.good {
        color: #16833a;
    }

    .seo-help.warn {
        color: #b45f06;
    }

.seo-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.seo-toggle {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border-radius: 18px;
    background: #fffaf1;
    border: 1px solid rgba(17,17,17,.08);
}

    .seo-toggle input {
        margin-top: 4px;
    }

    .seo-toggle strong,
    .seo-toggle small {
        display: block;
    }

    .seo-toggle small {
        color: #6b6b6b;
        margin-top: 3px;
        line-height: 1.4;
    }

    .seo-toggle.danger {
        background: #fff3f3;
    }

.seo-status-box {
    margin-top: 20px;
}

.google-preview {
    border: 1px solid rgba(17,17,17,.1);
    border-radius: 20px;
    padding: 18px;
    background: #fff;
}

.google-url {
    color: #207245;
    font-size: .85rem;
    margin-bottom: 7px;
    word-break: break-all;
}

.google-title {
    color: #1a0dab;
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 7px;
}

.google-description {
    color: #4d5156;
    line-height: 1.45;
}

.social-title {
    margin-top: 28px;
}

.social-preview {
    border: 1px solid rgba(17,17,17,.1);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}

    .social-preview img {
        width: 100%;
        height: 170px;
        object-fit: cover;
        background: #111;
    }

    .social-preview div {
        padding: 16px;
    }

    .social-preview strong {
        display: block;
        color: #111;
        line-height: 1.35;
    }

    .social-preview p {
        color: #6b6b6b;
        line-height: 1.45;
        margin: 8px 0;
    }

    .social-preview small {
        color: #8d6722;
        text-transform: uppercase;
        font-weight: 900;
        letter-spacing: .08em;
    }

.seo-alert {
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 18px;
    font-weight: 800;
}

    .seo-alert.error {
        background: #fff0f0;
        color: #9f1c1c;
        border: 1px solid #f3bcbc;
    }

@media (max-width: 1100px) {
    .seo-grid {
        grid-template-columns: 1fr;
    }

    .seo-header {
        flex-direction: column;
    }
}