/* =============================================
 * Top 10 Listings — Frontend Styles
 * ============================================= */

/* ── Design Tokens ──────────────────────────── */
:root {
    --t10l-primary:    #6366f1;
    --t10l-primary-dk: #4f46e5;
    --t10l-primary-lt: #a5b4fc;
    --t10l-accent:     #f59e0b;
    --t10l-success:    #10b981;
    --t10l-danger:     #ef4444;
    --t10l-surface:    #ffffff;
    --t10l-surface-2:  #f8fafc;
    --t10l-border:     #e2e8f0;
    --t10l-text:       #1e293b;
    --t10l-text-muted: #64748b;
    --t10l-text-light: #94a3b8;
    --t10l-shadow-sm:  0 1px 2px rgba(0,0,0,.05);
    --t10l-shadow:     0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --t10l-shadow-lg:  0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
    --t10l-shadow-xl:  0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.04);
    --t10l-radius:     12px;
    --t10l-radius-lg:  20px;
    --t10l-font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --t10l-transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Google Fonts ───────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Reset scoped to plugin ─────────────────── */
.t10l-page-wrap,
.t10l-shortcode-wrap {
    font-family: var(--t10l-font);
    color: var(--t10l-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.t10l-page-wrap *,
.t10l-shortcode-wrap * {
    box-sizing: border-box;
}

/* ── Container ──────────────────────────────── */
.t10l-container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ══════════════════════════════════════════════
 * HERO SECTION
 * ══════════════════════════════════════════════ */
.t10l-hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    padding: 72px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.t10l-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: .6;
}

.t10l-hero__label {
    display: inline-block;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 99px;
    margin-bottom: 20px;
    position: relative;
}

.t10l-hero__title {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px;
    position: relative;
}

.t10l-hero__subtitle {
    color: rgba(255,255,255,.85);
    font-size: 1.05rem;
    max-width: 540px;
    margin: 0 auto;
    position: relative;
}

/* ══════════════════════════════════════════════
 * LISTINGS SECTION
 * ══════════════════════════════════════════════ */
.t10l-listings {
    padding: 56px 0 40px;
    background: var(--t10l-surface-2);
}

.t10l-listings__grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Single Card ────────────────────────────── */
.t10l-card {
    display: flex;
    align-items: stretch;
    background: var(--t10l-surface);
    border: 1px solid var(--t10l-border);
    border-radius: var(--t10l-radius);
    overflow: hidden;
    transition: box-shadow var(--t10l-transition), transform var(--t10l-transition);
    position: relative;
}

.t10l-card:hover {
    box-shadow: var(--t10l-shadow-lg);
    transform: translateY(-2px);
}

/* Rank badge */
.t10l-card__rank {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    background: linear-gradient(135deg, var(--t10l-primary) 0%, var(--t10l-primary-dk) 100%);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* #1 gets a special gold treatment */
.t10l-card:first-child .t10l-card__rank {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* #2 silver */
.t10l-card:nth-child(2) .t10l-card__rank {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

/* #3 bronze */
.t10l-card:nth-child(3) .t10l-card__rank {
    background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
}

/* Image */
.t10l-card__image {
    width: 180px;
    min-height: 140px;
    flex-shrink: 0;
    overflow: hidden;
}

.t10l-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t10l-transition);
}

.t10l-card:hover .t10l-card__image img {
    transform: scale(1.05);
}

/* Body */
.t10l-card__body {
    padding: 20px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.t10l-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: var(--t10l-text);
}

.t10l-card__desc {
    font-size: .9rem;
    color: var(--t10l-text-muted);
    margin: 0;
    line-height: 1.55;
}

/* Rating */
.t10l-card__rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: .95rem;
}

.t10l-star--full  { color: var(--t10l-accent); }
.t10l-star--half  { color: var(--t10l-accent); opacity: .6; }
.t10l-star--empty { color: var(--t10l-border); }

.t10l-card__rating-value {
    margin-left: 6px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--t10l-text-muted);
    background: var(--t10l-surface-2);
    padding: 2px 8px;
    border-radius: 6px;
}

/* Full description toggle */
.t10l-card__full-desc {
    font-size: .88rem;
    color: var(--t10l-text-muted);
    line-height: 1.6;
    overflow: hidden;
    transition: max-height .4s ease;
}

.t10l-card__full-desc--hidden {
    max-height: 0;
}

.t10l-card__full-desc--visible {
    max-height: 2000px;
}

.t10l-card__toggle {
    background: none;
    border: none;
    color: var(--t10l-primary);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    align-self: flex-start;
    transition: color var(--t10l-transition);
}

.t10l-card__toggle:hover {
    color: var(--t10l-primary-dk);
}

/* CTA Button */
.t10l-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding: 8px 20px;
    background: var(--t10l-primary);
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background var(--t10l-transition), transform var(--t10l-transition);
    align-self: flex-start;
}

.t10l-card__btn:hover {
    background: var(--t10l-primary-dk);
    transform: translateY(-1px);
    color: #fff;
}

/* ══════════════════════════════════════════════
 * PAGINATION
 * ══════════════════════════════════════════════ */
.t10l-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.t10l-pagination__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--t10l-text-muted);
    background: var(--t10l-surface);
    border: 1px solid var(--t10l-border);
    transition: all var(--t10l-transition);
}

