/* 
   Project: UEP Voice Maraton Redesign
   Theme: Modern Corporate (Blue/Indigo)
   Author: Antigravity
*/

:root {
    /* Colors */
    --primary: #2563eb;
    /* Royal Blue */
    --primary-dark: #1e40af;
    /* Darker Blue for hover */
    --secondary: #64748b;
    /* Slate Gray for secondary text/borders */
    --accent: #f59e0b;
    /* Amber for warnings/highlights */
    --success: #10b981;
    /* Emerald Green */
    --danger: #ef4444;
    /* Red for errors */

    --bg-body: #f1f5f9;
    /* Light Gray background */
    --bg-surface: #ffffff;
    /* White cards */
    --bg-input: #f8fafc;
    /* Very light slate for inputs */

    --text-main: #0f172a;
    /* Dark Slate (almost black) */
    --text-muted: #64748b;
    /* Muted text */
    --text-inverted: #ffffff;
    /* White text */

    --border: #e2e8f0;
    /* Light border */

    /* Spacing */
    --radius-sm: 0.375rem;
    /* 6px */
    --radius-md: 0.75rem;
    /* 12px */
    --radius-lg: 1rem;
    /* 16px */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition: all 0.2s ease-in-out;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 800px;
    /* Optimal readability width */
    margin: 0 auto;
    padding: 0;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Components: Card */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    background: #f8fafc;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-body {
    padding: 2rem;
}

.card-footer {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Components: Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

.text-center {
    text-align: center;
}

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

/* Components: Forms */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: #334155;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--bg-input);
    font-size: 1rem;
    color: var(--text-main);
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background-color: #fff;
}

/* Checkbox specific wrapper */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    /* Align top for multi-line text */
    gap: 0.75rem;
    background: #f1f5f9;
    padding: 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.checkbox-wrapper:hover {
    border-color: var(--border);
    background: #e2e8f0;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-wrapper label {
    margin: 0;
    cursor: pointer;
    line-height: 1.4;
}

/* Components: Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    /* Default full width on mobile */
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-inverted);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: #fff;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Components: Language Selector */
.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
}

.lang-btn:hover {
    background: #f1f5f9;
}

.lang-btn.active {
    background: #eff6ff;
    border-color: var(--primary);
    color: var(--primary);
}

.lang-btn img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Components: Banners & Images */
.banner-img {
    width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

/* Components: Selection Cards (Home) */
.selection-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

@media (min-width: 640px) {
    .selection-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.selection-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    opacity: 0.7;
    /* Dim non-selected */
}

/* Selected state is critical for logic */
.selection-card.selected {
    border-color: var(--primary);
    background-color: #eff6ff;
    /* Very light blue */
    opacity: 1;
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.selection-card:hover {
    opacity: 1;
    border-color: #cbd5e1;
}

.selection-card.selected:hover {
    border-color: var(--primary);
}

.selection-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.selection-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.5rem;
}

/* Components: Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    /* Slate 900 with opacity */
    backdrop-filter: blur(2px);
    z-index: 50;
    display: none;
    /* JS toggles form 'flex' */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-container {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    transform: scale(0.95);
    transition: transform 0.2s ease;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay.show .modal-container {
    transform: scale(1);
}

.modal-header {
    background: #f8fafc;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Review Grid in Modal */
.review-list {
    display: grid;
    gap: 1rem;
}

.review-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.review-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.review-value {
    font-weight: 600;
    color: var(--text-main);
}

.review-item.warning {
    border-left-color: var(--accent);
    background: #fffbeb;
    /* Amber 50 */
}

.review-item.warning .review-value {
    font-size: 1.1rem;
    color: #b45309;
    /* Amber 700 */
}

.review-warning-text {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #b45309;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Components: Success/Error States (Pages) */
.status-icon {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    font-size: 2.5rem;
    color: white;
}

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

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

/* Components: Payment Summary */
.summary-box {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    border-top: 2px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    pointer-events: none;
}

.toast {
    background: #fff;
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    margin-top: 0.5rem;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.success {
    border-left-color: var(--success);
}

/* Utilities */
.hidden {
    display: none !important;
}

.mobile-full {
    width: 100%;
}

@media (max-width: 640px) {
    .container {
        padding: 0;
    }

    .card {
        border-radius: 0;
        /* Full bleed on mobile */
        border: none;
        box-shadow: none;
        margin-bottom: 0;
    }

    body {
        padding: 0;
        background: #fff;
        /* White bg on mobile for full card feel */
    }

    .card-header,
    .card-footer {
        padding: 1.25rem 1.5rem;
    }

    .card-body {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}