/**
 * Explorer subscription account + upgrade modal styles
 */

.ye-subscription-page__main {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.ye-sub-card {
    padding: 20px 22px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(8, 27, 51, 0.08);
    box-shadow: 0 8px 24px rgba(8, 27, 51, 0.04);
}

.ye-sub-card__title {
    margin: 0 0 14px;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #081b33;
}

.ye-sub-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ye-sub-current__name {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #0056a7;
}

.ye-sub-current__meta {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.ye-sub-current__warn {
    margin: 8px 0 0;
    color: #b45309;
    font-size: 13px;
}

.ye-sub-empty {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.ye-sub-plans {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.ye-sub-plan {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(8, 27, 51, 0.08);
    background: #f8fafc;
}

.ye-sub-plan.is-current {
    border-color: rgba(8, 27, 51, 0.16);
    background: #f8fafc;
}

.ye-sub-plan.is-disabled {
    opacity: 0.55;
    background: #f1f5f9;
    border-color: #cbd5e1;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.ye-sub-plan.is-disabled .ye-sub-btn {
    background: #94a3b8;
    border-color: #94a3b8;
    color: #ffffff;
    cursor: not-allowed;
    pointer-events: none;
}

.ye-sub-plan__name {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #081b33;
}

.ye-sub-plan__desc {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
    min-height: 2.9em;
}

.ye-sub-plan__price {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    color: #081b33;
}

.ye-sub-plan__price span {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

.ye-sub-plan__prices {
    display: grid;
    gap: 8px;
}

.ye-sub-plan__badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #0056a7;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.ye-sub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #081b33;
    background: #081b33;
    color: #fff;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.ye-sub-btn:hover {
    background: #0056a7;
    border-color: #0056a7;
}

.ye-sub-btn--outline {
    background: #fff;
    color: #081b33;
}

.ye-sub-btn--outline:hover {
    background: #edf0f3;
    color: #081b33;
}

.ye-btn-cancel-sub {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    font-family: "Barlow", "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626 !important;
    background-color: #ffffff !important;
    border: 1px solid #fca5a5 !important;
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
    line-height: 1.4;
}

.ye-btn-cancel-sub:hover {
    background-color: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}

.ye-btn-cancel-sub:focus-visible {
    outline: 2px solid #f87171;
    outline-offset: 2px;
}

.ye-sub-btn--ghost {
    width: auto;
    background: transparent;
    color: #b45309;
    border-color: rgba(180, 83, 9, 0.35);
}

.ye-sub-table-wrap {
    overflow-x: auto;
}

.ye-sub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ye-sub-table th,
.ye-sub-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(8, 27, 51, 0.08);
}

.ye-sub-table th {
    color: #64748b;
    font-weight: 600;
}

.ye-sub-table a {
    color: #0056a7;
    font-weight: 600;
}

/* Upgrade modal */
.ye-explorer-upgrade {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4.5rem 14px 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.ye-explorer-upgrade.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.ye-explorer-upgrade[hidden] {
    display: none !important;
}

.ye-explorer-upgrade__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.ye-explorer-upgrade__panel {
    position: relative;
    z-index: 1;
    width: min(860px, 100%);
    max-height: min(88vh, 820px);
    overflow: auto;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(8, 27, 51, 0.08);
    box-shadow: 0 24px 64px rgba(8, 27, 51, 0.22);
    transform: translateY(-0.6rem) scale(0.98);
    transition: transform 0.25s ease;
}

.ye-explorer-upgrade.is-visible .ye-explorer-upgrade__panel {
    transform: none;
}

.ye-explorer-upgrade__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #64748b;
    cursor: pointer;
}

.ye-explorer-upgrade__close svg {
    width: 18px;
    height: 18px;
    display: block;
    margin: auto;
}

.ye-explorer-upgrade__hero {
    padding: 24px 24px 12px;
    background:
        radial-gradient(ellipse 90% 80% at 0% 0%, rgba(0, 86, 167, 0.12), transparent 55%),
        linear-gradient(180deg, #edf0f3 0%, #ffffff 100%);
    border-bottom: 1px solid rgba(8, 27, 51, 0.06);
}

.ye-explorer-upgrade__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0056a7;
}

.ye-explorer-upgrade__title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    color: #081b33;
}

.ye-explorer-upgrade__lead {
    margin: 0;
    max-width: 42em;
    font-size: 14.5px;
    line-height: 1.5;
    color: #475569;
}

.ye-explorer-upgrade__plans {
    display: grid;
    gap: 12px;
    padding: 20px 24px 24px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.ye-explorer-upgrade__plan .ye-sub-btn {
    min-height: 40px;
    font-size: 13px;
    padding: 0 10px;
}

.ye-explorer-upgrade__loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    margin: 0;
    color: #64748b;
    gap: 12px;
    text-align: center;
    font-size: 14px;
}

.ye-explorer-upgrade__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 86, 167, 0.15);
    border-top-color: #0056a7;
    border-radius: 50%;
    animation: ye-upgrade-spin 0.75s linear infinite;
}

@keyframes ye-upgrade-spin {
    to {
        transform: rotate(360deg);
    }
}

.ye-explorer-upgrade__plan {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(8, 27, 51, 0.08);
    background: #f8fafc;
}

.ye-explorer-upgrade__plan.is-featured {
    border-color: rgba(8, 27, 51, 0.08);
    background: #f8fafc;
}

.ye-explorer-upgrade__plan-name {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #081b33;
}

.ye-explorer-upgrade__plan-desc {
    margin: 0 0 14px;
    flex: 1;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
}

.ye-explorer-upgrade__plan-price {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    color: #081b33;
}

.ye-explorer-upgrade__plan-price span {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

html.ye-explorer-upgrade-open,
body.ye-explorer-upgrade-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .ye-explorer-upgrade__hero,
    .ye-explorer-upgrade__plans {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ye-explorer-upgrade__title {
        font-size: 22px;
        padding-right: 28px;
    }
}
