/* ============================================
    КОМПОНЕНТ: УВЕДОМЛЕНИЯ И МОДАЛЬНЫЕ ОКНА
    Версия: 1.0
   ============================================ */





/* ---------- ТОСТ (ИНФОРМАЦИОННОЕ СООБЩЕНИЕ) ---------- */
.toast-message {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 100%;
    max-width: var(--max-width, 1440px);
    text-align: center;
    pointer-events: none;
}

.toast-content {
    background: var(--color-success, var(--green-600));
    color: var(--white);
    padding: 1.875rem 2.5rem;
    font-size: 0.9rem;
    pointer-events: auto;
}

/* ---------- ТОСТ (ОШИБКА) ---------- */
.toast-content.error {
    background: var(--color-danger, var(--red-500));
}

/* ---------- ТОСТ (ПРЕДУПРЕЖДЕНИЕ) ---------- */
.toast-content.warning {
    background: var(--color-warning, var(--orange-500));
}





/* ---------- МОДАЛЬНОЕ ОКНО ---------- */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}
.modal.show {
    display: block;
}
.modal-content {
    background: var(--white);
    border-radius: var(--radius-sm);
    width: 28.125rem;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-out);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
}

/*  Шапка */
.modal-header {
    padding: var(--spacing-sm);
    border-bottom: var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-close {
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text-light);
    background: none;
    border: none;
    line-height: 1;
    padding: 0 0.5rem;
    transition: color 0.2s ease;
}
.modal-close:hover {
    color: var(--text-primary);
}

/* Тело */
.modal-body {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
}
.modal-body p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

/* Подвал */
.modal-footer {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    border-top: var(--border-light, 1px solid var(--bg-second));
}




/* ---------- АДАПТАЦИЯ ---------- */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        margin: var(--spacing-sm, 1rem);
    }
    .modal-header {
        padding: 1rem 1.25rem 0.5rem 1.25rem;
    }
    .modal-body {
        padding: 1rem 1.25rem;
    }
    .modal-footer {
        padding: 0.75rem 1.25rem 1.25rem 1.25rem;
        flex-direction: column;
    }
    .modal-footer .btn {
        width: 100%;
    }
    .toast-content {
        padding: 1rem 1.25rem;
        font-size: 0.85rem;
    }
}

/*! Скрыть скролл у modal-content */
.modal-content::-webkit-scrollbar {
    display: none;
}
.modal-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
/* Скрыть скролл у modal-content */
.modal-content::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}
.modal-content {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Скрыть скролл у notesList */
#notesList::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}
#notesList {
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-height: 300px;
    overflow-y: auto;
    overscroll-behavior: contain; 
}

