/**
 * Custom Toast Notification Styles
 * Used for main site pages that don't have Toastr
 */

/* Toast Container Positioning */
.toast-container {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
}

.toast-container.toast-top-right {
    top: 20px;
    right: 20px;
}

.toast-container.toast-top-left {
    top: 20px;
    left: 20px;
}

.toast-container.toast-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.toast-container.toast-bottom-right {
    bottom: 20px;
    right: 20px;
}

.toast-container.toast-bottom-left {
    bottom: 20px;
    left: 20px;
}

.toast-container.toast-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

/* Individual Toast Styles */
.custom-toast {
    display: flex;
    align-items: flex-start;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.custom-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.custom-toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast Types - Using warm earth tones from the site palette */
.custom-toast.toast-success {
    border-left: 4px solid #7FA574;
}

.custom-toast.toast-success .toast-icon {
    color: #7FA574;
}

.custom-toast.toast-error {
    border-left: 4px solid #B37168;
}

.custom-toast.toast-error .toast-icon {
    color: #B37168;
}

.custom-toast.toast-warning {
    border-left: 4px solid #D4A574;
}

.custom-toast.toast-warning .toast-icon {
    color: #D4A574;
}

.custom-toast.toast-info {
    border-left: 4px solid #6B8FAA;
}

.custom-toast.toast-info .toast-icon {
    color: #6B8FAA;
}

/* Toast Icon */
.toast-icon {
    font-size: 24px;
    margin-right: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    font-size: 16px;
    color: #5A5147;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Close Button */
.toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    flex-shrink: 0;
    transition: color 0.2s ease;
    line-height: 1;
}

.toast-close:hover {
    color: #5A5147;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
}

.toast-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: currentColor;
    opacity: 0.5;
}

.toast-success .toast-progress::after {
    background: #7FA574;
}

.toast-error .toast-progress::after {
    background: #B37168;
}

.toast-warning .toast-progress::after {
    background: #D4A574;
}

.toast-info .toast-progress::after {
    background: #6B8FAA;
}

/* Progress Bar Animation */
@keyframes toastProgress {
    from {
        transform: scaleX(1);
        transform-origin: left;
    }
    to {
        transform: scaleX(0);
        transform-origin: left;
    }
}

.toast-progress {
    transform-origin: left;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .toast-container {
        left: 10px !important;
        right: 10px !important;
        max-width: none;
        transform: none !important;
    }

    .custom-toast {
        padding: 12px 15px;
    }

    .toast-icon {
        font-size: 20px;
        margin-right: 10px;
    }

    .toast-title {
        font-size: 14px;
    }

    .toast-message {
        font-size: 13px;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .custom-toast {
        background: #2d2d2d;
    }

    .toast-title {
        color: #f5f0e8;
    }

    .toast-message {
        color: #ccc;
    }

    .toast-close {
        color: #888;
    }

    .toast-close:hover {
        color: #f5f0e8;
    }
}
