/* Availability: misma barra que Events (calendarNavigation) */
.schedule-availability-section .calendarNavigation {
    margin-bottom: 20px !important;
}

.schedule-availability-section .nav-center {
    flex: 1 !important;
    max-width: 520px !important;
    margin: 0 15px !important;
}

.schedule-nav-left-spacer {
    min-width: 130px;
}

.schedule-availability-section .btn-add-schedule {
    margin-right: 0 !important;
}

.schedule-availability-panel {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    padding: 16px 18px 18px;
}

.body-list-calendar-schedule {
    padding-top: 0;
}

.schedule-cards-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 0;
}

.schedule-cards-list .schedule-card-col {
    width: 100%;
    max-width: 100%;
}

.schedule-empty-results {
    grid-column: 1 / -1;
    width: 100%;
    color: #6c757d;
    font-size: 15px;
}

@media (max-width: 768px) {
    .schedule-availability-section .calendarNavigation {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    .schedule-nav-left-spacer {
        display: none !important;
    }

    .schedule-availability-section .nav-center {
        max-width: 100% !important;
        margin: 0 !important;
        flex: 1 1 100% !important;
    }

    .schedule-availability-section .nav-right {
        width: 100% !important;
        justify-content: flex-end !important;
    }
}

.search-list-calendar-schedule{
    display: flex;
    justify-content: space-between;
}

.checkbox-calendar-schedule:not(.schedule-day-checkbox) {
    display: none;
}

.checkbox-calendar-schedule + .form-check-label {
    display: inline-flex;
    margin: 6px;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: #374151;
    position: relative;
}

.checkbox-calendar-schedule + .form-check-label::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #9ca3af;
    border-radius: 6px;
    margin-right: 12px;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkbox-calendar-schedule:checked + .form-check-label::before {
    background: #3b82f6;
    border-color: #3b82f6;
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Estado seleccionado */
.checkbox-calendar-schedule:checked + .form-check-label {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.checkbox-calendar-schedule + .form-check-label:hover {
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.1);
}

.checkbox-calendar-schedule:focus + .form-check-label {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Active state */
.checkbox-calendar-schedule:active + .form-check-label {
    transform: scale(0.98);
}

.checkbox-calendar-schedule:checked + .form-check-label { 
    background: #eff6ff; 
    border-color: #3b82f6; 
    color: #1d4ed8; 
}

@media (max-width: 768px) {
    .checkbox-calendar-schedule + .form-check-label {
        padding: 10px 16px;
        font-size: 14px;
        margin: 4px;
    }
    
    .form-check-inline {
        margin-right: 4px !important;
    }
}

@keyframes gentleBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.checkbox-calendar-schedule:checked + .form-check-label {
    animation: gentleBounce 0.3s ease;
}

.days-checkbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.calendarNavControlsSchedule{
    display: flex;
    justify-content: space-between;
    align-content: center;
    align-items: center;
    flex-direction: row-reverse;
}


/* Schedule cards grid (Availability tab) */
.schedule-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    padding: 8px 0 16px;
}

.schedule-card-col {
    min-width: 0;
}

.schedule-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.schedule-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.schedule-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 10px;
}

.schedule-card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.schedule-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Badge calendario vinculado: azul claro uniforme (Calendar NDA) */
.schedule-badge-calendar,
.schedule-card-badge[class*="schedule-badge-"] {
    background: #e8f0f6;
    color: #4d6278;
}

.schedule-badge-calendar .schedule-badge-dot,
.schedule-card-badge[class*="schedule-badge-"] .schedule-badge-dot {
    background: #8fa3b8;
}

.schedule-card-body {
    padding: 0 18px 12px;
    flex: 1;
}

.schedule-card-days {
    margin-bottom: 8px;
}

.schedule-day-line {
    font-size: 14px;
    color: #495057;
    line-height: 1.55;
    margin-bottom: 2px;
}

.schedule-day-name {
    font-weight: 600;
    color: #343a40;
}

.schedule-day-time {
    color: #6c757d;
}

.schedule-day-line-empty {
    color: #adb5bd;
    font-style: italic;
}

.schedule-more-days {
    font-size: 13px;
    color: #adb5bd;
    margin-top: 4px;
}

.schedule-card-duration {
    margin: 8px 0 0;
    font-size: 13px;
    color: #adb5bd;
}

.schedule-card-calendar-label {
    margin: 4px 0 0;
    font-size: 12px;
    color: #ced4da;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
}

.schedule-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px 16px;
    border-top: 1px solid #edf2f7;
    margin-top: auto;
}

