/*modal.css*/

/* Модальное окно */
.modal {
    display: none; /* По умолчанию скрыто */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn-save, .btn-cancel {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-save {
    background-color: #4CAF50;
    color: white;
}

.btn-save:hover {
    background-color: #45a049;
}

.btn-cancel {
    background-color: #f44336;
    color: white;
}

.btn-cancel:hover {
    background-color: #da190b;
}

/* Кнопка заметки в расписании */
.note-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.note-btn:hover {
    opacity: 1;
/*    font-size: 19px;*/
    filter: drop-shadow(0 0 7px hsl(0, 0%, 60%));
/*    hsla(0, 100%, 50%, 0.7) - тон, насыщенность, светлость, прозрачность*/
}

.note-btn.has-note {
    opacity: 1;
    font-weight: bold;
    filter: drop-shadow(0 0 2px hsl(180, 100%, 50%, 1));
}

.note-btn.has-note:hover {
    opacity: 1;
/*    font-size: 19px;*/
    filter: drop-shadow(0 0 7px hsl(190, 100%, 50%));
}

#editor-container {
    min-height: 200px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Панель форматирования */
.formatting-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.formatting-toolbar button {
    padding: 5px 10px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.formatting-toolbar button:hover {
    background: #e9e9e9;
}

.formatting-toolbar button b,
.formatting-toolbar button i {
    font-size: 16px;
}

/* Редактируемая область */
.note-editor {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    background: white;
    line-height: 1.6;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.note-editor:focus {
    outline: 2px solid #4CAF50;
    outline-offset: -2px;
}

.note-editor ul,
.note-editor ol {
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.note-editor li {
    margin-bottom: 5px;
}

.note-editor p {
    margin-bottom: 10px;
}

.note-editor strong,
.note-editor b {
    font-weight: bold;
}

.note-editor em,
.note-editor i {
    font-style: italic;
}

/* Toast уведомления */
.toast {
    position: fixed;
    top: 100px; /* Под хедером */
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    min-width: 250px;
    animation: slideIn 0.3s ease-out;
}

.toast.error {
    background: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Модальное окно подтверждения удаления */
.confirm-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.confirm-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 25px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.confirm-modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #f44336;
}

.confirm-modal-body {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.confirm-modal-lesson {
    font-weight: bold;
    color: #333;
    margin-top: 10px;
}

.confirm-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-confirm-delete {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-confirm-delete:hover {
    background: #da190b;
}

.btn-confirm-cancel {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.btn-confirm-cancel:hover {
    background: #d0d0d0;
}