/**
 * User pages theme – matches home (dark teal) for consistent buttons and styles.
 * Include this on all pages that use includes/user_header.php.
 */
@import url("user-design-system.css");

:root {
    --user-bg: #0a1614;
    --user-card-bg: #13201e;
    --user-text: #e6efee;
    --user-text-muted: #8fa6a3;
    --user-primary: #9de0d6;
    --user-secondary: #1c8b7a;
    --user-accent: #45ebd1;
    --user-border: rgba(157, 224, 214, 0.15);
}

/* Primary / success – home primary teal */
.btn-primary,
.btn-success {
    background: var(--user-primary) !important;
    color: #0a1614 !important;
    border: none !important;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-success:hover {
    background: var(--user-accent) !important;
    color: #0a1614 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(69, 235, 209, 0.35);
}

.btn-primary:focus,
.btn-success:focus {
    box-shadow: 0 0 0 0.2rem rgba(157, 224, 214, 0.4);
}

/* Outline light – for nav/secondary actions */
.btn-outline-light {
    color: var(--user-text) !important;
    border-color: var(--user-border) !important;
}

.btn-outline-light:hover {
    background: rgba(157, 224, 214, 0.15) !important;
    color: var(--user-primary) !important;
    border-color: var(--user-primary) !important;
}

/* Outline buttons – always readable (no light text on light bg) */
.btn-outline-primary,
.btn-outline-info {
    background: rgba(157, 224, 214, 0.2) !important;
    color: #0a1614 !important;
    border-color: var(--user-secondary) !important;
}

.btn-outline-primary:hover,
.btn-outline-info:hover {
    background: rgba(157, 224, 214, 0.35) !important;
    color: #0a1614 !important;
    border-color: var(--user-secondary) !important;
}

.btn-outline-warning {
    background: rgba(255, 193, 7, 0.25) !important;
    color: #e65100 !important;
    border-color: #ff8f00 !important;
}

.btn-outline-warning:hover {
    background: rgba(255, 193, 7, 0.4) !important;
    color: #bf360c !important;
}

.btn-outline-danger {
    background: rgba(229, 57, 53, 0.12) !important;
    color: #b71c1c !important;
    border-color: #c62828 !important;
}

.btn-outline-danger:hover {
    background: rgba(229, 57, 53, 0.2) !important;
    color: #b71c1c !important;
}

/* Warning – secondary teal */
.btn-warning {
    background: var(--user-secondary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px;
    font-weight: 600;
}

.btn-warning:hover {
    background: var(--user-accent) !important;
    color: #0a1614 !important;
}

/* Danger – keep red but soften to fit dark theme */
.btn-danger {
    border-radius: 12px;
    font-weight: 600;
}

.btn-danger:hover {
    transform: translateY(-1px);
}

/* Secondary – readable on light and dark (no light text on light bg) */
.btn-secondary {
    background: rgba(19, 32, 30, 0.12) !important;
    color: #0a1614 !important;
    border: 1px solid rgba(28, 139, 122, 0.5) !important;
    border-radius: 12px;
}

.btn-secondary:hover {
    background: rgba(28, 139, 122, 0.25) !important;
    color: #0a1614 !important;
    border-color: var(--user-secondary) !important;
}

/* Start New Exam / Resume – even sizing and contrast (e.g. start_exam.php) */
.incomplete-exam-actions .btn {
    min-height: 44px;
    padding: 0.5rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 140px;
}

.incomplete-exam-actions .btn-secondary {
    background: #fff !important;
    color: #1c8b7a !important;
    border: 2px solid #9de0d6 !important;
}

.incomplete-exam-actions .btn-secondary:hover {
    background: rgba(157, 224, 214, 0.2) !important;
    color: #0a1614 !important;
    border-color: #1c8b7a !important;
}

/* Cards and modals on user pages */
.modal-content {
    background: var(--user-card-bg);
    border: 1px solid var(--user-border);
    color: var(--user-text);
}

.modal-header {
    border-bottom-color: var(--user-border);
}

.modal-footer {
    border-top-color: var(--user-border);
}

.form-control,
.form-select {
    background: rgba(10, 22, 20, 0.6);
    border-color: var(--user-border);
    color: var(--user-text);
}

.form-control:focus,
.form-select:focus {
    background: rgba(10, 22, 20, 0.8);
    border-color: var(--user-primary);
    color: var(--user-text);
}

.form-control::placeholder {
    color: var(--user-text-muted);
}

.form-label {
    color: var(--user-text-muted);
}

.btn-close {
    filter: invert(1);
    opacity: 0.8;
}
