/* 6seconds Booking Form v2 - Styles */

:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --success: #27ae60;
    --error: #e74c3c;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e1e5e9;
    --bg: #ffffff;
    --bg-light: #f8f9fa;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --transition: 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

/* Main Container */
.booking-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: max-width 0.3s ease;
}

/* Expand container when showing Calendly (step 4) */
.booking-container.calendly-active {
    max-width: 900px;
}

.booking-card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

/* Progress Indicator */
.progress-container {
    margin-bottom: 32px;
}

.progress-steps {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: var(--transition);
}

.progress-dot.active {
    background: var(--primary);
}

.progress-dot.completed {
    background: var(--success);
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
}

/* Step Headers */
.step-header {
    text-align: center;
    margin-bottom: 28px;
}

.step-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.step-subtitle {
    font-size: 15px;
    color: var(--text-light);
}

/* Form Elements */
.form-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 8px;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

input.valid,
select.valid {
    border-color: var(--success);
}

input.invalid,
select.invalid {
    border-color: var(--error);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237f8c8d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Validation Messages */
.field-error {
    font-size: 13px;
    color: var(--error);
    margin-top: 6px;
    display: none;
}

.field-error.visible {
    display: block;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-link {
    background: none;
    color: var(--primary);
    padding: 8px 16px;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Host Preview */
.host-preview {
    text-align: center;
    margin-bottom: 24px;
}

.host-photos {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.host-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.host-photo.team {
    margin-left: -20px;
}

.host-photo.team:first-child {
    margin-left: 0;
}

.host-initials {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    border: 3px solid var(--bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.host-initials.team {
    margin-left: -20px;
}

.host-initials.team:first-child {
    margin-left: 0;
}

.host-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.host-title {
    font-size: 14px;
    color: var(--text-light);
}

/* Calendly Container */
.calendly-container {
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 100%;
}

.calendly-inline-widget,
.calendly-container iframe {
    min-height: 630px;
    width: 100% !important;
    max-width: 100% !important;
}

/* Loading State */
.loading-container {
    text-align: center;
    padding: 48px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--text-light);
    font-size: 15px;
}

/* Messages */
.message {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.message.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.message.error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.message.success {
    background: #efe;
    border: 1px solid #cfc;
    color: #363;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Live Region for Announcements */
.announcer {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .booking-container {
        padding: 12px;
    }

    .booking-card {
        padding: 24px 20px;
        border-radius: 8px;
    }

    .step-title {
        font-size: 20px;
    }

    .step-subtitle {
        font-size: 14px;
    }

    input,
    select,
    textarea {
        padding: 12px 14px;
        font-size: 16px; /* Prevents iOS zoom */
    }

    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .host-photo,
    .host-initials {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    .calendly-inline-widget {
        min-height: 580px;
    }
}

/* =========================
   ADMIN STYLES
   ========================= */

.admin-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.admin-title {
    font-size: 24px;
    font-weight: 600;
}

.admin-section {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.admin-section h2 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* Routing Table */
.routing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.routing-table th,
.routing-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.routing-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text);
}

.routing-table tr:hover {
    background: var(--bg-light);
}

.routing-table input {
    padding: 8px 12px;
    font-size: 13px;
}

.route-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.route-type.single {
    background: #e8f5e9;
    color: #2e7d32;
}

.route-type.team {
    background: #e3f2fd;
    color: #1565c0;
}

/* Admin Buttons */
.btn-save {
    background: var(--success);
    color: white;
}

.btn-save:hover {
    background: #219a52;
}

.btn-edit {
    background: none;
    border: 1px solid var(--border);
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-edit:hover {
    background: var(--bg-light);
}

/* Login Form */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
}

.login-card {
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    text-align: center;
}

.login-card h1 {
    margin-bottom: 24px;
}

/* Options List */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: var(--bg-light);
    border-radius: 6px;
}

.option-item input {
    flex: 1;
    background: var(--bg);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;
}

.btn-add {
    margin-top: 12px;
    background: var(--bg-light);
    border: 2px dashed var(--border);
    color: var(--text-light);
    width: 100%;
}

.btn-add:hover {
    border-color: var(--primary);
    color: var(--primary);
}
