/* Unified flash notices — overlay, banner (on hero), inline (admin/forms) */
.flash-notice-anchor {
    position: relative;
}

.flash-notice--overlay {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2rem);
}

.flash-notice--overlay .flash-notice__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.35) 0%,
        rgba(15, 23, 42, 0.55) 50%,
        rgba(15, 23, 42, 0.4) 100%
    );
    backdrop-filter: blur(2px);
}

.flash-notice--banner {
    margin-bottom: 1.5rem;
}

.flash-notice--banner .flash-notice__panel,
.flash-notice--inline .flash-notice__panel {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(1.1rem, 2.5vw, 1.5rem) clamp(1.25rem, 3vw, 1.75rem);
    border-radius: 18px;
    text-align: center;
    animation: flashNoticeIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.flash-notice--banner .flash-notice__panel {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.flash-notice--inline {
    margin: 1rem 0 1.25rem;
}

.flash-notice--inline .flash-notice__panel {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(37, 99, 235, 0.15);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    text-align: start;
}

.flash-notice--overlay .flash-notice__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    padding: clamp(1.25rem, 3vw, 2rem);
    border-radius: 20px;
    text-align: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: flashNoticeIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.flash-notice__close {
    position: absolute;
    top: 0.75rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}

.flash-notice--overlay .flash-notice__close,
.flash-notice--banner .flash-notice__close {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.flash-notice--overlay .flash-notice__close:hover,
.flash-notice--banner .flash-notice__close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.flash-notice--inline .flash-notice__close {
    background: rgba(15, 23, 42, 0.06);
    color: #64748b;
}

.flash-notice--inline .flash-notice__close:hover {
    background: rgba(15, 23, 42, 0.1);
    color: #334155;
}

[dir="ltr"] .flash-notice__close {
    right: 0.75rem;
}

[dir="rtl"] .flash-notice__close {
    left: 0.75rem;
}

.flash-notice__body {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    text-align: inherit;
}

.flash-notice--overlay .flash-notice__body,
.flash-notice--banner .flash-notice__body {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.flash-notice__icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
}

.flash-notice__icon--success {
    background: rgba(34, 197, 94, 0.92);
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
}

.flash-notice__icon--error {
    background: rgba(239, 68, 68, 0.92);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.flash-notice__icon--warning {
    background: rgba(245, 158, 11, 0.95);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.flash-notice__icon--info {
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.flash-notice__title {
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-weight: 700;
    margin: 0 0 0.4rem;
    line-height: 1.4;
}

.flash-notice__message {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
}

.flash-notice--overlay .flash-notice__message,
.flash-notice--banner .flash-notice__message {
    color: rgba(255, 255, 255, 0.9);
}

.flash-notice--inline .flash-notice__message {
    color: #475569;
}

.flash-notice__cta {
    margin-top: 1.15rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

.flash-notice--inline .flash-notice__cta {
    border-top-color: rgba(15, 23, 42, 0.08);
}

.flash-notice__cta-text {
    margin-bottom: 0.85rem;
    font-size: 0.92rem;
    line-height: 1.6;
}

.flash-notice--overlay .flash-notice__cta-text,
.flash-notice--banner .flash-notice__cta-text {
    color: rgba(255, 255, 255, 0.88);
}

.flash-notice--inline .flash-notice__cta-text {
    color: #64748b;
}

.flash-notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.flash-notice--inline .flash-notice__actions {
    justify-content: flex-start;
}

.flash-notice__btn-primary {
    font-weight: 600;
    border-radius: 10px;
    padding: 0.5rem 1.15rem;
}

.flash-notice--overlay .flash-notice__btn-primary,
.flash-notice--banner .flash-notice__btn-primary {
    color: #1e40af;
}

.flash-notice--overlay .flash-notice__btn-secondary,
.flash-notice--banner .flash-notice__btn-secondary {
    font-weight: 600;
    border-radius: 10px;
    padding: 0.5rem 1.15rem;
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.flash-notice--overlay .flash-notice__btn-secondary:hover,
.flash-notice--banner .flash-notice__btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: #fff;
}

.flash-notice.is-hiding {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

@keyframes flashNoticeIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 576px) {
    .flash-notice__actions {
        flex-direction: column;
    }

    .flash-notice__actions .btn {
        width: 100%;
    }

    .flash-notice--inline .flash-notice__body {
        flex-direction: column;
    }
}