.schedule-card-footer-left,
.schedule-card-footer-right,
.div-card-calendar-schedule {
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-card-footer-right {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    flex-shrink: 0;
}

.div-card-calendar-schedule{
    display: flex;
}

.btn-booking-view {
    background-color: #0e5581 !important; 
    color: #ffffff !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    padding: 8px 16px;
    border: none;
    transition: all 0.2s ease;
}

.btn-booking-view:hover {
    background-color: #0a4468 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}


.btn-icon-calendar {
    background-color: #f8f9fa; 
    border: 1px solid #e2e8f0;
    color: #94a3b8;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-icon-calendar:hover {
    background-color: #edf2f7;
    color: #4a5568;
    border-color: #cbd5e0;
}

.btn-delete-hover:hover {
    color: #e53e3e !important;
    background-color: #fff5f5;
    border-color: #feb2b2;
}

.card-calendar-schedule-element {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.card-title-calendar {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #2d3748;
}

.hr-calendar {
    border-top: 1px solid #edf2f7;
    margin: 15px 0;
}

#qrCanvasImageBuilder {
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

#container-qr-calendar canvas {
    border-radius: 4px;
}

#container-qr-calendar img {
    display: none !important;
}

#container-qr-calendar canvas {
    display: block !important;
    margin: 0 auto;
    max-width: 100%;
    height: auto !important;
}

/* Schedule QR modal */
#qr_code_save_modal.modal {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 1060;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

#qr_code_save_modal .modal-dialog-schedule-qr {
    max-width: 480px;
    width: calc(100% - 24px);
    margin: 24px auto;
    box-sizing: border-box;
    position: relative;
}

.schedule-qr-modal-content {
    border-radius: 14px;
    border: none;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.schedule-qr-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    padding: 20px 44px 14px 20px;
    border-bottom: 1px solid #edf2f7;
}

.schedule-qr-modal-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    word-break: break-word;
}

.schedule-qr-modal-close {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    margin: 0 !important;
    padding: 0;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    opacity: 0.45;
}

.schedule-qr-modal-body {
    padding: 18px 20px 20px;
    text-align: center;
    box-sizing: border-box;
    overflow-x: hidden;
}

.schedule-qr-modal-hint {
    margin: 0 0 16px;
    font-size: 14px;
    color: #adb5bd;
    line-height: 1.5;
}

.schedule-qr-code-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    margin: 0 auto 16px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    width: 100%;
    max-width: 280px;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}

.schedule-qr-code-wrap canvas,
.schedule-qr-code-wrap img {
    display: block !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
}

.schedule-qr-link-label {
    margin: 0 0 8px;
    font-size: 14px;
    color: #adb5bd;
    font-weight: 500;
}

.schedule-qr-link-box {
    background: #f8f9fa;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.45;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: left;
    max-width: 100%;
    box-sizing: border-box;
    max-height: 96px;
    overflow-y: auto;
}

.schedule-qr-modal-footer {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px 20px;
    box-sizing: border-box;
}

.btn-schedule-qr-copy,
.btn-schedule-qr-download {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-schedule-qr-copy {
    background: #fff;
    border: 1.5px solid #dee2e6;
    color: #495057;
}

.btn-schedule-qr-copy:hover {
    background: #f8f9fa;
    border-color: #ced4da;
    color: #343a40;
}

.btn-schedule-qr-download {
    background: #0e5581;
    border: 1.5px solid #0e5581;
    color: #fff;
}

.btn-schedule-qr-download:hover {
    background: #0a4468;
    border-color: #0a4468;
    color: #fff;
}

@media (max-width: 767px) {
    #qr_code_save_modal .modal-dialog-schedule-qr {
        width: calc(100% - 16px) !important;
        max-width: 100% !important;
        margin: 12px auto !important;
    }

    #qr_code_save_modal .schedule-qr-modal-header {
        padding: 16px 40px 12px 14px;
    }

    #qr_code_save_modal .schedule-qr-modal-title {
        font-size: 17px;
    }

    #qr_code_save_modal .schedule-qr-modal-body {
        padding: 14px 14px 16px;
    }

    #qr_code_save_modal .schedule-qr-modal-hint {
        font-size: 13px;
        margin-bottom: 14px;
    }

    #qr_code_save_modal .schedule-qr-code-wrap {
        max-width: min(260px, 100%);
        padding: 10px;
        margin-bottom: 14px;
    }

    #qr_code_save_modal .schedule-qr-link-box {
        font-size: 12px;
        padding: 10px 12px;
        max-height: 80px;
    }

    #qr_code_save_modal .schedule-qr-modal-footer {
        flex-direction: column;
        padding: 0 14px 16px;
        gap: 8px;
    }

    #qr_code_save_modal .btn-schedule-qr-copy,
    #qr_code_save_modal .btn-schedule-qr-download {
        flex: none;
        width: 100%;
        min-height: 42px;
        font-size: 14px;
    }
}

