/**
 * DIESELNET - Toast Notifications
 * Modern notification system pentru feedback utilizator
 */

/* ============================================ */
/* TOAST CONTAINER                             */
/* ============================================ */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-container.bottom-right {
    top: auto;
    bottom: 20px;
    right: 20px;
}

.toast-container.bottom-left {
    top: auto;
    bottom: 20px;
    right: auto;
    left: 20px;
}

.toast-container.top-left {
    top: 20px;
    right: auto;
    left: 20px;
}

.toast-container.top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
}

/* ============================================ */
/* TOAST NOTIFICATION                          */
/* ============================================ */

.toast {
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-left: 4px solid #06b6d4;
    position: relative;
    overflow: hidden;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(400px);
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.toast-message {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    padding: 0;
}

.toast-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    transition: width linear;
}

/* ============================================ */
/* TOAST TYPES                                 */
/* ============================================ */

/* Success */
.toast.toast-success {
    border-left-color: #10b981;
}

.toast.toast-success .toast-icon {
    color: #10b981;
}

.toast.toast-success .toast-progress {
    color: #10b981;
}

/* Error */
.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-error .toast-icon {
    color: #ef4444;
}

.toast.toast-error .toast-progress {
    color: #ef4444;
}

/* Warning */
.toast.toast-warning {
    border-left-color: #f59e0b;
}

.toast.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast.toast-warning .toast-progress {
    color: #f59e0b;
}

/* Info */
.toast.toast-info {
    border-left-color: #06b6d4;
}

.toast.toast-info .toast-icon {
    color: #06b6d4;
}

.toast.toast-info .toast-progress {
    color: #06b6d4;
}

/* ============================================ */
/* TOAST ANIMATIONS                            */
/* ============================================ */

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(400px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

@keyframes toastBounce {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-10px);
    }
}

.toast.bounce {
    animation: toastBounce 0.5s ease;
}

/* ============================================ */
/* DARK MODE                                   */
/* ============================================ */

body.dark-mode .toast {
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .toast-title {
    color: #f1f5f9;
}

body.dark-mode .toast-message {
    color: #cbd5e1;
}

body.dark-mode .toast-close {
    color: #64748b;
}

body.dark-mode .toast-close:hover {
    background: #334155;
    color: #cbd5e1;
}

/* ============================================ */
/* RESPONSIVE                                  */
/* ============================================ */

@media (max-width: 768px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .toast-container.bottom-right,
    .toast-container.bottom-left {
        bottom: 10px;
        top: auto;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    .toast {
        transform: translateY(-100px);
    }

    .toast.show {
        transform: translateY(0);
    }

    .toast.hide {
        transform: translateY(-100px);
    }
}

/* ============================================ */
/* TOAST VARIANTS                              */
/* ============================================ */

/* Compact Toast */
.toast.toast-compact {
    padding: 12px 16px;
    min-width: 250px;
}

.toast.toast-compact .toast-title {
    font-size: 0.85rem;
}

.toast.toast-compact .toast-message {
    font-size: 0.8rem;
}

/* Large Toast */
.toast.toast-large {
    padding: 20px 24px;
    min-width: 350px;
}

.toast.toast-large .toast-title {
    font-size: 1.1rem;
}

.toast.toast-large .toast-message {
    font-size: 0.95rem;
}

/* Toast with Action */
.toast-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.toast-action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.toast-action-btn.primary {
    background: #06b6d4;
    color: white;
}

.toast-action-btn.primary:hover {
    background: #0891b2;
}

.toast-action-btn.secondary {
    background: #f1f5f9;
    color: #64748b;
}

.toast-action-btn.secondary:hover {
    background: #e2e8f0;
}