/* style.css: Dark Brutalist Minimal Styles */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* offset for mobile header */
}

/* Elegant Thin Dark Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #030812;
}

::-webkit-scrollbar-thumb {
    background: #1f8ac0;
}

::-webkit-scrollbar-thumb:hover {
    background: #efc9af;
}

/* Base resets & typography details */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hide Swiper images on extremely small mobile vertical layouts */
@media (max-width: 640px) {
    .hidden-mobile-img img {
        opacity: 0.3;
        filter: grayscale(100%) brightness(0.5) !important;
    }
}

/* VenoBox Custom Dark Theme */
.vbox-overlay {
    background: rgba(3, 8, 18, 0.98) !important;
    backdrop-filter: blur(15px);
}

.vbox-close {
    background-color: #efc9af !important;
    color: #030812 !important;
}

/* Leaflet Dark Map Injection Matrix */
/* We invert the map colors, adjust hue to make roads dark blueish, and lower brightness */
.leaflet-container {
    z-index: 10;
    font-family: 'Space Mono', monospace !important;
    background-color: #0a1426 !important;
}

.leaflet-layer,
.leaflet-control-zoom-in,
.leaflet-control-zoom-out,
.leaflet-control-attribution {
    filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.leaflet-popup-content-wrapper {
    background: #0a1426 !important;
    color: #fefefe !important;
    border-radius: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.leaflet-popup-tip {
    background: #0a1426 !important;
}

/* Custom patches for MMenu-Light and Body z-index hierarchy */
.mm-spn {
    --mm-spn-color-text: #fefefe;
    --mm-spn-color-background: #0a1426;
    font-family: "Space Mono", monospace;
    text-transform: uppercase;
}

.mm-spn a:hover {
    color: #efc9af;
}

/* Ensure MMenu Offcanvas goes above everything including fixed header */
.mm-ocd {
    z-index: 99999 !important;
}

/* Hide scrollbar for sideways scrolling portfolio */
.hide-scrollbars {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.hide-scrollbars::-webkit-scrollbar {
    display: none;
}

/* ============================================================
   PREMIUM TOAST NOTIFICATION SYSTEM
   ============================================================ */

/* Container */
#toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Individual toast */
.toast-notification {
    pointer-events: auto;
    position: relative;
    min-width: 340px;
    max-width: 440px;
    padding: 22px 24px 22px 22px;
    border-radius: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
    transform: translateX(120%) scale(0.9);
    opacity: 0;
    animation: toast-slide-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    font-family: "Outfit", sans-serif;
}

.toast-notification.toast-exit {
    animation: toast-slide-out 0.45s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

/* Success variant */
.toast-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(10, 20, 38, 0.92) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.toast-success .toast-icon-wrap {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35), 0 0 40px rgba(16, 185, 129, 0.1);
}

.toast-success .toast-progress-bar {
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* Error variant */
.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(10, 20, 38, 0.92) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.toast-error .toast-icon-wrap {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35), 0 0 40px rgba(239, 68, 68, 0.1);
}

.toast-error .toast-progress-bar {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

/* Icon container */
.toast-icon-wrap {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    animation: toast-icon-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

/* Text content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 15px;
    font-weight: 700;
    color: #fefefe;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.toast-message {
    font-size: 13px;
    font-weight: 300;
    color: rgba(254, 254, 254, 0.65);
    line-height: 1.5;
}

/* Close button */
.toast-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(254, 254, 254, 0.3);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    border-radius: 6px;
}

.toast-close:hover {
    color: rgba(254, 254, 254, 0.8);
    transform: scale(1.15);
    background: rgba(255, 255, 255, 0.05);
}

/* Progress bar at bottom */
.toast-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 16px 16px;
    animation: toast-progress 5s linear forwards;
}

/* Animations */
@keyframes toast-slide-in {
    0% {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateX(120%) scale(0.85);
        opacity: 0;
    }
}

@keyframes toast-icon-pop {
    0% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes toast-progress {
    0% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

/* Glow pulse effect on icon for success */
.toast-success .toast-icon-wrap {
    animation:
        toast-icon-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both,
        toast-glow-success 2s ease-in-out infinite 0.8s;
}

.toast-error .toast-icon-wrap {
    animation:
        toast-icon-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both,
        toast-glow-error 2s ease-in-out infinite 0.8s;
}

@keyframes toast-glow-success {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35), 0 0 40px rgba(16, 185, 129, 0.1);
    }
    50% {
        box-shadow: 0 4px 24px rgba(16, 185, 129, 0.5), 0 0 60px rgba(16, 185, 129, 0.2);
    }
}

@keyframes toast-glow-error {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35), 0 0 40px rgba(239, 68, 68, 0.1);
    }
    50% {
        box-shadow: 0 4px 24px rgba(239, 68, 68, 0.5), 0 0 60px rgba(239, 68, 68, 0.2);
    }
}

/* Responsive */
@media (max-width: 480px) {
    #toast-container {
        top: auto;
        bottom: 20px;
        right: 12px;
        left: 12px;
    }

    .toast-notification {
        min-width: unset;
        max-width: unset;
        width: 100%;
        padding: 18px 18px 18px 16px;
    }
}