.custom-conflict-wrapper .select2-container--default .select2-selection--multiple {
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    padding: 2px !important;
}

/* Estilo de las etiquetas seleccionadas */
.custom-conflict-wrapper .select2-selection__choice {
    background-color: #e4e4e4 !important;
    border: 1px solid #aaa !important;
    border-radius: 4px !important;
    padding: 0 5px !important;
    margin: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* El botón 'x' para eliminar */
.custom-conflict-wrapper .select2-selection__choice__remove {
    margin-right: 5px !important;
    color: #999 !important;
    border: none !important;
}

/* Create / Edit Availability Schedule modal
   Width is scoped to #modalCalendarSchedule only so other CRM/profile modals stay untouched.
   Reinforced against page-level .modal-content max-width (e.g. user_media.css). */
#modalCalendarSchedule .modal-dialog,
#modalCalendarSchedule .modal-dialog.modal-dialog-schedule-premium {
    max-width: 1040px !important;
    width: 94% !important;
    margin: 10px auto !important;
    box-sizing: border-box;
    padding: 0 10px;
}

#modalCalendarSchedule.modal {
    width: auto !important;
    max-width: none !important;
}

#modalCalendarSchedule .modal-content.schedule-modal-content,
#modalCalendarSchedule .schedule-modal-content {
    border-radius: 12px;
    border: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 80px);
    padding: 0;
    width: 100% !important;
    max-width: none !important;
}

#modalCalendarSchedule .schedule-modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px 28px;
    align-items: center;
}

#modalCalendarSchedule .schedule-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

#modalCalendarSchedule .schedule-modal-close {
    margin: -29px 0 0 0;
    padding: 0;
    font-size: 24px;
    line-height: 1;
    opacity: 0.5;
}

#modalCalendarSchedule .schedule-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 !important;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

#modalCalendarSchedule .schedule-modal-body-inner {
    padding: 24px 20px 20px;
    box-sizing: border-box;
}

#modalCalendarSchedule .schedule-modal-layout {
    margin: 0;
    padding: 0;
}

#modalCalendarSchedule .schedule-modal-col-right {
    padding-right: 0 !important;
}

#modalCalendarSchedule .schedule-modal-col {
    padding: 0 12px;
}

#modalCalendarSchedule .schedule-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 16px;
}

#modalCalendarSchedule .schedule-section-title-spaced {
    margin-top: 8px;
}

#modalCalendarSchedule .schedule-section-title-inline {
    margin-bottom: 12px;
}

#modalCalendarSchedule .schedule-appointment-details-block {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #eef1f4;
}

#modalCalendarSchedule .schedule-form-group {
    margin-bottom: 18px;
}

#modalCalendarSchedule .schedule-form-group-compact {
    margin-bottom: 12px;
}

#modalCalendarSchedule .schedule-form-group-last {
    margin-bottom: 0;
}

#modalCalendarSchedule .schedule-modal-col-left .schedule-desc-textarea {
    min-height: 72px;
}

#modalCalendarSchedule .schedule-conflict-block {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eef1f4;
}

#modalCalendarSchedule .schedule-conflict-block .schedule-field-hint {
    margin: 0 0 6px;
    font-size: 12px;
}

#modalCalendarSchedule .schedule-conflict-block .select2-container--default .select2-selection--multiple {
    min-height: 38px !important;
    max-height: 80px;
    overflow-y: auto;
}

#modalCalendarSchedule .schedule-input-premium {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    height: 42px;
    padding: 8px 12px;
    box-shadow: none;
}

#modalCalendarSchedule .schedule-input-premium:focus {
    border-color: #0e5581;
    box-shadow: 0 0 0 2px rgba(14, 85, 129, 0.12);
}

#modalCalendarSchedule textarea.schedule-input-premium,
#modalCalendarSchedule .schedule-desc-textarea {
    height: auto;
    min-height: 88px;
    resize: vertical;
}

#modalCalendarSchedule .schedule-field-hint {
    font-size: 13px;
    color: #6c757d;
    margin: -6px 0 8px;
}

#modalCalendarSchedule .schedule-custom-duration {
    margin-top: 12px;
}

