:root {
    --primary-color: #2c5aa0;
    --primary-dark: #1e4278;
    --secondary-color: #4a90e2;
    --accent-color: #f0f4f8;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #e8eaed 0%, #c5c8cc 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-dark);
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.admin-link-top {
    display: block;
    text-align: right;
    margin-bottom: 10px;
    padding: 6px 12px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.admin-link-top:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Main Card */
.scheduler-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    padding: 40px;
    animation: slideUp 0.5s ease-out;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--accent-color);
}

.header .logo {
    height: 70px;
    width: auto;
    margin: 0 auto 12px;
    display: block;
}

.header h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 6px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

.duration-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 14px;
    background: var(--accent-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Steps */
.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.step-header h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 600;
}

.timezone-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 8px;
    background: var(--accent-color);
    border-radius: 8px;
}

.timezone-selector select {
    border: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 2px 4px;
    outline: none;
    max-width: 220px;
}

.timezone-selector select:focus {
    outline: 2px solid var(--secondary-color);
    border-radius: 4px;
}

/* Calendar Container - Side by side */
.calendar-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
    min-height: 380px;
}

@media (max-width: 768px) {
    .calendar-container {
        grid-template-columns: 1fr;
    }
    .scheduler-card {
        padding: 24px;
    }
    .header h1 {
        font-size: 1.4rem;
    }
}

/* Calendar Panel */
.calendar-panel {
    flex: 1;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.nav-btn {
    background: none;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--text-dark);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--accent-color);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.month-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Calendar Grid */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 8px;
}

.calendar-weekdays span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
}

.calendar-day:hover:not(.disabled):not(.other-month) {
    background: var(--accent-color);
    border-color: var(--secondary-color);
}

.calendar-day.today {
    color: var(--primary-color);
    font-weight: 700;
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.calendar-day.has-slots {
    color: var(--primary-color);
    font-weight: 600;
}

.calendar-day.has-slots::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary-color);
}

.calendar-day.selected.has-slots::after {
    background: white;
}

.calendar-day.fully-booked {
    color: var(--text-light);
    opacity: 0.5;
}

.calendar-day.disabled,
.calendar-day.other-month {
    color: #d1d5db;
    cursor: default;
    pointer-events: none;
}

.calendar-day.other-month {
    visibility: hidden;
}

/* Slots Panel */
.slots-panel {
    border-left: 2px solid var(--border-color);
    padding-left: 25px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .slots-panel {
        border-left: none;
        border-top: 2px solid var(--border-color);
        padding-left: 0;
        padding-top: 20px;
    }
}

.slots-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    font-size: 0.95rem;
    text-align: center;
    padding: 20px;
}

.slots-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.slots-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 5px;
}

.slots-list::-webkit-scrollbar {
    width: 5px;
}

.slots-list::-webkit-scrollbar-track {
    background: transparent;
}

.slots-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Slot Button */
.slot-btn {
    padding: 12px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: white;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.slot-btn:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.slot-btn.selected {
    background: var(--primary-color);
    color: white;
}

.slot-btn.selected .confirm-label {
    display: inline;
}

.slot-btn .confirm-label {
    display: none;
}

.slot-btn.unavailable {
    border-color: #e5e7eb;
    color: #d1d5db;
    cursor: not-allowed;
    background: #f9fafb;
    text-decoration: line-through;
}

.slot-btn.unavailable:hover {
    transform: none;
    box-shadow: none;
}

/* Confirm overlay on slot */
.slot-confirm-btn {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    width: 100%;
}

.slot-confirm-btn:hover {
    background: var(--primary-dark);
}

.slots-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: var(--text-light);
    gap: 10px;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

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

/* Back Button */
.back-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--accent-color);
}

/* Selected Time Summary */
.selected-time-summary {
    padding: 16px 20px;
    background: var(--accent-color);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 25px;
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.selected-time-summary strong {
    color: var(--primary-color);
}

/* Booking Form */
.booking-form {
    max-width: 500px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-group small {
    margin-top: 6px;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.submit-btn.loading {
    pointer-events: none;
}

.btn-icon {
    width: 24px;
    height: 24px;
}

/* Confirmation */
.confirmation-content {
    text-align: center;
    padding: 20px 0;
}

.success-checkmark {
    margin-bottom: 20px;
}

.confirmation-content h2 {
    font-size: 1.8rem;
    color: var(--success-color);
    margin-bottom: 10px;
}

.confirmation-message {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 25px;
}

.confirmation-details {
    background: var(--accent-color);
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    margin-bottom: 20px;
}

.confirmation-details p {
    margin: 8px 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.confirmation-details strong {
    color: var(--primary-color);
}

.meet-link-section {
    margin: 20px 0;
    padding: 20px;
    background: #ecfdf5;
    border-radius: 10px;
}

.meet-link-section p {
    margin-bottom: 12px;
    color: #065f46;
    font-weight: 500;
}

.meet-link-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--success-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.meet-link-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

/* Slot row with confirm */
.slot-row {
    display: flex;
    gap: 8px;
}

.slot-row .slot-btn {
    flex: 1;
}

.slot-row .slot-confirm-btn {
    flex: 0 0 auto;
    width: auto;
    padding: 12px 20px;
    animation: fadeIn 0.2s ease;
}
