/* Toast Notification Styles - Right Top */
.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    align-items: flex-end;
    max-width: calc(100% - 36px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #28a745;
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    min-width: 260px;
    max-width: 420px;
    pointer-events: all;
    animation: slideInFromRight 0.28s cubic-bezier(.2,.9,.2,1), fadeOut 0.28s ease-in 3.1s;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes slideInFromRight {
    from { transform: translateX(30px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { transform: translateX(0); opacity: 1; }
    to   { transform: translateX(30px); opacity: 0; }
}

.toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff; /* white check icon */
    font-size: 16px;
    font-weight: 700;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Type variants */
.toast.success { background: #28a745; }
.toast.warning { background: #ffc107; }
.toast.error   { background: #dc3545; }
.toast.info    { background: #17a2b8; }

.toast.success .toast-icon { background: rgba(255,255,255,0.12); color: #ffffff; }
.toast.warning .toast-icon { background: rgba(0,0,0,0.06); color: #000; }
.toast.error .toast-icon   { background: rgba(255,255,255,0.12); color: #ffffff; }
.toast.info .toast-icon    { background: rgba(255,255,255,0.12); color: #ffffff; }

@media (max-width:420px) {
    .toast { min-width: 200px; padding: 10px 12px; }
    .toast-message { font-size: 13px; }
}

/* Confirm dialog styles */
.confirm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index:10000; display:flex; align-items:center; justify-content:center; }
.confirm-dialog { background: #fff; border-radius:10px; min-width:360px; max-width:92%; box-shadow:0 10px 30px rgba(0,0,0,0.2); }
.confirm-header { background:#8B6F47; color:#fff; padding:14px 18px; border-radius:10px 10px 0 0; font-weight:700; }
.confirm-body { padding:16px 18px; }
.confirm-actions { display:flex; gap:10px; justify-content:flex-end; padding:12px 18px 18px; }
.confirm-btn { padding:8px 14px; border-radius:6px; border:none; font-weight:600; cursor:pointer; }
.confirm-btn-cancel { background:#6c757d; color:#fff; }
.confirm-btn-delete { background:#dc3545; color:#fff; }
.confirm-body {
    padding: 24px;
}

.confirm-message {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 0 24px 24px;
}

.confirm-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-btn-cancel {
    background: #6c757d;
    color: white;
}

.confirm-btn-cancel:hover {
    background: #5a6268;
}

.confirm-btn-delete {
    background: #dc3545;
    color: white;
}

.confirm-btn-delete:hover {
    background: #c82333;
}

/* Ensure explicit success style (white text on green background) */
.toast.success {
    background: #28a745 !important;
    color: #ffffff !important;
}
.toast.success .toast-icon {
    color: #28a745;
    background: #ffffff;
}
/* Duplicate rules removed; primary toast styles live at top of this file. */

/* Warning Toast */
.toast.warning {
    background: #ffc107;
}

.toast.warning .toast-icon {
    color: #ffc107;
}

/* Error Toast */
.toast.error {
    background: #dc3545;
}

.toast.error .toast-icon {
    color: #dc3545;
}

/* Info Toast */
.toast.info {
    background: #17a2b8;
}

.toast.info .toast-icon {
    color: #17a2b8;
}

/* Confirm Dialog */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.confirm-dialog {
    background: white;
    border-radius: 12px;
    padding: 0;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.2s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.confirm-header {
    background: #8B6F47;
    color: white;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.confirm-header-icon {
    font-size: 24px;
}

.confirm-header-text {
    font-size: 18px;
    font-weight: 600;
}

.confirm-body {
    padding: 24px;
}

.confirm-message {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 0 24px 24px;
}

.confirm-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-btn-cancel {
    background: #6c757d;
    color: white;
}

.confirm-btn-cancel:hover {
    background: #5a6268;
}

.confirm-btn-delete {
    background: #dc3545;
    color: white;
}

.confirm-btn-delete:hover {
    background: #c82333;
}

/* Ensure explicit success style (white text on green background) */
.toast.success {
    background: #28a745 !important;
    color: #ffffff !important;
}
.toast.success .toast-icon {
    color: #28a745;
    background: #ffffff;
}