#modalCalendarSchedule .schedule-recurrence-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

#modalCalendarSchedule .schedule-recurrence-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

#modalCalendarSchedule .schedule-recurrence-pill {
    padding: 9px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

#modalCalendarSchedule .schedule-recurrence-pill:hover {
    border-color: #0e5581;
}

#modalCalendarSchedule .schedule-recurrence-pill.active {
    background: #0e5581;
    border-color: #0e5581;
    color: #fff;
}

#modalCalendarSchedule .schedule-end-date-field {
    flex: 1;
    min-width: 160px;
    max-width: 200px;
}

#modalCalendarSchedule .schedule-weekly-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#modalCalendarSchedule .schedule-week-day-row {
    display: grid;
    grid-template-columns: 48px 92px 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

#modalCalendarSchedule .schedule-week-day-row.is-disabled {
    background: #f0f2f5;
}

#modalCalendarSchedule .schedule-week-day-row.is-day-active {
    background: #fff;
}

#modalCalendarSchedule .schedule-week-day-name {
    font-size: 14px;
    font-weight: 400;
    color: #8e9196;
    transition: color 0.2s ease, font-weight 0.2s ease;
}

#modalCalendarSchedule .schedule-week-day-row.is-disabled .schedule-week-day-name {
    color: #8e9196;
    font-weight: 400;
}

#modalCalendarSchedule .schedule-week-day-row.is-day-active .schedule-week-day-name,
#modalCalendarSchedule .schedule-week-day-row:has(.schedule-day-checkbox:checked) .schedule-week-day-name,
#modalCalendarSchedule .schedule-week-day-name.is-day-name-active {
    color: #000000;
    font-weight: 700;
}

#modalCalendarSchedule .schedule-week-day-name.is-day-name-inactive {
    color: #8e9196;
    font-weight: 400;
}

#modalCalendarSchedule .schedule-day-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

#modalCalendarSchedule .schedule-day-switch .schedule-day-checkbox {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

#modalCalendarSchedule .schedule-switch-track {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 24px;
    transition: background 0.2s ease;
    pointer-events: none;
}

#modalCalendarSchedule .schedule-switch-track::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

#modalCalendarSchedule .schedule-switch-track.is-on,
#modalCalendarSchedule .schedule-week-day-row.is-day-active .schedule-switch-track,
#modalCalendarSchedule .schedule-day-checkbox:checked + .schedule-switch-track {
    background: #0e5581 !important;
}

#modalCalendarSchedule .schedule-switch-track.is-on::before,
#modalCalendarSchedule .schedule-week-day-row.is-day-active .schedule-switch-track::before,
#modalCalendarSchedule .schedule-day-checkbox:checked + .schedule-switch-track::before {
    transform: translateX(20px) !important;
}

#modalCalendarSchedule .schedule-week-times {
    display: flex;
    align-items: center;
    gap: 10px;
}

#modalCalendarSchedule .schedule-time-input {
    flex: 1 1 auto;
    min-width: 72px;
    height: 40px;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #eef0f3;
    color: #c4c9d0;
    text-align: center;
    cursor: not-allowed;
    box-shadow: none;
    box-sizing: border-box;
}

#modalCalendarSchedule .schedule-time-input::placeholder {
    color: #c4c9d0;
    opacity: 1;
}

#modalCalendarSchedule .schedule-week-day-row.is-day-active .schedule-time-input {
    background: #fff;
    border-color: #d1d5db;
    color: #374151;
    cursor: pointer;
}

#modalCalendarSchedule .schedule-week-day-row.is-day-active .schedule-time-input::placeholder {
    color: #9ca3af;
}

#modalCalendarSchedule .schedule-time-sep {
    color: #c4c9d0;
    font-size: 14px;
    flex-shrink: 0;
}

#modalCalendarSchedule .schedule-week-day-row.is-day-active .schedule-time-sep {
    color: #9ca3af;
}

#modalCalendarSchedule .schedule-time-input.schedule-time-disabled,
#modalCalendarSchedule .schedule-week-day-row.is-disabled .schedule-time-input {
    background: #eef0f3 !important;
    border-color: #e5e7eb !important;
    color: #c4c9d0 !important;
    cursor: not-allowed !important;
}

#modalCalendarSchedule .schedule-week-day-row.is-day-active .schedule-time-input:not(.schedule-time-disabled) {
    background: #fff !important;
    border-color: #d1d5db !important;
    color: #374151 !important;
    cursor: pointer !important;
}

