/**
 * Frontend Styles - Dr. Abdullah Al-Nouri Booking
 * Modern Blue Theme with Arabic RTL Support
 */

/* Reset & Base */
.dr-booking-container {
    direction: rtl;
    text-align: right;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 50%, #f0f7ff 100%);
    min-height: 100vh;
}

.dr-booking-container * {
    box-sizing: border-box;
}

/* Header */
.dr-booking-header {
    text-align: center;
    margin-bottom: 30px;
}

.dr-booking-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #0077cc;
    margin: 0 0 20px;
    text-shadow: 0 2px 4px rgba(0, 119, 204, 0.1);
}

/* Notice Box */
.dr-notice {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border: 1px solid #fecaca;
    border-right: 4px solid #ef4444;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.dr-notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.dr-notice-content strong {
    display: block;
    color: #dc2626;
    margin-bottom: 5px;
}

.dr-notice-content p {
    margin: 0;
    font-size: 14px;
    color: #7f1d1d;
    line-height: 1.6;
}

/* Progress Steps */
.dr-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.dr-steps-line {
    position: absolute;
    top: 22px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
}

.dr-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 120px;
}

.dr-step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dr-step.active .dr-step-number,
.dr-step.completed .dr-step-number {
    background: linear-gradient(135deg, #0077cc, #0099ff);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 119, 204, 0.3);
}

.dr-step.completed .dr-step-number::after {
    content: '✓';
    position: absolute;
}

.dr-step.completed .dr-step-number {
    font-size: 0;
}

.dr-step.completed .dr-step-number::after {
    font-size: 18px;
}

.dr-step-label {
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    text-align: center;
    transition: color 0.3s ease;
}

.dr-step.active .dr-step-label,
.dr-step.completed .dr-step-label {
    color: #0077cc;
}

/* Step Content */
.dr-step-content {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 119, 204, 0.08);
    padding: 30px;
    margin-bottom: 20px;
    min-height: 400px;
}

.dr-step-panel {
    display: none;
}

.dr-step-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dr-step-panel h2 {
    font-size: 18px;
    color: #1e3a5f;
    margin: 0 0 20px;
    font-weight: 600;
    line-height: 1.6;
}

.dr-subtitle {
    color: #64748b;
    font-size: 14px;
    margin: -10px 0 20px;
}

/* Service Selection */
.dr-service-selection {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dr-service-type label {
    display: block;
    font-weight: 500;
    color: #0077cc;
    margin-bottom: 8px;
}

.dr-service-dropdown {
    margin-bottom: 10px;
}

.dr-service-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0077cc;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dr-service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 119, 204, 0.15);
}

.dr-service-card.selected {
    background: linear-gradient(135deg, #0077cc 0%, #0099ff 100%);
    border-color: #0077cc;
}

.dr-service-card.selected * {
    color: #fff !important;
}

.dr-service-icon {
    font-size: 32px;
}

.dr-service-info {
    flex: 1;
}

.dr-service-info h3 {
    margin: 0 0 5px;
    font-size: 16px;
    color: #1e3a5f;
}

.dr-service-info p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.dr-service-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dr-service-card.selected .dr-service-check {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

/* Calendar Section */
.dr-calendar-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .dr-calendar-section {
        grid-template-columns: 1fr;
    }
}

.dr-mini-calendar {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
}

.dr-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.dr-cal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1e3a5f;
}

.dr-cal-nav {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #0077cc;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.dr-cal-nav:hover {
    background: #0066b3;
    transform: scale(1.05);
}

.dr-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.dr-cal-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    padding: 5px 0;
}

.dr-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.dr-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    border: 1px solid transparent;
}

.dr-cal-day:hover:not(.empty):not(.past):not(.unavailable) {
    background: #e0f2fe;
    border-color: #0077cc;
}

.dr-cal-day.today {
    border: 2px solid #0077cc;
}

.dr-cal-day.available {
    color: #0077cc;
    font-weight: 600;
}

.dr-cal-day.unavailable,
.dr-cal-day.past {
    color: #cbd5e1;
    cursor: not-allowed;
    text-decoration: line-through;
}

