/* ==========================================================================
   Girlfriend Discover Page Styles
   [aigf_girlfriend_discover] shortcode
   ========================================================================== */

/* ---- Utility ---- */
.aigf-discover--hidden {
    display: none !important;
}

/* ---- Page root ---- */
.aigf-discover {
    min-height: 60vh;
    padding-bottom: 4rem;
}

/* ---- Hero ---- */
.aigf-discover__hero {
    background: linear-gradient(150deg, #1a0530 0%, #2d0a4e 35%, #1a1a2e 100%);
    padding: 3.5rem 1.5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle radial glow behind the search card */
.aigf-discover__hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 50% 80%, rgba(156, 39, 176, 0.28) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 80% 20%, rgba(233, 30, 99, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.aigf-discover__hero-inner {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ---- Hero badge pill ---- */
.aigf-discover__hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    margin-bottom: 1.25rem;
    padding: 0.3rem 0.9rem;
    text-transform: uppercase;
}

.aigf-discover__hero-title {
    color: #fff;
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 800;
    margin: 0 0 0.75rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.aigf-discover__hero-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1rem;
    margin: 0;
    line-height: 1.65;
}

/* ---- Hero search card ---- */
.aigf-discover__search-hero {
    margin: 2rem auto 0;
    max-width: 580px;
    width: 100%;
}

.aigf-discover__search-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1rem;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: flex;
    gap: 0.5rem;
    padding: 0.45rem 0.45rem 0.45rem 1.2rem;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.aigf-discover__search-card:focus-within {
    border-color: rgba(156, 39, 176, 0.65);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 0 3px rgba(156, 39, 176, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.aigf-discover__search-card-icon {
    color: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
    height: 20px;
    transition: color 0.2s;
    width: 20px;
}

.aigf-discover__search-card:focus-within .aigf-discover__search-card-icon {
    color: #ce93d8;
}

.aigf-discover__search-card-input {
    background: none;
    border: none;
    color: #fff;
    flex: 1;
    font-size: 1rem;
    min-width: 0;
    outline: none;
    padding: 0.55rem 0;
}

.aigf-discover__search-card-input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.aigf-discover__search-card-input::-webkit-search-cancel-button {
    display: none;
}

.aigf-discover__search-card-btn {
    background: linear-gradient(135deg, #9c27b0 0%, #e91e63 100%);
    border: none;
    border-radius: 0.65rem;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.65rem 1.5rem;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(156, 39, 176, 0.4);
}

.aigf-discover__search-card-btn:hover {
    box-shadow: 0 4px 20px rgba(156, 39, 176, 0.55);
    opacity: 0.92;
    transform: scale(1.03);
}

.aigf-discover__search-card-btn:active {
    transform: scale(0.97);
}

.aigf-discover__search-hint {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.75rem;
    margin: 0.6rem 0 0;
    text-align: center;
}

/* ---- Filter chips bar ---- */
.aigf-discover__filters {
    background: rgba(20, 10, 35, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.aigf-discover__filters-inner {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.aigf-discover__filter-label {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---- Filter chips ---- */
.aigf-discover__filter-chips {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.aigf-discover__chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    font-size: 0.78rem;
    line-height: 1.4;
    padding: 0.3rem 0.85rem;
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s, box-shadow 0.18s;
    white-space: nowrap;
}

.aigf-discover__chip:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
    transform: translateY(-1px);
}

.aigf-discover__chip--active {
    background: linear-gradient(135deg, #9c27b0 0%, #e91e63 100%);
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(156, 39, 176, 0.4);
    color: #fff;
    font-weight: 600;
}

/* ---- Plan-limit notice ---- */
.aigf-discover__limit-notice {
    background: rgba(255, 90, 90, 0.12);
    border: 1px solid rgba(255, 90, 90, 0.35);
    border-radius: 0.5rem;
    color: #ffaaaa;
    font-size: 0.9rem;
    margin: 1.25rem auto;
    max-width: 1200px;
    padding: 0.85rem 1.25rem;
}

.aigf-discover__limit-notice a {
    color: #ff8080;
    font-weight: 600;
    text-decoration: underline;
}

/* ---- Grid wrapper ---- */
.aigf-discover__grid-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ---- Loading spinner ---- */
.aigf-discover__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 3rem 0;
    color: rgba(255, 255, 255, 0.5);
}

.aigf-discover__spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary, #9c27b0);
    border-radius: 50%;
    animation: aigf-spin 0.75s linear infinite;
}

@keyframes aigf-spin {
    to { transform: rotate(360deg); }
}

/* ---- Card grid ---- */
.aigf-discover__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* ==========================================================================
   CARD — immersive photo-first design
   ========================================================================== */
.aigf-gf-card {
    border-radius: 1.25rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
    /* Neon border via box-shadow so it animates smoothly */
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.07),
        0 4px 24px rgba(0, 0, 0, 0.55);
}

.aigf-gf-card::before {
    content: '';
    inset: 0;
    position: absolute;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(156, 39, 176, 0) 0%,
        rgba(233, 30, 99, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
    pointer-events: none;
}

.aigf-gf-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow:
        0 0 0 1.5px rgba(195, 70, 255, 0.6),
        0 0 30px rgba(156, 39, 176, 0.35),
        0 16px 40px rgba(0, 0, 0, 0.6);
}

.aigf-gf-card:hover::before {
    opacity: 1;
}

/* ── Photo area (full-bleed, portrait ratio) ─────────────────────────── */
.aigf-gf-card__photo {
    aspect-ratio: 3 / 4;
    background: linear-gradient(160deg, #2a0845 0%, #0d0d2b 100%);
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    width: 100%;          /* guarantee full-width in flex column */
    /* Fallback for browsers without aspect-ratio support (iOS ≤ 14) */
    min-height: 0;
}

/* aspect-ratio padding-top fallback for older Safari */
@supports not (aspect-ratio: 3 / 4) {
    .aigf-gf-card__photo::before {
        content: '';
        display: block;
        padding-top: 133.33%; /* 4/3 × 100% */
    }
}

.aigf-gf-card__avatar-img {
    display: block;
    height: 100%;
    left: 0;
    max-width: 100%;
    object-fit: cover;
    object-position: top center;
    position: absolute;
    top: 0;
    transition: transform 0.6s ease;
    width: 100%;
}

.aigf-gf-card:hover .aigf-gf-card__avatar-img {
    transform: scale(1.06);
}

/* Letter placeholder when no photo */
.aigf-gf-card__avatar-initial {
    align-items: center;
    color: rgba(255, 255, 255, 0.12);
    display: flex;
    font-size: 6rem;
    font-weight: 700;
    height: 100%;
    justify-content: center;
    letter-spacing: -0.03em;
    user-select: none;
    width: 100%;
}

/* Status dot — top-left */
.aigf-gf-card__status {
    background: #4caf50;
    border: 2px solid #0d0d2b;
    border-radius: 50%;
    height: 10px;
    left: 0.8rem;
    position: absolute;
    top: 0.8rem;
    width: 10px;
    z-index: 3;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.8);
}

/* Age badge — top-right */
.aigf-gf-card__age-badge {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9999px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    z-index: 3;
}

/* Bottom gradient overlay */
.aigf-gf-card__overlay {
    background: linear-gradient(
        to top,
        rgba(5, 0, 20, 0.98) 0%,
        rgba(10, 0, 35, 0.88) 35%,
        rgba(20, 0, 50, 0.45) 65%,
        transparent 100%
    );
    bottom: 0;
    left: 0;
    padding: 3.5rem 1rem 1rem;
    position: absolute;
    right: 0;
    z-index: 2;
}

.aigf-gf-card__name-row {
    align-items: baseline;
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.aigf-gf-card__name {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.aigf-gf-card__tagline {
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
    font-style: italic;
    line-height: 1.4;
    margin: 0 0 0.55rem;
    min-height: 1.1em;
}

.aigf-gf-card__traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.aigf-gf-card__trait {
    background: rgba(195, 70, 255, 0.2);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(195, 70, 255, 0.38);
    border-radius: 9999px;
    color: #e0b0ff;
    font-size: 0.68rem;
    font-weight: 500;
    padding: 0.15rem 0.55rem;
}

/* ── Action row ──────────────────────────────────────────────────────── */
.aigf-gf-card__actions {
    align-items: center;
    background: rgba(8, 0, 25, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
}

/* Icon action buttons (chat + image) */
.aigf-gf-card__action-btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 0.6rem;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    display: flex;
    flex-shrink: 0;
    height: 2.4rem;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
    width: 2.4rem;
}

.aigf-gf-card__action-btn svg {
    height: 18px;
    width: 18px;
    flex-shrink: 0;
}

.aigf-gf-card__action-btn--chat:hover {
    background: rgba(0, 188, 212, 0.18);
    border-color: rgba(0, 188, 212, 0.5);
    color: #00bcd4;
    transform: scale(1.12);
}

.aigf-gf-card__action-btn--img:hover {
    background: rgba(233, 30, 99, 0.18);
    border-color: rgba(233, 30, 99, 0.5);
    color: #f06292;
    transform: scale(1.12);
}

/* Primary CTA */
.aigf-gf-card__select-btn {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    border: none;
    border-radius: 0.6rem;
    color: #fff;
    cursor: pointer;
    flex: 1;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0 0.75rem;
    height: 2.4rem;
    text-align: center;
    transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 12px rgba(156, 39, 176, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aigf-gf-card__select-btn:hover {
    filter: brightness(1.15);
    box-shadow: 0 4px 20px rgba(156, 39, 176, 0.55);
    transform: scale(1.03);
}

.aigf-gf-card__select-btn:active {
    transform: scale(0.97);
    filter: brightness(0.95);
}

/* Upgrade / disabled CTA */
.aigf-gf-card__select-btn--upgrade {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
    color: rgba(255, 255, 255, 0.45);
    cursor: default;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
}

.aigf-gf-card__select-btn--upgrade:hover {
    filter: none;
    box-shadow: none;
    transform: none;
}

/* ---- Empty state ---- */
.aigf-discover__empty {
    padding: 3rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
}

/* ---- Pagination ---- */
.aigf-discover__pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.aigf-discover__load-more {
    min-width: 160px;
}

/* ---- Checkout page banner (injected by stripe-checkout.js) ---- */
.aigf-discover-checkout-banner {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.2) 0%, rgba(233, 30, 99, 0.15) 100%);
    border: 1px solid rgba(156, 39, 176, 0.4);
    border-radius: 0.6rem;
    color: #ce93d8;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    padding: 0.85rem 1.1rem;
    text-align: center;
}

.aigf-discover-checkout-banner strong {
    color: #fff;
}

.aigf-discover-checkout-banner__icon {
    margin-right: 0.3rem;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .aigf-discover__hero {
        padding: 2.5rem 1rem 3rem;
    }

    .aigf-gf-card__traits {
        display: none;
    }

    .aigf-discover__hero-title {
        font-size: clamp(1.6rem, 6vw, 2rem);
    }

    .aigf-discover__search-card {
        padding: 0.35rem 0.35rem 0.35rem 1rem;
    }

    .aigf-discover__search-card-btn {
        font-size: 0.82rem;
        padding: 0.6rem 1rem;
    }

    .aigf-discover__grid {
        grid-template-columns: repeat(2, 1fr);  /* force 2-column grid on mobile */
        gap: 0.75rem;
    }

    /* photo inherits aspect-ratio from base rule; width:100% already set */
    .aigf-gf-card__photo {
        width: 100%;
    }

    .aigf-gf-card__name {
        font-size: 1rem;
    }

    .aigf-gf-card__action-btn {
        height: 2.1rem;
        width: 2.1rem;
    }

    .aigf-gf-card__select-btn {
        font-size: 0.78rem;
        height: 2.1rem;
    }

    .aigf-discover__chip {
        font-size: 0.72rem;
        padding: 0.28rem 0.7rem;
    }
}
