:root {
    --dark-gray: #2c3e50;
    --light-gray: #ecf0f1;
    --border-radius: 3px;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Основные стили модального окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 500px;
    margin: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.show .modal-content {
    transform: translateY(0);
}

/* Стили формы */
.confirmation-form {
    padding: 40px;
}

.form-title {
    color: var(--dark-gray);
    text-align: center;
    margin: 0 0 30px 0;
    font-weight: 400;
    font-size: 1.8rem;
    line-height: 1.3;
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    color: var(--dark-gray);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 1rem;
}

/* Поля ввода */
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 1rem;
    color: var(--dark-gray);
    background: white;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--dark-gray);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* Группы радиокнопок */
.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 5px;
}

.form-check {
    display: flex;
    align-items: center;
    margin: 0;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    cursor: pointer;
    accent-color: var(--dark-gray);
}

.form-check-label {
    color: var(--dark-gray);
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
}

.form-note {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 8px;
    font-style: italic;
}

/* Кнопка отправки */
.btn-form {
    width: 100%;
    padding: 16px;
    background: black;
    color: white;
    border: none;
    border-radius: 3px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-form:hover {
    background: white;
	color: black;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-form:active {
    transform: translateY(0);
	color: black;
}

/* Кнопка открытия модалки */
#openBtn {
    left: 50%;
    bottom: 20px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .confirmation-form {
        padding: 25px;
    }
    
    .form-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .confirmation-form {
        padding: 20px;
    }
    
    .form-title {
        font-size: 1.3rem;
    }
    
    .option-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .form-control {
        padding: 10px 14px;
    }
    
    .btn-form {
        padding: 14px;
    }
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    animation: fadeIn 0.4s ease forwards;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
    opacity: 0;
}

/* Плавное появление полей формы */
#attendanceForm > * {
    --animation-order: 0;
}

#attendanceForm > *:nth-child(1) { --animation-order: 1; }
#attendanceForm > *:nth-child(2) { --animation-order: 2; }
#attendanceForm > *:nth-child(3) { --animation-order: 3; }
#attendanceForm > *:nth-child(4) { --animation-order: 4; }
#attendanceForm > *:nth-child(5) { --animation-order: 5; }
#attendanceForm > *:nth-child(6) { --animation-order: 6; }

/* Состояния полей */
.form-control:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.05);
}

/* Стили для скроллбара в модальном окне */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}