/* Doctor Appointment — Public Styles */

#da-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.62);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    height: 100dvh;
    box-sizing: border-box;
}

#da-popup-overlay .da-popup-wrap {
    background: #fbfcfd;
    border: 1px solid #e4e9ef;
    border-radius: 22px;
    padding: 36px;
    width: 100%;
    max-width: 480px;
    position: relative;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    animation: daSlideIn 0.28s ease;
}

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

#da-popup-overlay .da-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #ffffff;
    border: 1px solid #dbe3eb;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0 0 1px;
}

#da-popup-overlay .da-popup-header {
    border-bottom: 1px solid #efefef;
    margin-bottom: 16px;
    padding-bottom: 14px;
}

#da-popup-overlay .da-popup-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #111;
    padding-right: 28px;
}

#da-popup-overlay .da-popup-subtitle {
    margin: 0;
    font-size: 13px;
    color: #888;
}

#da-popup-overlay .da-inline-message {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff4eb;
    border: 1px solid #ffd7b8;
    color: #9a3412;
    font-size: 12px;
    font-weight: 600;
}

#da-popup-overlay .da-form-error {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

#da-popup-overlay .da-field-group {
    margin-bottom: 16px;
}

#da-popup-overlay .da-label {
    display: block !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #333 !important;
    margin-bottom: 8px !important;
}

#da-popup-overlay .da-section-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #666;
    margin-bottom: 8px;
}

#da-popup-overlay .da-required {
    color: #e00;
}

#da-popup-overlay .da-doctor-display {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: #f4f7fb !important;
    border: 1px solid #dbe4ee !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
}

#da-popup-overlay .da-doctor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #d7e7f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    overflow: hidden;
}

#da-popup-overlay .da-doctor-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#da-popup-overlay .da-doctor-avatar-text {
    display: inline-block;
}

#da-popup-overlay .da-doctor-meta {
    display: flex;
    flex-direction: column;
}

#da-popup-overlay .da-doctor-name {
    font-size: 15px;
    color: #102a43;
}

#da-popup-overlay .da-doctor-specialty {
    font-size: 12px;
    color: #6a7a8a;
}

#da-popup-overlay .da-input {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    width: 100% !important;
    height: 46px !important;
    padding: 0 13px !important;
    border: 1.5px solid #d6dce5 !important;
    border-radius: 8px !important;
    color: #222 !important;
    background: #fff !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#da-popup-overlay .da-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

#da-popup-overlay .da-input-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    color: #8a97a8;
    pointer-events: none;
}

#da-popup-overlay .da-input-with-icon {
    padding-left: 38px !important;
}

#da-popup-overlay .da-input-age {
    padding-right: 44px !important;
}

#da-popup-overlay .da-input-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #8893a3;
}

#da-popup-overlay .da-input-phone .da-input-prefix {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #667084;
    border-right: 1px solid #d9dfe8;
    padding-right: 10px;
    z-index: 1;
    font-weight: 600;
    letter-spacing: 0.2px;
}

#da-popup-overlay .da-input-phone .da-input {
    padding-left: 98px !important;
}

#da-popup-overlay .da-input:focus {
    outline: none;
    border-color: #0f9aa8 !important;
    box-shadow: 0 0 0 3px rgba(15, 154, 168, 0.12) !important;
}

#da-popup-overlay .da-input-sm {
    max-width: 120px;
}

#da-popup-overlay .da-age-row {
    display: flex;
    align-items: center;
    gap: 0;
}

#da-popup-overlay .da-age-row .da-input-wrap {
    width: 100%;
}

#da-popup-overlay .da-inline-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: end;
}

#da-popup-overlay #da-days-container.da-radio-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

#da-popup-overlay #da-shift-container.da-radio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

#da-popup-overlay .da-radio-card {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 58px !important;
    border: 1px solid #d7dee8 !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #1e2d3d !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

#da-popup-overlay .da-radio-card input[type="radio"] {
    display: none;
}

#da-popup-overlay .da-radio-card:hover:not(.da-unavailable) {
    border-color: #12a6ad !important;
}

#da-popup-overlay .da-radio-card.da-selected {
    border-color: #12a6ad !important;
    background: #12a6ad !important;
}

#da-popup-overlay .da-radio-card.da-selected .da-day-name,
#da-popup-overlay .da-radio-card.da-selected .da-day-date {
    color: #ffffff !important;
}

#da-popup-overlay .da-radio-card.da-unavailable {
    background: #f1f1f1 !important;
    color: #999 !important;
    text-decoration: line-through;
    cursor: not-allowed !important;
}

#da-popup-overlay .da-day-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
}

