/* ACOS Brand Colors and Modern Design */
:root {
    --acos-primary: #0066cc;
    --acos-dark: #003366;
    --acos-light: #e8f2ff;
    --acos-success: #28a745;
    --acos-danger: #dc3545;
    --acos-gray: #6c757d;
    --acos-light-gray: #f8f9fa;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--acos-light-gray);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Modern Card Container */
.consent-container {
    max-width: 560px;
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.consent-header {
    background: linear-gradient(135deg, var(--acos-primary) 0%, var(--acos-dark) 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
}

.consent-header .logo {
    height: 40px;
    margin-bottom: 0.75rem;
}

.consent-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.consent-header p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0;
}

.consent-body {
    padding: 2.5rem;
}

/* Status Cards */
.status-card {
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.status-card.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid var(--acos-success);
}

.status-card.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid var(--acos-danger);
}

.status-card.not-found {
    background: linear-gradient(135deg, var(--acos-light) 0%, #d4e6f7 100%);
    border: 2px solid var(--acos-primary);
}

.status-icon {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.status-card.success .status-icon {
    color: var(--acos-success);
}

.status-card.error .status-icon {
    color: var(--acos-danger);
}

.status-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #222;
}

.status-card p {
    font-size: 1rem;
    color: #444;
    margin-bottom: 0.5rem;
}

.status-card .secondary-text {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.not-found-code {
    font-size: 5rem;
    font-weight: 800;
    color: var(--acos-primary);
    line-height: 1;
    margin-bottom: 1rem;
}

/* Error Details */
.error-details {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-left: 4px solid var(--acos-danger);
    text-align: left;
}

.error-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #333;
}

.error-details p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 0.5rem;
}

.error-details p:last-child {
    margin-bottom: 0;
}

/* Info Box */
.info-box {
    background-color: var(--acos-light);
    border-left: 4px solid var(--acos-primary);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-top: 1.5rem;
    text-align: left;
}

.info-box p {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 0;
}

/* Warning Box */
.warning-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-align: left;
}

.warning-box .warning-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.warning-box p {
    font-size: 0.9rem;
    color: #856404;
    margin: 0;
}

/* Loading Spinner */
.loading-container {
    text-align: center;
    padding: 3rem 2rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--acos-light);
    border-top: 4px solid var(--acos-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--acos-gray);
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 640px) {
    main {
        padding: 1rem;
        align-items: flex-start;
        padding-top: 2rem;
    }

    .consent-header {
        padding: 2rem 1.5rem;
    }

    .consent-header h1 {
        font-size: 1.75rem;
    }

    .consent-body {
        padding: 1.5rem;
    }

    .status-card {
        padding: 2rem 1.5rem;
    }

    .status-icon {
        font-size: 3.5rem;
    }

    .not-found-code {
        font-size: 4rem;
    }
}

/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
