/* ============================================================
   Appointment Booking — Full Width Responsive Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

/* ── RESET & FULL WIDTH WRAPPER ── */
#dac-booking-app {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #f5f9fc;
    box-sizing: border-box;
}

/* ── HEADER / STEPS ── */
.dac-steps-header {
    background: #fff;
    padding: 32px 5% 0;
    border-bottom: 1px solid #e8f4f8;
    width: 100%;
    box-sizing: border-box;
}

.dac-main-title {
    text-align: center;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 700;
    color: #0d7389;
    margin: 0 0 24px;
}

.dac-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0;
    gap: 0;
}

.dac-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.dac-step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #d1ecf1;
    color: #0d7389;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid #d1ecf1;
    transition: all 0.3s;
}

.dac-step.active .dac-step-circle {
    background: #00b4c8;
    color: #fff;
    border-color: #00b4c8;
    box-shadow: 0 0 0 5px rgba(0,180,200,0.15);
}

.dac-step.completed .dac-step-circle {
    background: #0d7389;
    color: #fff;
    border-color: #0d7389;
}

.dac-step-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
}

.dac-step.active .dac-step-label { color: #00b4c8; }

.dac-step-line {
    flex: 1;
    min-width: 60px;
    max-width: 180px;
    height: 2px;
    background: #d1ecf1;
    margin-bottom: 20px;
}

/* ── STEP CONTENT ── */
.dac-step-content {
    display: none;
    padding: 36px 5%;
    box-sizing: border-box;
    width: 100%;
}
.dac-step-content.active { display: block; }

.dac-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0d7389;
    margin-bottom: 16px;
}

/* ── SPECIALTIES GRID ── */
.dac-specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 14px;
    width: 100%;
}

.dac-specialty-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.dac-specialty-card:hover {
    border-color: #00b4c8;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,180,200,0.15);
}

.dac-specialty-card.selected {
    border-color: #00b4c8;
    background: #e0f7fa;
}

.dac-spec-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.dac-spec-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

/* ── DOCTORS ROW ── */
.dac-doctors-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.dac-doctor-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.dac-doctor-card input[type="checkbox"],
.dac-doctor-card input[type="radio"] { display: none; }

.dac-doctor-card.checked {
    border-color: #00b4c8;
    background: #e0f7fa;
}

.dac-doctor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #b2ebf2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 22px;
}

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

.dac-doctor-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.dac-check-badge {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 20px;
    height: 20px;
    background: #00b4c8;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
}

.dac-doctor-card.checked .dac-check-badge { display: flex; }

/* ── WARNING BOX ── */
.dac-warning-box {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 13px;
    color: #795548;
    margin-bottom: 20px;
    line-height: 1.7;
}

/* ── CALENDAR ── */
.dac-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.dac-month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: #0d7389;
    font-size: 15px;
}

