/*
 * The page kit the server-rendered pages still use: `.page-container`, `.card`, `.btn`,
 * `.alert`, `.badge`, the modal and the tables.
 *
 * It was 274 lines of <style> inside base.html.twig - unlintable, uncacheable, and
 * re-downloaded inside every document. The rules are unchanged; only the colours moved
 * to tokens, because a stylesheet in public/css may not contain a hex value
 * (tests/Architecture/StyleTokenTest.php).
 *
 * WHO STILL DEPENDS ON IT: the sign-in and gate pages, the subscription thank-you and
 * failure screens, the error pages, every `<noscript>` block - and, less obviously, the
 * ADMIN PANEL: thirteen of its React files render `.page-container`, `.card` and `.btn`.
 * So this is not dead weight to be deleted with the last Twig page; it is the admin
 * panel's base kit until that panel gets a kit of its own.
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-ink-muted);
    background-color: var(--color-legacy-ground);
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}
.page-container {
    max-width: 100%;
    margin: 2rem auto;
    padding: 2rem;
}
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-legacy-border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-left: auto;
    margin-right: auto;
    max-width: 700px;
}
.card.card--fullwidth {
    max-width: 100%;
}
.card-header {
    border-bottom: 2px solid var(--color-legacy-link);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.card-header h1,
.card-header h2 {
    margin: 0;
    color: var(--color-ink-muted);
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.info-item {
    min-width: 0;
    padding: 0.75rem 1rem;
    background: var(--color-legacy-row);
    border-radius: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.info-label {
    font-size: 0.875rem;
    color: var(--color-legacy-ink-soft);
    margin-bottom: 0.25rem;
    line-height: 1.35;
}
.info-value {
    font-size: 15px;
    font-weight: bold;
    color: var(--color-ink-muted);
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s;
}
.btn:hover {
    opacity: 0.9;
}
.btn-primary {
    background: var(--color-legacy-link);
    color: white;
}
.btn-danger {
    background: var(--color-legacy-danger);
    color: white;
}
.btn-secondary {
    background: var(--color-ink-soft);
    color: white;
}
.btn-success {
    background: var(--color-legacy-success);
    color: white;
}
.btn-link {
    background: transparent;
    color: var(--color-legacy-link);
    text-decoration: underline;
    padding: 0.5rem 0;
}
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
}
.alert.alert-success,
.alert.alert-error,
.alert.alert-success.global-floating-alert,
.alert.alert-error.global-floating-alert {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483647;
    animation: global-alert-hide 3s ease-in-out forwards;
    pointer-events: none;
}
table .alert.alert-success,
table .alert.alert-error {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
    animation: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
@keyframes global-alert-hide {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    10%, 80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
        visibility: hidden;
    }
}
.alert-success {
    background: var(--color-legacy-success-fill);
    color: var(--color-legacy-success-ink);
    border: 1px solid var(--color-legacy-success-edge);
}
.alert-error {
    background: var(--color-legacy-danger-fill);
    color: var(--color-legacy-danger-ink);
    border: 1px solid var(--color-legacy-danger-edge);
}
.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--color-legacy-link);
    text-decoration: none;
    font-size: 0.9rem;
}
.back-link:hover {
    text-decoration: underline;
}
.back-link::before {
    content: '← ';
    margin-right: 0.25rem;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
    padding: 1rem;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}
.modal[style*="flex"] {
    display: flex !important;
}
.modal-content {
    background-color: var(--color-surface);
    margin: auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}
.modal.large .modal-content {
    max-width: 900px;
}
@media (max-height: 800px) {
    .modal {
        align-items: flex-start;
        padding-top: 1rem;
    }
    .modal-content {
        max-height: calc(100vh - 2rem);
        margin-top: 0;
    }
}
.modal-content h3 {
    margin-bottom: 1rem;
    color: var(--color-ink-muted);
}
.modal-content p {
    margin-bottom: 1.5rem;
    color: var(--color-legacy-ink-soft);
}
.modal-buttons {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
table th,
table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-legacy-border);
}
table th {
    background: var(--color-legacy-row);
    font-weight: bold;
}
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: bold;
}
.badge-success {
    background: var(--color-legacy-success-fill);
    color: var(--color-legacy-success-ink);
}
.badge-danger {
    background: var(--color-legacy-danger-fill);
    color: var(--color-legacy-danger-ink);
}
.badge-warning {
    background: var(--color-legacy-warning-fill);
    color: var(--color-legacy-warning-ink);
}
