/**
 * Dietitian Booking - Frontend Styles
 */

/* ================================
   Base Styles
   ================================ */

.dtb-booking-form {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.dtb-booking-form * {
    box-sizing: border-box;
}

/* ================================
   Step Indicator
   ================================ */

.dtb-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 20px;
    position: relative;
}

.dtb-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 60px;
    right: 60px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.dtb-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.dtb-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.dtb-step-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
}

.dtb-step.active .dtb-step-number {
    background: #2c5530;
    color: white;
    box-shadow: 0 2px 8px rgba(44, 85, 48, 0.3);
}

.dtb-step.active .dtb-step-label {
    color: #2c5530;
    font-weight: 600;
}

.dtb-step.completed .dtb-step-number {
    background: #4CAF50;
    color: white;
}

.dtb-step.completed .dtb-step-number::after {
    content: '✓';
}

.dtb-step.completed .dtb-step-number span {
    display: none;
}

/* ================================
   Step Content
   ================================ */

.dtb-step-content {
    display: none;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

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

.dtb-step-content h3 {
    margin: 0 0 24px;
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 600;
}

/* ================================
   Location Cards
   ================================ */

.dtb-locations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.dtb-location-card {
    padding: 24px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.dtb-location-card:hover {
    border-color: #2c5530;
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.1);
    transform: translateY(-2px);
}

.dtb-location-card.selected {
    border-color: #2c5530;
    background: #f0f7f1;
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.15);
}

.dtb-location-city {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.dtb-location-address {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* ================================
   Calendar
   ================================ */

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

.dtb-current-month {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.dtb-nav-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s ease;
}

.dtb-nav-btn:hover {
    border-color: #2c5530;
    color: #2c5530;
    background: #f0f7f1;
}

.dtb-calendar-grid {
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
}

.dtb-calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
}

.dtb-calendar-day-name {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

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

.dtb-calendar-day {
    padding: 14px 10px;
    text-align: center;
    font-size: 15px;
    color: #999;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.dtb-calendar-day:nth-child(7n) {
    border-right: none;
}

.dtb-calendar-day.empty {
    background: #fafafa;
}

.dtb-calendar-day.past {
    color: #ccc;
    background: #fafafa;
}

.dtb-calendar-day.available {
    color: #1a1a1a;
    background: #fff;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dtb-calendar-day.available:hover {
    background: #f0f7f1;
    color: #2c5530;
}

.dtb-calendar-day.fully-booked {
    background: #fff5f5;
    color: #cc4444;
    cursor: not-allowed;
    position: relative;
}

.dtb-calendar-day.fully-booked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 15%;
    right: 15%;
    height: 2px;
    background: #cc4444;
    opacity: 0.5;
    transform: rotate(-45deg);
}

.dtb-calendar-day.no-availability {
    background: #f5f5f5;
    color: #bbb;
    cursor: not-allowed;
}

.dtb-calendar-day.selected {
    background: #2c5530 !important;
    color: white !important;
    font-weight: 600;
}

.dtb-calendar-loading {
    padding: 60px 20px;
    text-align: center;
    color: #666;
    font-size: 15px;
}

/* ================================
   Time Slots
   ================================ */

.dtb-selected-date {
    font-size: 16px;
    color: #2c5530;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f0f7f1;
    border-radius: 8px;
}

.dtb-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
}

.dtb-slot {
    padding: 14px 12px;
    text-align: center;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    background: #fafafa;
    color: #999;
}

.dtb-slot.available {
    background: #fff;
    color: #1a1a1a;
    cursor: pointer;
    border-color: #d0d0d0;
    transition: all 0.2s ease;
}

.dtb-slot.available:hover {
    border-color: #2c5530;
    background: #f0f7f1;
    color: #2c5530;
}

.dtb-slot.selected {
    background: #2c5530;
    border-color: #2c5530;
    color: white;
}

.dtb-slot.unavailable {
    text-decoration: line-through;
    opacity: 0.5;
}

.dtb-slots-loading,
.dtb-no-slots {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-size: 15px;
}

.dtb-no-slots {
    background: #fff3cd;
    border-radius: 8px;
    color: #856404;
}

/* ================================
   Summary / Confirmation
   ================================ */

.dtb-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.dtb-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.dtb-summary-item:last-child {
    border-bottom: none;
}

.dtb-summary-label {
    color: #666;
    font-size: 15px;
}

.dtb-summary-value {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 15px;
}

.dtb-summary-price {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid #2c5530;
}

.dtb-summary-price .dtb-summary-value {
    color: #2c5530;
    font-size: 20px;
}

/* ================================
   Notes Field
   ================================ */

.dtb-notes-field {
    margin-bottom: 24px;
}

.dtb-notes-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
}

.dtb-notes-field textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.dtb-notes-field textarea:focus {
    outline: none;
    border-color: #2c5530;
}

/* ================================
   Hold Timer
   ================================ */

.dtb-hold-timer {
    padding: 14px 20px;
    background: #fff3cd;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #856404;
}

.dtb-timer-icon {
    margin-right: 8px;
}

#dtb-timer-countdown {
    font-weight: 700;
    font-size: 16px;
    color: #d63384;
}

/* ================================
   Buttons
   ================================ */

.dtb-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.dtb-btn {
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.dtb-btn-back {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
}

.dtb-btn-back:hover {
    background: #eee;
    border-color: #ccc;
}

.dtb-btn-primary {
    background: #2c5530;
    color: white;
    flex: 1;
    max-width: 280px;
}

.dtb-btn-primary:hover {
    background: #234426;
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.3);
}

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

/* ================================
   Messages
   ================================ */

.dtb-message {
    padding: 16px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 15px;
    text-align: center;
}

.dtb-message.dtb-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dtb-message.dtb-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.dtb-error {
    padding: 20px;
    background: #f8d7da;
    border-radius: 8px;
    color: #721c24;
    text-align: center;
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 768px) {
    .dtb-steps {
        padding: 0;
    }

    .dtb-steps::before {
        left: 30px;
        right: 30px;
    }

    .dtb-step-label {
        font-size: 11px;
    }

    .dtb-step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .dtb-locations {
        grid-template-columns: 1fr;
    }

    .dtb-calendar-day-name {
        padding: 8px 4px;
        font-size: 11px;
    }

    .dtb-calendar-day {
        padding: 10px 6px;
        font-size: 14px;
    }

    .dtb-slots-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .dtb-slot {
        padding: 12px 8px;
        font-size: 14px;
    }

    .dtb-actions {
        flex-direction: column-reverse;
    }

    .dtb-btn {
        width: 100%;
    }

    .dtb-btn-primary {
        max-width: none;
    }

    .dtb-summary-item {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .dtb-step-content {
        padding: 16px;
    }

    .dtb-step-content h3 {
        font-size: 20px;
    }

    .dtb-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
