/* Calendar Booking Page Styles */

:root {
    --color-accent: #000;
    --color-accent-dark: #333;
}

body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--color-white);
}

.booking-container {
    max-width: 900px;
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Logo Section */
.logo-section {
    background: var(--color-background);
    padding: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.logo-section img,
.logo-section .icon {
    width: 190px;
    height: auto;
}

/* Content Section */
.content-section {
    padding: 40px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 24px 0;
    text-align: center;
}

/* User Profile */
.user-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-left: 4px solid var(--color-accent);
    background: var(--color-background);
    border-radius: 4px;
    margin-bottom: 32px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #E8E8E8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar .avatar-initials {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 4px 0;
}

.profile-position {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0 0 8px 0;
}

.profile-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.profile-contact a {
    color: var(--color-accent-dark);
    text-decoration: none;
}

.profile-contact a:hover {
    text-decoration: underline;
}

/* Booking Layout */
.booking-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

/* Month Calendar */
.month-calendar {
    user-select: none;
}

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

.cal-header-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
}

.cal-nav-btn {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-text);
    font-size: 14px;
    transition: all 0.15s;
}

.cal-nav-btn:hover {
    background: var(--color-background);
    border-color: var(--color-text-secondary);
}

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

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

.cal-weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: 8px 0;
    text-transform: uppercase;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-day {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--color-primary);
    border: 2px solid transparent;
}

.cal-day:hover:not(.disabled):not(.empty) {
    background: var(--color-background);
    border-color: var(--color-accent);
    color: #000;
}

.cal-day.selected {
    background: var(--color-accent);
    color: #fff;
    font-weight: 700;
}

.cal-day.today:not(.selected) {
    border-color: var(--color-accent);
    font-weight: 600;
}

.cal-day.disabled {
    color: var(--color-text-muted, #ccc);
    cursor: not-allowed;
    opacity: 0.4;
}

.cal-day.fully-booked {
    color: var(--color-danger);
    cursor: not-allowed;
    font-weight: 600;
}

.cal-day.fully-booked:hover {
    border-color: transparent;
    background: none;
}

.cal-day.empty {
    cursor: default;
}

.cal-day.weekend:not(.selected) {
    color: var(--color-text-secondary);
}

/* Slots Panel */
.slots-panel {
    min-height: 200px;
}

.slots-panel-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 16px 0;
}

.slots-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--color-text-muted, #999);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* Duration Picker */
.duration-picker {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.duration-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    color: var(--color-text);
}

.duration-btn:hover {
    border-color: var(--color-accent);
}

.duration-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    font-weight: 700;
}

/* Slot List */
.slot-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 340px;
    overflow-y: auto;
}

.slot-btn {
    padding: 12px 16px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    color: var(--color-text);
}

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

.slot-btn.selected {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    font-weight: 600;
}

.no-slots {
    text-align: center;
    color: var(--color-text-muted, #999);
    font-size: 14px;
    padding: 40px 20px;
}

.slots-loading {
    text-align: center;
    color: var(--color-text-muted, #999);
    font-size: 14px;
    padding: 40px 20px;
}

/* Booking Form */
.booking-form {
    background: var(--color-background);
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.booking-form-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 20px 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
}

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

.form-group input,
.form-group select {
    padding: 10px 12px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-primary);
    background: white;
    transition: border-color 0.15s;
    font-family: inherit;
}

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

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

.booking-summary {
    background: white;
    border-left: 4px solid var(--color-accent);
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

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

.btn-book {
    width: 100%;
    padding: 14px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-book:hover:not(:disabled) {
    background: var(--color-accent-dark);
}

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

/* Messages */
.error-message {
    background: var(--color-error-bg, #fef2f2);
    color: var(--color-danger);
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
    font-size: 14px;
}

.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 48px;
    color: #00E8A2;
    margin-bottom: 16px;
}

/* Hide user profile when success message is shown */
.content-section:has(.success-message) .user-profile {
    display: none;
}

.success-message h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 12px 0;
}

.success-message p {
    color: var(--color-text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.success-details {
    background: var(--color-background);
    border-left: 4px solid var(--color-accent);
    padding: 16px;
    border-radius: 4px;
    margin: 20px auto;
    max-width: 400px;
    text-align: left;
    font-size: 14px;
    line-height: 1.8;
}

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

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px 0;
    color: var(--color-text-muted, #999);
}

/* Footer */
.footer-section {
    padding: 20px 40px;
    background: var(--color-background);
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer-section p {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .booking-container {
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }

    .logo-section {
        padding: 20px;
        min-height: 80px;
    }

    .logo-section img,
    .logo-section .icon {
        width: 150px;
    }

    .content-section {
        padding: 20px 16px;
    }

    .page-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .user-profile {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .profile-contact {
        justify-content: center;
    }

    .booking-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cal-day {
        min-height: 40px;
        font-size: 13px;
    }

    .duration-picker {
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .booking-form {
        padding: 16px;
    }

    .footer-section {
        padding: 16px;
    }
}
