/*
 * Email Search Page Styles
 * Dedicated styling for the standalone email search module.
 */

.email-search-page {
    color: #0f172a;
    font-size: 15px;
    line-height: 1.55;
}

.email-hero-shell {
    position: relative;
}

.email-search-panel {
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

.email-search-panel input::placeholder {
    color: #64748b;
}

.email-search-page .email-results-shell {
    border-radius: 2rem;
    border: 1px solid transparent;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(248, 250, 252, 0.97)) padding-box,
        linear-gradient(120deg, rgba(34, 211, 238, 0.95), rgba(99, 102, 241, 0.9), rgba(245, 158, 11, 0.8), rgba(34, 197, 94, 0.85), rgba(34, 211, 238, 0.95)) border-box;
    background-size: auto, 300% 300%;
    animation: emailResultsBorderFlow 8s linear infinite;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    padding: 1rem;
}

.email-search-page .email-summary-grid {
    overflow: hidden;
}

.email-search-page .email-summary-cell {
    min-height: 5.5rem;
}

.email-search-page .provider-card,
.email-search-page .result-card {
    border-radius: 1.25rem;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.email-search-page .provider-card {
    min-height: 9.5rem;
}

.email-search-page .provider-card[data-state="loading"] {
    border-color: rgba(6, 182, 212, 0.45);
    background: linear-gradient(180deg, rgba(236, 254, 255, 0.9), rgba(255, 255, 255, 0.98));
}

.email-search-page .provider-card[data-state="success"] {
    border-color: rgba(34, 197, 94, 0.35);
}

.email-search-page .provider-card[data-state="error"] {
    border-color: rgba(239, 68, 68, 0.35);
}

.email-search-page .provider-title {
    letter-spacing: -0.02em;
}

.email-search-page .provider-card .provider-title {
    font-size: 0.98rem;
}

.email-search-page .provider-card .provider-status-pill {
    white-space: nowrap;
}

.email-search-page .provider-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 9999px;
    padding: 0.3rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.email-search-page .provider-status-pill.is-loading {
    background: rgba(8, 145, 178, 0.12);
    color: rgb(8, 145, 178);
}

.email-search-page .provider-status-pill.is-success {
    background: rgba(34, 197, 94, 0.14);
    color: rgb(21, 128, 61);
}

.email-search-page .provider-status-pill.is-error {
    background: rgba(239, 68, 68, 0.12);
    color: rgb(185, 28, 28);
}

.email-search-page .result-card {
    animation: emailFadeUp 200ms ease-out;
}

.email-search-page .result-card--google,
.email-search-page .result-card--dark {
    background: linear-gradient(180deg, #1b1c20 0%, #15161a 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
    color: #f8fafc;
}

.email-search-page .result-card--google .text-slate-900,
.email-search-page .result-card--dark .text-slate-900,
.email-search-page .result-card--google .text-slate-600,
.email-search-page .result-card--dark .text-slate-600,
.email-search-page .result-card--google .text-slate-500,
.email-search-page .result-card--dark .text-slate-500 {
    color: #cbd5e1;
}

.email-search-page .result-card--google .text-white,
.email-search-page .result-card--dark .text-white {
    color: #f8fafc;
}

.email-search-page .result-card--google .result-badge,
.email-search-page .result-card--dark .result-badge {
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.email-search-page .result-card--google .result-badge i,
.email-search-page .result-card--dark .result-badge i {
    color: inherit;
}

.email-search-page .google-view-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(103, 232, 249, 0.18);
    background: rgba(103, 232, 249, 0.08);
    color: #a5f3fc;
    padding: 0.7rem 1rem;
    font-size: 0.93rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.email-search-page .google-view-link:hover {
    transform: translateY(-1px);
    border-color: rgba(103, 232, 249, 0.35);
    background: rgba(103, 232, 249, 0.12);
    color: #cffafe;
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.12);
}

.email-search-page .result-card--google .google-profile-panel {
    border-radius: 2rem;
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.email-search-page .result-card--google .google-profile-panel .text-slate-300 {
    color: #cbd5e1;
}

.email-search-page .result-card--google .google-profile-panel .text-white {
    color: #f8fafc;
}

.email-search-page .result-card--google .google-profile-name {
    font-size: clamp(1.02rem, 1.25vw, 1.2rem);
    letter-spacing: -0.02em;
}

.email-search-page .result-card--google .google-profile-meta {
    font-size: 0.8rem;
}

.email-search-page .result-card--google .google-profile-panel img {
    filter: saturate(1.05);
}

.email-search-page .result-card + .result-card {
    margin-top: 0.75rem;
}

.email-search-page .result-item {
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.email-search-page .result-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

@keyframes emailResultsBorderFlow {
    0% {
        background-position: 0% 0%, 0% 50%;
    }

    50% {
        background-position: 0% 0%, 100% 50%;
    }

    100% {
        background-position: 0% 0%, 0% 50%;
    }
}

@media (max-width: 640px) {
    .email-search-page .email-results-shell {
        padding: 0.875rem;
    }

    .email-search-page #emailSearchButton .email-search-button-label {
        display: none !important;
    }

    .email-search-page #emailSearchButton {
        width: 3rem;
        min-width: 3rem;
        padding-left: 0;
        padding-right: 0;
    }

    .email-search-page .email-results-shell > .flex {
        flex-wrap: nowrap;
    }

    .email-search-page .email-results-shell #emailResultsRestartButton,
    .email-search-page .email-results-shell #emailResultsClearButton {
        flex: 0 0 auto;
    }

    .email-search-page .email-summary-grid {
        border-radius: 1.25rem;
    }

    .email-search-page .email-summary-cell {
        min-height: 3.75rem;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .email-search-page .email-summary-cell .text-xs {
        font-size: 0.56rem;
        letter-spacing: 0.16em;
    }

    .email-search-page .email-summary-cell .text-lg {
        font-size: 0.94rem;
    }

    .email-search-page .email-summary-cell .text-base {
        font-size: 0.9rem;
    }

    .email-search-page .result-card {
        border-radius: 1.1rem;
    }

    .email-search-page .result-card + .result-card {
        margin-top: 0.6rem;
    }

    .email-search-page .result-item {
        padding: 0.65rem;
        gap: 0.65rem;
        border-radius: 1rem;
    }

    .email-search-page .result-item h4 {
        font-size: 0.82rem;
    }

    .email-search-page .google-profile-panel {
        align-items: flex-start;
    }

    .email-search-page .google-profile-panel > div:last-child {
        padding-top: 0.05rem;
    }

    .email-search-page .google-profile-panel .text-lg {
        font-size: 0.95rem;
    }

    .email-search-page .google-profile-panel .text-slate-600 {
        font-size: 0.7rem;
        line-height: 1.45;
    }

    .email-search-page .google-profile-panel .result-badge {
        padding: 0.22rem 0.5rem;
        font-size: 0.66rem;
    }

    .email-search-page .result-card--google,
    .email-search-page .result-card--dark {
        border-radius: 1.25rem;
    }

    .email-search-page .google-view-link {
        padding: 0.6rem 0.85rem;
        font-size: 0.82rem;
    }
}

.email-search-page .result-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 9999px;
    padding: 0.28rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
}

.email-search-page .email-chip {
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
}

.email-search-page .email-chip:hover {
    border-color: rgba(6, 182, 212, 0.32);
    background: rgba(236, 254, 255, 0.95);
}

.email-search-page .email-search-tip {
    margin-top: 0.5rem;
    max-width: 100%;
}

.email-search-page .email-search-tip .email-history-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.92);
    color: #334155;
    border-radius: 9999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.72rem;
    line-height: 1;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.email-search-page .email-search-tip .email-history-chip:hover {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(236, 254, 255, 0.95);
    color: rgb(8, 145, 178);
}

