/* Satoshi Font */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700&display=swap');

/* CSS Custom Properties - Light Mode (default) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --border-color: #dee2e6;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-light: #dbeafe;
    --success: #059669;
    --success-light: #d1fae5;
    --error: #dc2626;
    --error-light: #fee2e2;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Dark Mode - follows system preference */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f0f0f;
        --bg-secondary: #1a1a1a;
        --bg-tertiary: #262626;
        --text-primary: #f5f5f5;
        --text-secondary: #a3a3a3;
        --text-muted: #737373;
        --border-color: #404040;
        --accent: #3b82f6;
        --accent-hover: #60a5fa;
        --accent-light: #1e3a5f;
        --success: #10b981;
        --success-light: #064e3b;
        --error: #ef4444;
        --error-light: #7f1d1d;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    }
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 40px 20px;
}

@media (min-width: 768px) {
    .container {
        padding: 60px 20px;
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.header-logo {
    height: 32px;
    margin-bottom: 24px;
}

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

.header-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Connect Banner */
.connect-banner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
    background: var(--accent-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.connect-text {
    font-size: 15px;
    color: var(--text-primary);
}

.connect-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.connect-actions .btn {
    width: 100%;
}

/* Meeting Info Card */
.meeting-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 32px;
}

.reschedule-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: var(--accent-light);
    border: 1px dashed var(--accent);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 24px;
    font-size: 14px;
}

.reschedule-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

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

.meeting-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.meeting-duration svg {
    width: 16px;
    height: 16px;
}

/* Calendar */
.calendar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

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

.calendar-title {
    font-size: 18px;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.calendar-nav button:hover {
    background: var(--bg-tertiary);
}

.calendar-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

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

.calendar-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    padding: 8px 0;
}

.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;
    font-size: 14px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day:hover:not(:disabled):not(.selected) {
    background: var(--bg-tertiary);
}

.calendar-day.other-month {
    color: var(--text-muted);
}

.calendar-day.today {
    font-weight: 600;
    border: 2px solid var(--accent);
}

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

.calendar-day:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    text-decoration: line-through;
}

.calendar-day.unavailable {
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Time Slots */
/* Time Slots */
.time-panel {
    width: 100%;
    margin-top: 24px;
}

.time-slots {
    margin-bottom: 24px;
    width: 100%;
}

.time-slots-header {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.duration-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
}

.duration-picker-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.duration-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.duration-option {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.duration-option:hover:not(.selected) {
    border-color: var(--accent);
    color: var(--accent);
}

.duration-option.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
}

@media (min-width: 400px) {
    .time-slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.time-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    padding-right: 28px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

.time-slot:hover:not(.selected) {
    border-color: var(--accent);
    background: var(--accent-light);
}

.time-slot.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.time-slot.shared::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 2px var(--bg-secondary);
}

.time-slot.selected.shared::after {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

/* Compare Inline Prompt */
.compare-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    width: 100%;
    margin-top: 8px;
}

.compare-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
}

.compare-title {
    font-weight: 600;
    color: var(--text-secondary);
}

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

.compare-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
}

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

.compare-meta {
    gap: 10px;
}

.compare-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

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

.compare-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 2px var(--bg-primary);
}

/* Booking Form */
.booking-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

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

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

.form-label .required {
    color: var(--error);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

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

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

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

.confirmation-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    background: var(--success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-icon svg {
    width: 32px;
    height: 32px;
    color: var(--success);
}

.confirmation-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.confirmation-text {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.confirmation-details {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    margin-bottom: 24px;
}

.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.confirmation-detail {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.confirmation-detail:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.confirmation-detail svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s ease-out forwards;
}

/* Timezone Notice */
.timezone-notice {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 16px;
}

/* Error State */
.error-message {
    background: var(--error-light);
    color: var(--error);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
}

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