/* home-date-time-modal.css - дата/время, режимы, dropdowns, документы и расширенный UI калькулятора */

/* ==================== 16. МОДАЛЬНОЕ ОКНО ВЫБОРА ДАТЫ И ВРЕМЕНИ ==================== */
.date-time-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.date-time-modal.active {
    display: flex;
}

.date-time-modal.closing {
    display: flex;
}

.date-time-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
}

.date-time-modal.active .date-time-modal__overlay {
    animation: dateTimeModalFadeIn 0.3s ease forwards;
}

.date-time-modal.closing .date-time-modal__overlay {
    animation: dateTimeModalFadeOut 0.3s ease forwards;
}

.date-time-modal__container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin-left: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    opacity: 0;
}

.date-time-modal.active .date-time-modal__container {
    animation: dateTimeModalSlideInRight 0.3s ease forwards;
}

.date-time-modal.closing .date-time-modal__container {
    animation: dateTimeModalSlideOutRight 0.3s ease forwards;
}

.date-time-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.date-time-modal__title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
}

.date-time-modal__title i {
    font-size: 20px;
}

.date-time-modal__close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
}

.date-time-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.date-time-modal__content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* Информационные карточки */
.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.info-card {
    background: #f7fafc;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.info-card i {
    font-size: 20px;
    margin-bottom: 8px;
    display: block;
}

.info-card .card-label {
    font-weight: 600;
    font-size: 14px;
}

.info-card .card-value {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
}

/* Пояснение */
.info-note {
    background-color: #fffaf0;
    border-left: 4px solid #ed8936;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.info-note i {
    color: #ed8936;
    margin-right: 8px;
}

.info-note strong {
    font-weight: 600;
}

.month-selection {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.month-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e3e8ef;
    background: white;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.month-nav-btn:not(:disabled):hover {
    border-color: #3498db;
    color: #3498db;
    transform: scale(1.1);
}

.month-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.current-month {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    flex: 1;
}

.calendar-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.week-day {
    text-align: center;
    font-weight: 600;
    color: #718096;
    font-size: 14px;
    padding: 8px 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    min-height: 240px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
    background: white;
    border: 2px solid transparent;
    position: relative;
}

.calendar-day:hover:not(.calendar-day.disabled):not(.calendar-day.selected) {
    background: #f7fafc;
    border-color: #e2e8f0;
}

.calendar-day.today {
    background: #ebf8ff;
    color: #3182ce;
    font-weight: 600;
    border: 2px solid #90cdf4;
}

.calendar-day.selected {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    border: 2px solid #2980b9;
    z-index: 1;
}

.calendar-day.disabled {
    color: #cbd5e0;
    cursor: not-allowed;
    background: #f7fafc;
}

.calendar-day.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 80%;
    height: 2px;
    background: #e2e8f0;
}

.calendar-day.empty {
    visibility: hidden;
}

.time-and-selection-container {
    transition: display 0.3s ease;
}

.time-selection {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.time-selection__title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: #2d3748;
    font-weight: 600;
    font-size: 16px;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.time-slot {
    padding: 12px 8px;
    background: #f7fafc;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, color 0.3s ease;
    border: 2px solid transparent;
    font-weight: 500;
    color: #4a5568;
    position: relative;
}

.time-slot:hover:not(.time-slot.disabled):not(.time-slot.selected) {
    background: #edf2f7;
    border-color: #e2e8f0;
}

.time-slot.selected {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    border-color: #2980b9;
}

.time-slot.disabled {
    background: #f7fafc;
    color: #cbd5e0;
    cursor: not-allowed;
}

.time-slot.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 80%;
    height: 2px;
    background: #e2e8f0;
}

.work-day-ended-message {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-radius: 12px;
    padding: 30px 24px;
    margin-bottom: 24px;
    border: 2px solid #e53e3e;
    text-align: center;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.1);
    display: none;
}

.work-day-ended-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.work-day-ended-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.3);
}

.work-day-ended-icon i {
    font-size: 36px;
    color: white;
}

.work-day-ended-text h3 {
    color: #c53030;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.work-day-ended-text p {
    color: #9b2c2c;
    font-size: 16px;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

.date-time-modal__footer {
    display: flex;
    padding: 20px 24px;
    background: white;
    border-top: 1px solid #e2e8f0;
    gap: 12px;
}

.modal-cancel-btn {
    flex: 1;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #4a5568;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.modal-cancel-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.modal-confirm-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modal-confirm-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.modal-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #cbd5e0;
}

.calendar-day.selected,
.time-slot.selected {
    animation: dateTimeModalPulse 2s infinite;
}

.date-time-modal__content::-webkit-scrollbar {
    width: 6px;
}

.date-time-modal__content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.date-time-modal__content::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.date-time-modal__content::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Анимации */
@keyframes dateTimeModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes dateTimeModalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes dateTimeModalSlideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes dateTimeModalSlideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes dateTimeModalPulse {
    0% {
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
    }
    100% {
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    }
}