#da-popup-overlay .da-day-name {
    font-size: 10px;
    color: #7f8a99;
    margin-bottom: 4px;
}

#da-popup-overlay .da-day-date {
    font-size: 16px;
    font-weight: 700;
    color: #222f3d;
}

#da-popup-overlay .da-shift-card {
    display: flex !important;
    flex-direction: column !important;
    border: 1.5px solid #d9e1ea !important;
    border-radius: 10px !important;
    padding: 11px 12px !important;
    background: #fff !important;
    cursor: pointer !important;
    transition: all 0.18s ease;
    text-align: center;
}

#da-popup-overlay .da-shift-card:hover {
    border-color: #12a6ad !important;
    background: #f3f9ff !important;
}

#da-popup-overlay .da-shift-card.da-shift-selected {
    border-color: #12a6ad !important;
    background: #e8fbfc !important;
}

#da-popup-overlay .da-shift-card input[type="radio"] {
    display: none;
}

#da-popup-overlay .da-shift-card .da-shift-name {
    font-size: 14px;
    font-weight: 600;
    color: #13253a;
}

#da-popup-overlay .da-shift-card .da-shift-time {
    font-size: 12px;
    color: #687385;
    margin-top: 3px;
}

#da-popup-overlay .da-shift-card .da-shift-icon {
    font-size: 18px;
    margin-bottom: 5px;
}

#da-popup-overlay .da-radio-inline {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

#da-popup-overlay .da-radio-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 44px;
    border-radius: 10px;
    border: 1px solid #d5deea;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
}

#da-popup-overlay .da-radio-label input[type="radio"] {
    display: none;
}

#da-popup-overlay .da-radio-label.da-selected {
    border-color: #12a6ad;
    background: #e8fbfc;
    color: #0d8187;
}

#da-popup-overlay .da-gender-icon {
    margin-right: 4px;
    font-size: 14px;
}

#da-popup-overlay .da-submit-btn {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: 0.3px !important;
    text-transform: none !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #18b2be, #0f9aa8) !important;
    background-color: #12a6ad !important;
    border: none !important;
    width: 100% !important;
    height: 50px !important;
    padding: 13px 20px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    display: block !important;
    box-sizing: border-box !important;
    transition: transform 0.15s ease, filter 0.15s ease;
}

#da-popup-overlay .da-submit-btn .da-submit-text::before {
    content: "📅";
    margin-right: 8px;
}

#da-popup-overlay .da-submit-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

#da-popup-overlay .da-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed !important;
}

#da-popup-overlay .da-success-state {
    text-align: center;
    padding: 34px 16px 14px;
}

#da-popup-overlay .da-success-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    background: #e9fbef;
    border: 1px solid #beeecf;
}

#da-popup-overlay .da-success-title {
    margin: 0 0 8px;
    font-size: 22px;
    color: #111827;
}

#da-popup-overlay .da-success-text {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* Toast notification */
.da-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1a7f3c;
    color: #fff;
    padding: 13px 28px;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    z-index: 9999999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
}

.da-toast.da-toast-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Pending notice (replaces button area) */
.da-pending-notice {
    display: inline-block;
    background: #fff8e1;
    border: 1px solid #f5c518;
    color: #7a5400;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
    max-width: 340px;
}

/* Loading */
.da-loading {
    color: #888;
    font-size: 13px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 480px) {
    #da-popup-overlay {
        align-items: flex-start;
        padding: 10px;
    }

    #da-popup-overlay .da-popup-wrap {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 20px);
        border-radius: 16px;
        padding: 20px 16px;
    }

    #da-popup-overlay #da-days-container.da-radio-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 4px;
    }

    #da-popup-overlay .da-radio-card {
        height: 54px !important;
        border-radius: 10px !important;
        padding: 0 2px;
    }

    #da-popup-overlay .da-day-name {
        font-size: 9px;
    }

    #da-popup-overlay .da-day-date {
        font-size: 14px;
    }

    #da-popup-overlay #da-shift-container.da-radio-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    #da-popup-overlay .da-shift-card {
        padding: 9px 6px !important;
    }

    #da-popup-overlay .da-shift-card .da-shift-name {
        font-size: 12px;
    }

    #da-popup-overlay .da-shift-card .da-shift-time {
        font-size: 10px;
    }

    #da-popup-overlay .da-inline-two {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    #da-popup-overlay .da-input-phone .da-input-prefix {
        font-size: 11px;
        padding-right: 7px;
    }

    #da-popup-overlay .da-input-phone .da-input {
        padding-left: 88px !important;
    }
}

/* Elementor button overflow safety */
.da-appointment-wrap .da-appointment-btn {
    max-width: 100% !important;
    box-sizing: border-box;
    white-space: normal;
}
