/* Global Flash Stack (desktop + base)
   Usage: include after header/menu. Works with assets/js/includes/flash.js
   Markup rendered by assets/includes/flash.php
*/
.flash-stack { position: fixed; --flash-stack-top-offset: 78px; top: calc(var(--flash-stack-top-offset) + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; max-width: min(640px,92vw); width: 100%; z-index: 1800; pointer-events: none; }
/* Partnerplatform: header + menu samen iets hoger; verhoog offset licht indien pagina body class aanwezig */
/* Dynamic JS now sets --flash-stack-top-offset based on header + menu height; static overrides removed */
.flash { background:#fff; border:1px solid #e2dff0; box-shadow:0 4px 16px rgba(34,0,66,0.18),0 1px 3px rgba(34,0,66,0.12); border-radius:12px; padding:14px 18px; display:flex; align-items:flex-start; gap:12px; position:relative; /* avoid blocking header buttons by default */ pointer-events:none; animation:flash-slide-in .35s cubic-bezier(.16,.84,.44,1) both; }
.flash-info { border-color:#d6c9f3; }
.flash-error { border-color:#f2b8b5; background:#fff5f5; }
.flash-error .flash-content { color:#7d1f1a; }
.flash-success { border-color:#c2e6c2; background:#f5fff5; }
.flash-success .flash-content { color:#225e22; }
.flash-warning { border-color:#f5d98b; background:#fff9eb; }
.flash-warning .flash-content { color:#7a5500; }
.flash-content { flex:1 1 auto; font-size:0.95rem; line-height:1.35; color:#2b2b2b; user-select: text; }
.flash-close { background:transparent; border:none; color:#555; font-size:20px; line-height:1; cursor:pointer; padding:2px 6px; border-radius:6px; transition:background-color .18s ease,color .18s ease; pointer-events: auto; }
.flash-close:hover { background:#f0eef7; color:#222; }
.flash-close:focus-visible { outline:2px solid #6d00c7; outline-offset:2px; }
/* Keyframes only adjust the Y offset so we don't clobber the base X centering (translateX(-50%)) */
@keyframes flash-slide-in { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.flash.flash-leave { animation:flash-fade-out .25s ease forwards; }
@keyframes flash-fade-out { to { opacity:0; transform:translateY(-6px); } }

/* Dark mode support for flash messages */
[data-theme="dark"] .flash {
   background: #222 !important;
   color: #fff !important;
   border-color: #444 !important;
}
[data-theme="dark"] .flash-error {
   background: #3b161b !important;
   color: #fff !important;
   border-color: #fda4af !important;
}
[data-theme="dark"] .flash-success {
   background: #063a29 !important;
   color: #fff !important;
   border-color: #4ade80 !important;
}
[data-theme="dark"] .flash-warning {
   background: #3b2c14 !important;
   color: #fff !important;
   border-color: #f8c37a !important;
}
[data-theme="dark"] .flash-info {
   background: #1f2f45 !important;
   color: #fff !important;
   border-color: #8b5cf6 !important;
}