.dr-cal-day.selected {
    background: linear-gradient(135deg, #0077cc, #0099ff) !important;
    color: #fff !important;
    border-color: #0077cc;
    box-shadow: 0 4px 12px rgba(0, 119, 204, 0.3);
}

.dr-cal-day.empty {
    cursor: default;
}

/* Time Section */
.dr-time-section {
    display: flex;
    flex-direction: column;
}

.dr-selected-date {
    margin-bottom: 15px;
}

.dr-date-badge {
    display: inline-block;
    background: linear-gradient(135deg, #0077cc, #0099ff);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
}

.dr-time-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.dr-time-slot-btn {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    color: #1e3a5f;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.dr-time-slot-btn:hover {
    border-color: #0077cc;
    background: #f0f9ff;
}

.dr-time-slot-btn.selected {
    border-color: #0077cc;
    background: linear-gradient(135deg, #0077cc, #0099ff);
    color: #fff;
}

.dr-time-slot-btn.booked {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    text-decoration: line-through;
}

.dr-no-slots {
    text-align: center;
    color: #94a3b8;
    padding: 40px 20px;
    font-style: italic;
}

/* Gender Selection */
.dr-gender-selection {
    text-align: center;
    padding: 20px 0;
}

.dr-gender-selection h3 {
    font-size: 18px;
    color: #1e3a5f;
    margin-bottom: 30px;
}

.dr-gender-options {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.dr-gender-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px 50px;
    background: #fff;
    border: 3px solid #e2e8f0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dr-gender-btn:hover {
    border-color: #0077cc;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 119, 204, 0.15);
}

.dr-gender-btn.selected {
    border-color: #0077cc;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.dr-gender-icon {
    font-size: 48px;
}

.dr-gender-btn span:last-child {
    font-size: 18px;
    font-weight: 600;
    color: #1e3a5f;
}

/* Patient Form */
.dr-patient-form {
    animation: fadeIn 0.4s ease;
}

.dr-form-intro {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid #bae6fd;
}

.dr-form-intro p {
    margin: 8px 0;
    font-size: 15px;
    color: #0c4a6e;
    line-height: 1.8;
}

.dr-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dr-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .dr-form-row {
        grid-template-columns: 1fr;
    }
}

.dr-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dr-form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #1e3a5f;
}

.dr-form-group label .required {
    color: #ef4444;
}

.dr-input,
.dr-select,
.dr-textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #fff;
}

.dr-textarea {
    resize: vertical;
    min-height: 80px;
}

.dr-input:focus,
.dr-select:focus,
.dr-textarea:focus {
    outline: none;
    border-color: #0077cc;
    box-shadow: 0 0 0 4px rgba(0, 119, 204, 0.1);
}

.dr-form-note {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 15px 20px;
}

.dr-form-note p {
    margin: 5px 0;
    font-size: 13px;
    color: #92400e;
}

/* File Upload */
.dr-file-upload {
    position: relative;
    border: 2px dashed #0077cc;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    background: #f0f9ff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dr-file-upload:hover {
    background: #e0f2fe;
    border-color: #0066b3;
}

.dr-file-upload.dragover {
    background: #dbeafe;
    border-color: #0066b3;
    transform: scale(1.02);
}

.dr-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dr-file-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dr-upload-icon {
    font-size: 36px;
}

.dr-file-placeholder span {
    font-size: 14px;
    color: #0077cc;
}

.dr-file-placeholder small {
    font-size: 12px;
    color: #64748b;
}

.dr-uploaded-files {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.dr-uploaded-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.dr-uploaded-file img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

.dr-uploaded-file .file-name {
    font-size: 13px;
    color: #1e3a5f;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dr-uploaded-file .remove-file {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success Message */
.dr-success-message {
    text-align: center;
    padding: 40px 20px;
}

.dr-success-icon {
    font-size: 72px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.dr-success-message h2 {
    color: #059669;
    margin-bottom: 15px;
}

.dr-success-message p {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 30px;
}

.dr-booking-summary {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: right;
}

.dr-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.dr-summary-row:last-child {
    border-bottom: none;
}

.dr-summary-label {
    color: #64748b;
}

.dr-summary-value {
    font-weight: 600;
    color: #1e3a5f;
}

.dr-btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.dr-btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.4);
    color: #fff;
}

.dr-whatsapp-icon {
    font-size: 24px;
}

/* Navigation Buttons */
.dr-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.dr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 35px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.dr-btn-primary {
    background: linear-gradient(135deg, #0077cc, #0099ff);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 119, 204, 0.3);
}

.dr-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 119, 204, 0.4);
}

