/**
 * Nora Atelier - Notification System Styles
 * Toast (sag ust) + Modal (ekran ortasi)
 *
 * Hem public site hem admin panel kullanir, bu yuzden ayri dosya.
 * notify.js bu dosyayla beraber calisir.
 */

/* ================================
   TOAST CONTAINER + ITEM
   ================================ */
.toast-container {
    position: fixed;
    top: 86px; /* header altina sigsin */
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 32px);
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    border-left: 4px solid #8B7355;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #2d2820;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast--visible { opacity: 1; transform: translateX(0); }
.toast--hiding  { opacity: 0; transform: translateX(20px); }

.toast--success { border-left-color: #16a34a; }
.toast--success .toast__icon { color: #16a34a; }

.toast--error   { border-left-color: #dc2626; }
.toast--error   .toast__icon { color: #dc2626; }

.toast--warning { border-left-color: #f59e0b; }
.toast--warning .toast__icon { color: #f59e0b; }

.toast--info    { border-left-color: #2563eb; }
.toast--info    .toast__icon { color: #2563eb; }

.toast__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toast__icon svg { width: 22px; height: 22px; }

.toast__msg { flex: 1; word-break: break-word; }

.toast__close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.2s;
    align-self: flex-start;
    margin-top: -2px;
}
.toast__close:hover { color: #4b5563; }

@media (max-width: 480px) {
    .toast-container {
        top: auto;
        bottom: 16px;
        left: 16px;
        right: 16px;
        max-width: none;
        width: auto;
    }
    .toast { transform: translateY(20px); }
    .toast--visible { transform: translateY(0); }
    .toast--hiding  { transform: translateY(20px); }
}

/* ================================
   MODAL (confirm + alert)
   ================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 18, 14, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.modal-backdrop--visible { opacity: 1; }

.modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 100%;
    padding: 28px 28px 22px;
    transform: scale(0.95) translateY(8px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}
.modal-backdrop--visible .modal { transform: scale(1) translateY(0); }

.modal__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 22px;
    font-weight: 500;
    color: #2d2820;
    margin: 0 0 12px;
}

.modal__message {
    color: #6b6258;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 22px;
}

.modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Modal'in icindeki butonlar - .btn yoksa fallback stil ver */
.modal__actions .btn,
.modal__actions button {
    min-width: 110px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background 0.2s, border-color 0.2s;
}

.modal__cancel {
    background: #fff;
    color: #4b5563;
    border-color: #d1d5db;
}
.modal__cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.modal__confirm {
    background: #8B7355;
    color: #fff;
    border-color: #8B7355;
}
.modal__confirm:hover {
    background: #6f5b41;
    border-color: #6f5b41;
}

/* Tehlikeli onay (silme vs) icin kirmizi */
.modal__confirm--danger {
    background: #dc2626;
    border-color: #dc2626;
}
.modal__confirm--danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

@media (max-width: 480px) {
    .modal { padding: 22px 20px 18px; }
    .modal__actions { flex-direction: column-reverse; }
    .modal__actions .btn,
    .modal__actions button {
        width: 100%;
        min-height: 44px;
    }
}
