/**
 * ZEN Healthcare Booking - Frontend Styles
 */

/* Reset and base styles */
.zenhb-booking-form * {
    box-sizing: border-box;
}

.zenhb-booking-form {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Title */
.zenhb-booking-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

/* Wizard container */
.zenhb-booking-wizard {
    position: relative;
}

/* Step styles */
.zenhb-step {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.zenhb-step:hover {
    border-color: #007cba;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.1);
}

.zenhb-step h3 {
    color: #2c3e50;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
}

.zenhb-step-content {
    position: relative;
}

/* Form groups */
.zenhb-form-group {
    margin-bottom: 20px;
}

.zenhb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.zenhb-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.zenhb-form-group input,
.zenhb-form-group select {
    width: 100%;
    padding: 5px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.zenhb-form-group input:focus,
.zenhb-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.zenhb-form-group input:invalid,
.zenhb-form-group select:invalid {
    border-color: #dc3545;
}

/* Details display */
.zenhb-service-details,
.zenhb-doctor-details {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.zenhb-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 5px 0;
}

.zenhb-detail-item:last-child {
    margin-bottom: 0;
}

.zenhb-detail-item strong {
    color: #1976d2;
    font-weight: 600;
}

/* Appointment summary */
.zenhb-appointment-summary {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 6px;
    padding: 1px;
    margin: 10px 0;
}

.zenhb-appointment-summary h4 {
    color: #2e7d32;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.zenhb-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #c8e6c9;
}

.zenhb-summary-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.zenhb-summary-item strong {
    color: #2e7d32;
    font-weight: 600;
}

/* Step actions */
.zenhb-step-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Buttons */
.zenhb-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.zenhb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.zenhb-btn-primary {
    background: #007cba;
    color: #fff;
}

.zenhb-btn-primary:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.zenhb-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.zenhb-btn-secondary:hover:not(:disabled) {
    background: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Loading state */
.zenhb-loading {
    text-align: center;
    padding: 40px 20px;
}

.zenhb-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.zenhb-loading p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* Messages */
.zenhb-messages {
    margin: 20px 0;
}

.zenhb-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
    border-left: 4px solid;
}

.zenhb-message.success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.zenhb-message.error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.zenhb-message.warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.zenhb-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* Success modal */
.zenhb-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.zenhb-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.zenhb-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.zenhb-modal-header h3 {
    margin: 0;
    color: #28a745;
    font-size: 20px;
    font-weight: 600;
}

.zenhb-modal-body {
    padding: 25px;
}

.zenhb-modal-body p {
    margin: 0 0 15px 0;
    color: #495057;
    line-height: 1.6;
}

.zenhb-appointment-details {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.zenhb-appointment-details p {
    margin: 0;
    color: #2e7d32;
}

.zenhb-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    text-align: right;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

/* Responsive design */
@media (max-width: 768px) {
    .zenhb-booking-form {
        padding: 15px;
        margin: 10px;
    }
    
    .zenhb-step {
        padding: 20px;
    }
    
    .zenhb-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .zenhb-step-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .zenhb-btn {
        width: 100%;
        min-width: auto;
    }
    
    .zenhb-modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .zenhb-booking-title {
        font-size: 24px;
    }
    
    .zenhb-step h3 {
        font-size: 18px;
    }
    
    .zenhb-form-group input,
    .zenhb-form-group select {
        padding: 5px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Accessibility improvements */
.zenhb-btn:focus,
.zenhb-form-group input:focus,
.zenhb-form-group select:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .zenhb-booking-form {
        border: 2px solid #000;
    }
    
    .zenhb-step {
        border: 2px solid #000;
    }
    
    .zenhb-btn {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .zenhb-step,
    .zenhb-btn,
    .zenhb-spinner {
        transition: none;
        animation: none;
    }
    
    .zenhb-btn:hover:not(:disabled) {
        transform: none;
    }
}

/* Shortcode Styles */
.zenhb-services-list,
.zenhb-doctors-list,
.zenhb-service-details {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.zenhb-services-list h3,
.zenhb-doctors-list h3,
.zenhb-service-details h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #007cba;
}

.zenhb-services-grid,
.zenhb-doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.zenhb-service-item,
.zenhb-doctor-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.zenhb-service-item:hover,
.zenhb-doctor-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-color: #007cba;
}

.zenhb-service-item h4,
.zenhb-doctor-item h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

.zenhb-service-item p {
    color: #6c757d;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.zenhb-service-price,
.zenhb-doctor-speciality,
.zenhb-doctor-facility {
    display: inline-block;
    padding: 6px 12px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
}

.zenhb-service-details {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.zenhb-service-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 16px;
}

.zenhb-service-price,
.zenhb-service-duration {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    color: #495057;
}

.zenhb-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    text-align: center;
    margin: 20px 0;
}

/* Responsive adjustments for shortcodes */
@media (max-width: 768px) {
    .zenhb-services-grid,
    .zenhb-doctors-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .zenhb-services-list,
    .zenhb-doctors-list,
    .zenhb-service-details {
        padding: 15px;
    }
    
    .zenhb-service-item,
    .zenhb-doctor-item {
        padding: 15px;
    }
}

/* Additional styles for services page */
.zenhb-service-type {
    display: inline-block;
    padding: 4px 8px;
    background: #e7f3ff;
    color: #0073aa;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

/* Availability Calendar Styles */
.zenhb-availability-calendar {
    margin: 20px 0;
}

.zenhb-calendar-header {
    text-align: center;
    margin-bottom: 20px;
}

.zenhb-calendar-header h4 {
    margin: 0 0 10px 0;
    color: #0073aa;
}

.zenhb-calendar-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.zenhb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.zenhb-calendar-day {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.zenhb-calendar-day.available {
    border-color: #28a745;
    background: #f8fff9;
    cursor: pointer;
}

.zenhb-calendar-day.available:hover {
    border-color: #20c997;
    background: #e8f5e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
}

.zenhb-calendar-day.unavailable {
    border-color: #dc3545;
    background: #fff8f8;
    cursor: not-allowed;
    opacity: 0.6;
}

.zenhb-calendar-day.selected {
    border-color: #0073aa;
    background: #e7f3ff;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

.zenhb-day-header {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.zenhb-day-number {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.zenhb-day-status {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.zenhb-calendar-day.available .zenhb-day-status {
    color: #28a745;
}

.zenhb-calendar-day.unavailable .zenhb-day-status {
    color: #dc3545;
}

.zenhb-calendar-day.selected .zenhb-day-status {
    color: #0073aa;
}

/* Time Slots Styles */
.zenhb-time-slots {
    margin: 20px 0;
}

.zenhb-time-slots-header {
    text-align: center;
    margin-bottom: 20px;
}

.zenhb-time-slots-header h4 {
    margin: 0;
    color: #0073aa;
}

.zenhb-time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.zenhb-time-slot {
    border: 2px solid #ddd;
    border-radius: 6px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.zenhb-time-slot:hover {
    border-color: #0073aa;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2);
}

.zenhb-time-slot.selected {
    border-color: #0073aa;
    background: #e7f3ff;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

.zenhb-time-start {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.zenhb-time-end {
    font-size: 12px;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .zenhb-calendar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .zenhb-calendar-day {
        padding: 10px 8px;
        min-height: 70px;
    }
    
    .zenhb-day-number {
        font-size: 16px;
    }
    
    .zenhb-time-slots-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .zenhb-time-slot {
        padding: 12px 8px;
    }
    
    .zenhb-time-start {
        font-size: 14px;
    }
}