#modalCalendarSchedule .schedule-modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 16px 28px 22px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #fff;
}

#modalCalendarSchedule .btn-schedule-cancel {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    border-radius: 6px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 15px;
}

#modalCalendarSchedule .btn-schedule-cancel:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
    color: #212529;
}

#modalCalendarSchedule .btn-schedule-save {
    background: #0e5581;
    border: 1px solid #0e5581;
    color: #fff;
    border-radius: 6px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 15px;
}

#modalCalendarSchedule .btn-schedule-save:hover {
    background: #0a4468;
    border-color: #0a4468;
    color: #fff;
}

#modalCalendarSchedule .custom-conflict-wrapper .select2-container--default .select2-selection--multiple {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    min-height: 42px !important;
}

@media (max-width: 991px) {
    #modalCalendarSchedule .modal-dialog {
        width: calc(100% - 16px) !important;
        max-width: 100% !important;
        margin: 8px auto !important;
        padding: 0 8px !important;
    }

    #modalCalendarSchedule .schedule-modal-body-inner {
        padding: 20px 16px 16px !important;
    }

    #modalCalendarSchedule .schedule-modal-layout {
        margin: 0 !important;
        padding: 0 !important;
    }

    #modalCalendarSchedule .schedule-modal-col {
        width: 100% !important;
        float: none !important;
    }

    #modalCalendarSchedule .schedule-week-day-row {
        grid-template-columns: 44px minmax(64px, 80px) minmax(0, 1fr);
        gap: 10px;
        padding: 8px 10px;
    }

    #modalCalendarSchedule .schedule-modal-col-right {
        margin-top: 24px;
    }

    #modalCalendarSchedule .note-editor,
    #modalCalendarSchedule .note-editable {
        max-width: 100%;
        box-sizing: border-box;
    }

    #modalCalendarSchedule .note-editor .note-toolbar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 767px) {
    #modalCalendarSchedule.modal {
        padding: 0 !important;
    }

    #modalCalendarSchedule .modal-dialog {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 8px !important;
        min-height: 100%;
    }

    #modalCalendarSchedule .schedule-modal-content {
        max-height: calc(100vh - 16px);
        border-radius: 10px;
    }

    #modalCalendarSchedule .schedule-modal-header {
        position: relative;
        padding: 14px 40px 14px 16px;
    }

    #modalCalendarSchedule .schedule-modal-title {
        font-size: 17px;
        line-height: 1.3;
        padding-right: 0;
    }

    #modalCalendarSchedule .schedule-modal-close {
        margin: 0 !important;
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
    }

    #modalCalendarSchedule .schedule-modal-body-inner {
        padding: 14px 12px 12px !important;
    }

    #modalCalendarSchedule .schedule-modal-col-right {
        margin-top: 20px !important;
    }

    #modalCalendarSchedule .schedule-week-day-row {
        grid-template-columns: 40px minmax(0, 1fr);
        grid-template-areas:
            "toggle name"
            "times times";
        gap: 8px 10px;
        align-items: center;
    }

    #modalCalendarSchedule .schedule-day-switch {
        grid-area: toggle;
    }

    #modalCalendarSchedule .schedule-week-day-name {
        grid-area: name;
    }

    #modalCalendarSchedule .schedule-week-times {
        grid-area: times;
        width: 100%;
        min-width: 0;
    }

    #modalCalendarSchedule .schedule-time-input {
        min-width: 64px;
        font-size: 13px;
        padding: 8px 6px;
    }

    #modalCalendarSchedule .schedule-recurrence-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    #modalCalendarSchedule .schedule-recurrence-pills {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    #modalCalendarSchedule .schedule-recurrence-pill {
        flex: 1 1 0;
        min-width: 0;
        padding: 9px 10px;
        font-size: 13px;
        text-align: center;
    }

    #modalCalendarSchedule .schedule-end-date-field {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    #modalCalendarSchedule .schedule-modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 8px;
        padding: 12px 14px 16px !important;
    }

    #modalCalendarSchedule .btn-schedule-cancel,
    #modalCalendarSchedule .btn-schedule-save {
        width: 100%;
        margin: 0;
    }

    #modalCalendarSchedule .note-editor .note-toolbar {
        gap: 4px !important;
        padding: 6px !important;
    }

    #modalCalendarSchedule .note-editor .note-toolbar .note-btn {
        padding: 5px 8px !important;
        font-size: 12px !important;
    }

    #modalCalendarSchedule .custom-conflict-wrapper .select2-container {
        width: 100% !important;
        max-width: 100% !important;
    }
}