.dac-nav-btn {
    background: #e0f7fa;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 20px;
    color: #00b4c8;
    line-height: 1;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dac-nav-btn:hover { background: #b2ebf2; }

.dac-calendar-week {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 24px;
    scrollbar-width: thin;
    scrollbar-color: #b2ebf2 transparent;
    -webkit-overflow-scrolling: touch;
}

.dac-calendar-week::-webkit-scrollbar { height: 4px; }
.dac-calendar-week::-webkit-scrollbar-track { background: transparent; }
.dac-calendar-week::-webkit-scrollbar-thumb { background: #b2ebf2; border-radius: 4px; }

.dac-day-cell {
    flex: 0 0 auto;
    width: clamp(64px, 9vw, 88px);
    padding: 12px 6px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.dac-day-cell:hover:not(.disabled) {
    border-color: #00b4c8;
    transform: translateY(-2px);
}

.dac-day-cell.today { border-color: #4dd0e1; background: #e0f7fa; }
.dac-day-cell.selected { border-color: #00b4c8; background: #00b4c8; color: #fff; }
.dac-day-cell.selected .dac-day-name,
.dac-day-cell.selected .dac-day-num { color: #fff; }
.dac-day-cell.disabled { opacity: 0.38; cursor: not-allowed; }

.dac-day-name {
    font-size: 11px;
    color: #888;
    font-weight: 600;
    margin-bottom: 6px;
}

.dac-day-num {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 700;
    color: #222;
}

/* ── SLOTS ── */
.dac-slots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.dac-toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

.dac-slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 70px;
    margin-bottom: 24px;
}

.dac-slot-btn {
    padding: 12px 20px;
    background: #fff;
    border: 2px solid #b2ebf2;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #0d7389;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.dac-slot-btn:hover {
    background: #e0f7fa;
    border-color: #00b4c8;
    transform: translateY(-1px);
}

.dac-slot-btn.selected {
    background: #00b4c8;
    border-color: #00b4c8;
    color: #fff;
}

.dac-slot-btn .dac-doc-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #b2ebf2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    overflow: hidden;
    flex-shrink: 0;
}

.dac-no-slots {
    color: #888;
    font-size: 14px;
    padding: 20px;
    text-align: center;
    width: 100%;
}

/* ── BOOKING SUMMARY ── */
.dac-booking-summary {
    background: #e0f7fa;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 15px;
    color: #0d7389;
    margin-bottom: 24px;
    line-height: 1.9;
}

/* ── FORM ── */
.dac-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
}

.dac-form-group {
    margin-bottom: 18px;
}

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

.dac-form-group label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    margin-bottom: 7px;
}

.dac-form-group input,
.dac-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #b2ebf2;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s;
    direction: rtl;
}

.dac-form-group input:focus,
.dac-form-group textarea:focus {
    outline: none;
    border-color: #00b4c8;
    box-shadow: 0 0 0 3px rgba(0,180,200,0.1);
}

.dac-form-group input:disabled {
    background: #f5f9fc;
    color: #0d7389;
    font-weight: 600;
    border-color: #e0f7fa;
    cursor: default;
}

.dac-error-msg {
    color: #e53935;
    font-size: 14px;
    margin-bottom: 14px;
    font-weight: 600;
    padding: 10px 14px;
    background: #ffebee;
    border-radius: 8px;
    display: none;
}
.dac-error-msg:not(:empty) { display: block; }

/* ── ACTIONS ── */
.dac-step-actions {
    display: flex;
    gap: 14px;
    justify-content: flex-start;
    margin-top: 12px;
    flex-wrap: wrap;
}

.dac-btn-primary {
    background: #00b4c8;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 36px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,180,200,0.3);
}
.dac-btn-primary:hover {
    background: #0097a7;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,180,200,0.35);
}

.dac-btn-secondary {
    background: #f0f0f0;
    color: #555;
    border: none;
    border-radius: 10px;
    padding: 14px 36px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.dac-btn-secondary:hover { background: #e0e0e0; }

/* ── SUCCESS ── */
.dac-success-box {
    text-align: center;
    padding: 60px 20px;
}

.dac-success-icon { font-size: 72px; margin-bottom: 20px; }

.dac-success-box h3 {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 700;
    color: #0d7389;
    margin-bottom: 28px;
    line-height: 1.6;
}

/* ── LOADING ── */
.dac-loading {
    text-align: center;
    color: #00b4c8;
    padding: 24px;
    font-size: 15px;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── LARGE DESKTOP (1400px+) ── */
@media (min-width: 1400px) {
    .dac-steps-header,
    .dac-step-content {
        padding-left: 8%;
        padding-right: 8%;
    }
    .dac-specialties-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    .dac-slot-btn { font-size: 16px; padding: 13px 24px; }
}

/* ── TABLET (768px – 1024px) ── */
@media (max-width: 1024px) {
    .dac-steps-header,
    .dac-step-content { padding-left: 4%; padding-right: 4%; }

    .dac-specialties-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .dac-step-line { min-width: 40px; }
}

/* ── MOBILE LANDSCAPE / SMALL TABLET (600px – 768px) ── */
@media (max-width: 768px) {
    .dac-steps-header,
    .dac-step-content { padding-left: 4%; padding-right: 4%; }

    .dac-form-grid {
        grid-template-columns: 1fr;
    }

    .dac-form-group.full-width {
        grid-column: auto;
    }

    .dac-specialties-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }

    .dac-spec-icon { width: 52px; height: 52px; font-size: 22px; }

    .dac-step-circle { width: 36px; height: 36px; font-size: 14px; }
    .dac-step-label { font-size: 12px; }
    .dac-step-line { min-width: 30px; }

    .dac-btn-primary,
    .dac-btn-secondary { padding: 13px 28px; font-size: 15px; }

    .dac-step-actions { justify-content: stretch; }
    .dac-btn-primary,
    .dac-btn-secondary { flex: 1; text-align: center; }
}

/* ── MOBILE PORTRAIT (max 480px) ── */
@media (max-width: 480px) {
    .dac-steps-header { padding: 20px 4% 0; }
    .dac-step-content { padding: 20px 4%; }

    .dac-main-title { font-size: 20px; margin-bottom: 18px; }

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

    .dac-spec-icon { width: 46px; height: 46px; font-size: 20px; border-radius: 10px; }
    .dac-spec-name { font-size: 11px; }
    .dac-specialty-card { padding: 12px 4px; border-radius: 10px; }

    .dac-step-line { min-width: 20px; }
    .dac-step-circle { width: 32px; height: 32px; font-size: 13px; }
    .dac-step-label { font-size: 11px; }

    .dac-day-cell { width: 58px; padding: 10px 4px; border-radius: 10px; }
    .dac-day-name { font-size: 10px; }
    .dac-day-num { font-size: 18px; }

    .dac-slot-btn { font-size: 13px; padding: 10px 14px; }

    .dac-doctors-row { gap: 8px; }
    .dac-doctor-card { padding: 10px 12px; }
    .dac-doctor-avatar { width: 42px; height: 42px; }
    .dac-doctor-name { font-size: 11px; }

    .dac-btn-primary,
    .dac-btn-secondary {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

    .dac-step-actions { flex-direction: column-reverse; }

    .dac-booking-summary { font-size: 13px; }
    .dac-success-icon { font-size: 56px; }
}

/* ── VERY SMALL (max 360px) ── */
@media (max-width: 360px) {
    .dac-specialties-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .dac-spec-icon { width: 40px; height: 40px; font-size: 18px; }
    .dac-day-cell { width: 50px; }
}

/* Appointment status checker */
.dac-success-note{
    color:#607d8b;
    margin:10px 0 20px;
    line-height:1.7;
}
.dac-status-checker{
    margin-top:26px;
    padding:22px;
    border:1px solid #d5f3f7;
    border-radius:22px;
    background:#ffffff;
    box-shadow:0 10px 30px rgba(0,0,0,.04);
}
.dac-status-help{
    color:#607d8b;
    margin:8px 0 14px;
    line-height:1.8;
}
.dac-status-form{
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:12px;
    align-items:center;
}
.dac-status-form input{
    width:100%;
    padding:13px 14px;
    border:1px solid #b2ebf2;
    border-radius:14px;
    font-family:Cairo, sans-serif;
    font-size:15px;
}
.dac-status-result{
    display:none;
    margin-top:14px;
    padding:14px 16px;
    border-radius:14px;
    line-height:1.8;
}
.dac-status-result:not(:empty){display:block;}
.dac-status-result.status-pending{background:#fff8e1;color:#8a5a00;border:1px solid #ffe082;}
.dac-status-result.status-confirmed{background:#e8f5e9;color:#1b5e20;border:1px solid #a5d6a7;}
.dac-status-result.status-rejected,.dac-status-result.status-cancelled,.dac-status-result.error{background:#ffebee;color:#b71c1c;border:1px solid #ffcdd2;}
.dac-status-result.status-completed{background:#e3f2fd;color:#0d47a1;border:1px solid #90caf9;}
@media(max-width:768px){
    .dac-status-form{grid-template-columns:1fr;}
    .dac-status-form .dac-btn-primary{width:100%;}
}


/* ── Font Awesome icons inside specialty cards ── */
.dac-spec-icon i {
    font-size: 26px;
    line-height: 1;
}
@media (max-width: 600px) {
    .dac-spec-icon i { font-size: 22px; }
}
@media (max-width: 420px) {
    .dac-spec-icon i { font-size: 20px; }
}
@media (max-width: 360px) {
    .dac-spec-icon i { font-size: 18px; }
}

/* ── SVG icons inside specialty cards ── */
.dac-spec-icon svg {
    width: 1em;
    height: 1em;
    font-size: 26px;
    fill: currentColor;
}
@media (max-width: 600px) { .dac-spec-icon svg { font-size: 22px; } }
@media (max-width: 420px) { .dac-spec-icon svg { font-size: 20px; } }

/* ============================================================
   VISIT TYPE SELECT (v1.1.0)
   ============================================================ */
.dac-visit-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0f7fa;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: #333;
    direction: rtl;
    cursor: pointer;
    transition: border-color .2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300b4c8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 24px;
    padding-left: 40px;
}
.dac-visit-select:focus {
    outline: none;
    border-color: #00b4c8;
    box-shadow: 0 0 0 3px rgba(0,180,200,.15);
}