.dr-btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.dr-btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.dr-btn-secondary:hover {
    background: #e2e8f0;
}

/* Loading State */
.dr-loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.dr-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top-color: #0077cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar Styling */
.dr-time-slots::-webkit-scrollbar {
    width: 6px;
}

.dr-time-slots::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.dr-time-slots::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.dr-time-slots::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .dr-booking-container {
        padding: 15px 10px;
    }
    
    .dr-booking-header h1 {
        font-size: 22px;
    }
    
    .dr-steps {
        gap: 0;
        padding: 0 10px;
    }
    
    .dr-step-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .dr-step-label {
        font-size: 11px;
    }
    
    .dr-steps-line {
        left: 12%;
        right: 12%;
        top: 18px;
    }
    
    .dr-step-content {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .dr-step-panel h2 {
        font-size: 16px;
    }
    
    .dr-calendar-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dr-mini-calendar {
        padding: 15px;
    }
    
    .dr-cal-weekdays span {
        font-size: 9px;
    }
    
    .dr-cal-day {
        font-size: 12px;
    }
    
    .dr-cal-nav {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .dr-cal-header h3 {
        font-size: 15px;
    }
    
    .dr-gender-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .dr-gender-btn {
        padding: 20px 30px;
        flex-direction: row;
        justify-content: center;
    }
    
    .dr-gender-icon {
        font-size: 32px;
    }
    
    .dr-gender-btn span:last-child {
        font-size: 16px;
    }
    
    .dr-form-intro {
        padding: 15px;
    }
    
    .dr-form-intro p {
        font-size: 13px;
    }
    
    .dr-input,
    .dr-select,
    .dr-textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .dr-file-upload {
        padding: 20px 15px;
    }
    
    .dr-upload-icon {
        font-size: 28px;
    }
    
    .dr-file-placeholder span {
        font-size: 12px;
    }
    
    .dr-nav-buttons {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .dr-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .dr-time-slot-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .dr-date-badge {
        font-size: 13px;
        padding: 8px 16px;
    }
    
    .dr-success-icon {
        font-size: 56px;
    }
    
    .dr-success-message h2 {
        font-size: 20px;
    }
    
    .dr-success-message p {
        font-size: 14px;
    }
    
    .dr-btn-whatsapp {
        padding: 14px 30px;
        font-size: 16px;
    }
    
    .dr-booking-summary {
        padding: 15px;
    }
    
    .dr-uploaded-files {
        flex-direction: column;
    }
    
    .dr-uploaded-file {
        width: 100%;
    }
    
    .dr-uploaded-file .file-name {
        max-width: none;
        flex: 1;
    }
    
    .dr-form-note {
        padding: 12px 15px;
    }
    
    .dr-form-note p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .dr-booking-container {
        padding: 10px 8px;
    }
    
    .dr-step-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .dr-step-label {
        font-size: 10px;
    }
    
    .dr-step-content {
        padding: 15px 12px;
        border-radius: 16px;
    }
    
    .dr-gender-btn {
        padding: 15px 20px;
    }
    
    .dr-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Booked Time Slots - Disabled with Strikethrough */
.dr-time-slot-btn.dr-slot-booked {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.7;
}

.dr-time-slot-btn.dr-slot-booked:hover {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    transform: none !important;
}

.dr-time-slot-btn.dr-slot-booked .dr-slot-time {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 14px;
}

.dr-time-slot-btn.dr-slot-booked .dr-slot-status {
    font-size: 10px;
    color: #ef4444;
    font-weight: 600;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 10px;
    text-decoration: none;
}

/* Form Validation Error Styles */
.dr-input.dr-error,
.dr-select.dr-error,
.dr-textarea.dr-error {
    border-color: #ef4444 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.dr-input.dr-error:focus,
.dr-select.dr-error:focus,
.dr-textarea.dr-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2) !important;
}

/* Shake Animation */
@keyframes dr-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.dr-shake {
    animation: dr-shake 0.5s ease-in-out;
}

/* Required Field Indicator */
.required {
    color: #ef4444;
    font-weight: bold;
}