.t10l-pagination__link:hover {
    border-color: var(--t10l-primary-lt);
    color: var(--t10l-primary);
}

.t10l-pagination__link--active {
    background: var(--t10l-primary);
    border-color: var(--t10l-primary);
    color: #fff;
}

.t10l-pagination__link--active:hover {
    background: var(--t10l-primary-dk);
    color: #fff;
}

/* ══════════════════════════════════════════════
 * CONTACT FORM SECTION
 * ══════════════════════════════════════════════ */
.t10l-contact {
    padding: 60px 0;
    background: var(--t10l-surface);
}

.t10l-contact__title {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.t10l-contact__subtitle {
    text-align: center;
    color: var(--t10l-text-muted);
    margin: 0 0 32px;
    font-size: .95rem;
}

.t10l-form {
    max-width: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.t10l-form__group--full {
    grid-column: 1 / -1;
}

.t10l-form label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--t10l-text);
    margin-bottom: 6px;
    letter-spacing: .02em;
}

.t10l-form input[type="text"],
.t10l-form input[type="email"],
.t10l-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--t10l-border);
    border-radius: 10px;
    font-size: .9rem;
    font-family: var(--t10l-font);
    background: var(--t10l-surface-2);
    transition: border-color var(--t10l-transition), box-shadow var(--t10l-transition);
    color: var(--t10l-text);
}

.t10l-form input:focus,
.t10l-form textarea:focus {
    outline: none;
    border-color: var(--t10l-primary-lt);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.t10l-form textarea {
    resize: vertical;
    min-height: 100px;
}

.t10l-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--t10l-primary) 0%, var(--t10l-primary-dk) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 600;
    font-family: var(--t10l-font);
    cursor: pointer;
    transition: transform var(--t10l-transition), box-shadow var(--t10l-transition);
}

.t10l-form__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,.35);
}

.t10l-form__submit:active {
    transform: translateY(0);
}

.t10l-form__feedback {
    grid-column: 1 / -1;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 500;
    display: none;
}

.t10l-form__feedback--success {
    display: block;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.t10l-form__feedback--error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ══════════════════════════════════════════════
 * SEO CONTENT SECTION
 * ══════════════════════════════════════════════ */
.t10l-content {
    padding: 56px 0 64px;
    background: var(--t10l-surface-2);
}

.t10l-content__body {
    max-width: 740px;
    margin: 0 auto;
}

.t10l-content__body h2,
.t10l-content__body h3,
.t10l-content__body h4 {
    color: var(--t10l-text);
    margin-top: 1.8em;
    margin-bottom: .6em;
}

.t10l-content__body h2 { font-size: 1.4rem; }
.t10l-content__body h3 { font-size: 1.15rem; }

.t10l-content__body p {
    color: var(--t10l-text-muted);
    font-size: .95rem;
    line-height: 1.7;
    margin-bottom: 1em;
}

.t10l-content__body ul,
.t10l-content__body ol {
    color: var(--t10l-text-muted);
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.t10l-content__body a {
    color: var(--t10l-primary);
    text-decoration: underline;
}

/* ══════════════════════════════════════════════
 * NO RESULTS
 * ══════════════════════════════════════════════ */
.t10l-no-results {
    text-align: center;
    padding: 48px 0;
    color: var(--t10l-text-muted);
    font-size: 1.05rem;
}

/* ══════════════════════════════════════════════
 * ERROR
 * ══════════════════════════════════════════════ */
.t10l-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid #fecaca;
}

/* ══════════════════════════════════════════════
 * RESPONSIVE
 * ══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .t10l-hero {
        padding: 48px 0 40px;
    }

    .t10l-card {
        flex-direction: column;
    }

    .t10l-card__rank {
        min-width: unset;
        padding: 10px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 8px;
        font-size: 1rem;
    }

    .t10l-card__image {
        width: 100%;
        height: 180px;
    }

    .t10l-card__body {
        padding: 16px;
    }

    .t10l-form {
        grid-template-columns: 1fr;
    }

    .t10l-form__group--full {
        grid-column: 1;
    }

    .t10l-listings {
        padding: 32px 0 24px;
    }

    .t10l-contact {
        padding: 40px 0;
    }
}

@media (max-width: 480px) {
    .t10l-container {
        padding: 0 16px;
    }

    .t10l-hero__title {
        font-size: 1.5rem;
    }

    .t10l-card__body {
        padding: 14px;
    }

    .t10l-card__title {
        font-size: 1rem;
    }
}

/* ══════════════════════════════════════════════
 * ANIMATIONS
 * ══════════════════════════════════════════════ */
@keyframes t10l-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.t10l-card {
    animation: t10l-fadeInUp .5s ease both;
}

.t10l-card:nth-child(1)  { animation-delay: .05s; }
.t10l-card:nth-child(2)  { animation-delay: .1s; }
.t10l-card:nth-child(3)  { animation-delay: .15s; }
.t10l-card:nth-child(4)  { animation-delay: .2s; }
.t10l-card:nth-child(5)  { animation-delay: .25s; }
.t10l-card:nth-child(6)  { animation-delay: .3s; }
.t10l-card:nth-child(7)  { animation-delay: .35s; }
.t10l-card:nth-child(8)  { animation-delay: .4s; }
.t10l-card:nth-child(9)  { animation-delay: .45s; }
.t10l-card:nth-child(10) { animation-delay: .5s; }
