/* NORSU Alumni System - Toast Notification Styles */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1055;
    max-width: 400px;
}

/* Base Toast Styles */
.toast {
    min-width: 300px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    border: none;
    margin-bottom: 0.5rem;
    transition: var(--transition-normal);
}

/* Toast Variants */
.toast.bg-success {
    background: rgba(25, 135, 84, 0.95) !important;
    color: white;
}

.toast.bg-danger {
    background: rgba(220, 53, 69, 0.95) !important;
    color: white;
}

.toast.bg-warning {
    background: rgba(255, 193, 7, 0.95) !important;
    color: #000 !important;
}

.toast.bg-info {
    background: rgba(13, 202, 240, 0.95) !important;
    color: white;
}

.toast.bg-primary {
    background: rgba(43, 60, 107, 0.95) !important;
    color: white;
}

.toast.bg-secondary {
    background: rgba(108, 117, 125, 0.95) !important;
    color: white;
}

.toast.bg-light {
    background: rgba(248, 249, 250, 0.95) !important;
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.toast.bg-dark {
    background: rgba(33, 37, 41, 0.95) !important;
    color: white;
}

/* Toast Header */
.toast-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-header .toast-icon {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.toast-header .toast-title {
    font-weight: var(--font-weight-semibold);
    margin: 0;
    flex: 1;
}

.toast-header .toast-time {
    font-size: var(--font-size-xs);
    opacity: 0.8;
    margin-left: auto;
}

/* Toast Body */
.toast-body {
    padding: 1rem;
    line-height: var(--line-height-normal);
}

/* Toast with Icon */
.toast-with-icon .toast-body {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.toast-with-icon .toast-icon {
    font-size: 1.5rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.toast-with-icon .toast-message {
    flex: 1;
}

/* Close Button */
.toast .btn-close,
.toast .btn-close-white {
    opacity: 0.8;
    transition: var(--transition-fast);
    padding: 0.5rem;
    margin: -0.25rem -0.25rem -0.25rem auto;
}

.toast .btn-close:hover,
.toast .btn-close-white:hover {
    opacity: 1;
    transform: scale(1.1);
}

.toast .btn-close:focus,
.toast .btn-close-white:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
    transition: width linear;
}

.toast.bg-success .toast-progress {
    background: rgba(255, 255, 255, 0.4);
}

.toast.bg-danger .toast-progress {
    background: rgba(255, 255, 255, 0.4);
}

.toast.bg-warning .toast-progress {
    background: rgba(0, 0, 0, 0.2);
}

.toast.bg-info .toast-progress {
    background: rgba(255, 255, 255, 0.4);
}

/* Toast Animations */
.toast.showing {
    animation: toastSlideIn var(--transition-normal) ease-out;
}

.toast.hide {
    animation: toastSlideOut var(--transition-normal) ease-in;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Toast Stacking */
.toast + .toast {
    margin-top: 0.5rem;
}

/* Action Buttons in Toast */
.toast-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.toast-actions .btn {
    font-size: var(--font-size-xs);
    padding: 0.375rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-weight: var(--font-weight-medium);
}

.toast-actions .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.toast-actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}

.toast-actions .btn-outline-dark {
    border-color: rgba(0, 0, 0, 0.3);
    color: rgba(0, 0, 0, 0.8);
}

.toast-actions .btn-outline-dark:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.5);
    color: black;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .toast-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
        margin: 0 0 0.5rem 0;
    }
}

/* Location Notification Specific Styles */
.location-notification {
    border-left: 4px solid currentColor;
    position: relative;
}

.location-notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: -4px;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, currentColor, transparent);
    animation: locationPulse 2s infinite;
}

@keyframes locationPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .toast {
        border: 2px solid currentColor;
        backdrop-filter: none;
    }
    
    .toast.bg-success {
        background: #198754 !important;
    }
    
    .toast.bg-danger {
        background: #dc3545 !important;
    }
    
    .toast.bg-warning {
        background: #ffc107 !important;
        color: #000 !important;
    }
    
    .toast.bg-info {
        background: #0dcaf0 !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
        transition: none;
    }
    
    .toast.showing,
    .toast.hide {
        animation: none;
    }
    
    .toast-progress {
        transition: none;
    }
    
    .location-notification::before {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .toast-container,
    .toast {
        display: none;
    }
}