/*
 * GPT theme: the notice shown when a limit is reached (js/upgrade.js).
 * It carries its own colours so it looks the same on the chat and on the kit pages.
 */

.gu-overlay {
    --gu-card: #2a2a2a;
    --gu-soft: #353535;
    --gu-line: rgba(255, 255, 255, .12);
    --gu-text: #f3f3f3;
    --gu-text-2: #b4b4b4;
    --gu-solid: #ffffff;
    --gu-on-solid: #0d0d0d;
    --gu-accent: #3a83f7;
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .6);
    font-family: "Inter", ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
    animation: gu-fade .16s ease-out;
}

[data-theme-version="light"] .gu-overlay,
[data-theme="light"] .gu-overlay,
body.light-theme .gu-overlay {
    --gu-card: #ffffff;
    --gu-soft: #f4f4f4;
    --gu-line: rgba(0, 0, 0, .1);
    --gu-text: #0d0d0d;
    --gu-text-2: #5d5d5d;
    --gu-solid: #0d0d0d;
    --gu-on-solid: #ffffff;
    background: rgba(0, 0, 0, .35);
}

.gu-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 32px);
    padding: 28px 24px 20px;
    overflow-y: auto;
    border: 1px solid var(--gu-line);
    border-radius: 24px;
    background: var(--gu-card);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .45);
    color: var(--gu-text);
    animation: gu-rise .2s ease-out;
}

.gu-card * {
    box-sizing: border-box;
}

.gu-x {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--gu-text-2);
    cursor: pointer;
}

.gu-x:hover {
    background: var(--gu-soft);
    color: var(--gu-text);
}

.gu-x .material-symbols-outlined {
    font-size: 20px;
}

.gu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: rgba(58, 131, 247, .16);
    color: var(--gu-accent);
}

.gu-badge .material-symbols-outlined {
    font-size: 24px;
}

.gu-title {
    margin: 0 28px 8px 0;
    color: var(--gu-text);
    font-size: 20px;
    font-weight: 600;
    line-height: 26px;
    letter-spacing: -.01em;
}

.gu-text {
    margin: 0;
    color: var(--gu-text-2);
    font-size: 14.5px;
    line-height: 22px;
}

.gu-meter {
    margin-top: 16px;
}

.gu-meter-facts {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--gu-text-2);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.gu-meter-facts strong {
    color: var(--gu-text);
    font-weight: 500;
}

.gu-meter-bar {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--gu-soft);
}

.gu-meter-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--gu-text);
}

.gu-meter small {
    display: block;
    margin-top: 6px;
    color: var(--gu-text-2);
    font-size: 12px;
}

.gu-offer {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid var(--gu-line);
    border-radius: 16px;
    background: var(--gu-soft);
}

.gu-offer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.gu-offer-head strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
}

.gu-offer-head small {
    display: block;
    margin-top: 2px;
    color: var(--gu-text-2);
    font-size: 12.5px;
}

.gu-offer-price {
    flex: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.gu-offer ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.gu-offer li {
    display: flex;
    gap: 8px;
    color: var(--gu-text);
    font-size: 13.5px;
    line-height: 20px;
}

.gu-offer li .material-symbols-outlined {
    flex: none;
    margin-top: 1px;
    color: var(--gu-accent);
    font-size: 18px;
}

.gu-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.gu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--gu-line);
    border-radius: 999px;
    background: transparent;
    color: var(--gu-text) !important;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
}

.gu-btn:hover {
    background: var(--gu-soft);
}

.gu-btn.is-main {
    border-color: var(--gu-solid);
    background: var(--gu-solid);
    color: var(--gu-on-solid) !important;
}

.gu-btn.is-main:hover {
    opacity: .9;
}

.gu-link {
    align-self: center;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--gu-text-2);
    font-family: inherit;
    font-size: 13.5px;
    cursor: pointer;
}

.gu-link:hover {
    color: var(--gu-text);
}

@keyframes gu-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes gu-rise {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
    .gu-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .gu-card {
        max-width: none;
        border-radius: 24px 24px 0 0;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
}