.email-search-page .email-search-tip .email-history-chip .truncate {
    max-width: 180px;
}

.email-search-page .email-search-tip .email-history-chip i {
    font-size: 0.7rem;
}

.email-search-page .email-search-tip #emailHistoryEmpty {
    font-size: 0.8rem;
    line-height: 1.4;
}

.email-search-page .google-profile-grid {
    align-items: stretch;
}

.email-search-page .google-profile-grid > * {
    min-width: 0;
}

.email-search-page #emailProviderGrid {
    display: none;
}

.email-search-page .loading-bars {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 18px;
}

.email-search-page .loading-bars span {
    display: inline-block;
    width: 5px;
    height: 16px;
    border-radius: 9999px;
    background: linear-gradient(180deg, rgb(6, 182, 212), rgb(14, 165, 233));
    animation: emailLoadingPulse 1s ease-in-out infinite;
}

.email-search-page .loading-bars span:nth-child(2) {
    animation-delay: 120ms;
}

.email-search-page .loading-bars span:nth-child(3) {
    animation-delay: 240ms;
}

.email-search-page .empty-soft {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 1));
}

.email-search-page .result-card h3,
.email-search-page .email-summary-cell .text-3xl,
.email-search-page .email-summary-cell .text-lg {
    letter-spacing: -0.02em;
}

.email-search-page section {
    scroll-margin-top: 1rem;
}

@keyframes emailFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes emailLoadingPulse {
    0%, 100% {
        transform: scaleY(0.7);
        opacity: 0.45;
    }
    50% {
        transform: scaleY(1.25);
        opacity: 1;
    }
}

.email-search-page .email-seo-header {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
}

.email-search-page .email-seo-keyword {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    color: #475569;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.email-search-page .email-seo-keyword:hover {
    transform: translateY(-1px);
    border-color: rgba(6, 182, 212, 0.35);
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.1);
    color: #0f172a;
}

.email-search-page .email-seo-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: #ffffff;
    padding: 1.1rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.email-search-page .email-seo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.email-search-page .email-seo-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.75rem;
    background: rgba(248, 250, 252, 0.9);
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

.email-search-page .email-seo-faq-item {
    border-radius: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.email-search-page .email-seo-faq-summary {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    cursor: pointer;
    list-style: none;
    padding: 1rem 1.15rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #0f172a;
    transition: background 160ms ease;
}

.email-search-page .email-seo-faq-summary::-webkit-details-marker {
    display: none;
}

.email-search-page .email-seo-faq-summary:hover {
    background: rgba(248, 250, 252, 0.65);
}

.email-search-page .email-seo-faq-number {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.email-search-page .email-seo-faq-question {
    flex: 1 1 auto;
    line-height: 1.4;
}

.email-search-page .email-seo-faq-chevron {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: #94a3b8;
    transition: transform 200ms ease;
}

.email-search-page .email-seo-faq-item[open] .email-seo-faq-chevron {
    transform: rotate(180deg);
    color: #0ea5e9;
}

.email-search-page .email-seo-faq-answer {
    padding: 0 1.15rem 1.15rem 3.55rem;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #475569;
}

@media (max-width: 640px) {
    .email-search-page .email-seo-card {
        padding: 0.95rem;
    }

    .email-search-page .email-seo-faq-answer {
        padding-left: 1.15rem;
    }

    .email-search-page .email-seo-faq-summary {
        padding: 0.95rem 1rem;
        gap: 0.7rem;
    }

    .email-search-page .email-seo-faq-number {
        width: 1.6rem;
        height: 1.6rem;
        font-size: 0.6rem;
    }
}
