/**
 * ECP Notify System
 * Reusable notification dialogs for info, success, warning, and error types.
 * Triggered via ECP_Modal::queue() (PHP) or ECPModal.show() (JS).
 *
 * Uses ecp-notify-* prefix to avoid collision with legacy ecp-modal-* classes.
 *
 * Structure (matches Figma node 2021:142):
 *   .ecp-notify-overlay     — full-screen blurred backdrop
 *   .ecp-notify-dialog      — outer shell: white border + dark glass bg
 *     .ecp-notify-container — inner card: colored top border, transparent bg
 *       .ecp-notify-header  — full-width tinted row: rgba(accent,0.1) bg
 *       .ecp-notify-body    — white body text
 *       .ecp-notify-cta     — fit-content accent button
 */

/* ── Overlay ─────────────────────────────────────────────────────────── */
.ecp-notify-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 99998;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.ecp-notify-overlay.ecp-notify-fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ── Outer shell — white border + dark glass ─────────────────────────── */
.ecp-notify-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    width: 376px;
    max-width: calc(100vw - 32px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.ecp-notify-dialog.ecp-notify-fade-out {
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* ── Inner container — colored top border ────────────────────────────── */
.ecp-notify-container {
    background: transparent;
    border-top: 6px solid transparent;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 38px 32px 32px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    box-sizing: border-box;
    width: 100%;
}

/* ── Header row — full-width tinted strip, left-aligned ──────────────── */
.ecp-notify-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    border-radius: 4px;
    padding: 4px 8px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

.ecp-notify-header i {
    flex-shrink: 0;
    font-size: 20px;
    width: 28px;
    text-align: center;
    line-height: 28px;
}

.ecp-notify-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Body text ───────────────────────────────────────────────────────── */
.ecp-notify-body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 28px;
    color: #ffffff;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    width: 100%;
    flex-shrink: 0;
}

/* ── CTA button — fit-content ────────────────────────────────────────── */
.ecp-notify-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Avenir LT Std', 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    color: #000000 !important;
    padding: 8px 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    width: fit-content;
    flex-shrink: 0;
}

.ecp-notify-cta:hover {
    filter: brightness(1.15);
    color: #000000 !important;
    text-decoration: none !important;
}

.ecp-notify-cta i {
    font-size: 14px;
    line-height: 1;
}

/* ── Type: info (#00bbff cyan) ───────────────────────────────────────── */
.ecp-notify-dialog[data-ecp-type="info"] .ecp-notify-container {
    border-top-color: #00bbff;
}
.ecp-notify-dialog[data-ecp-type="info"] .ecp-notify-header {
    background: rgba(0, 187, 255, 0.1);
}
.ecp-notify-dialog[data-ecp-type="info"] .ecp-notify-header i,
.ecp-notify-dialog[data-ecp-type="info"] .ecp-notify-title {
    color: #00bbff;
}
.ecp-notify-dialog[data-ecp-type="info"] .ecp-notify-cta {
    background: #00bbff;
}

/* ── Type: success (#00cc88 green) ───────────────────────────────────── */
.ecp-notify-dialog[data-ecp-type="success"] .ecp-notify-container {
    border-top-color: #00cc88;
}
.ecp-notify-dialog[data-ecp-type="success"] .ecp-notify-header {
    background: rgba(0, 204, 136, 0.1);
}
.ecp-notify-dialog[data-ecp-type="success"] .ecp-notify-header i,
.ecp-notify-dialog[data-ecp-type="success"] .ecp-notify-title {
    color: #00cc88;
}
.ecp-notify-dialog[data-ecp-type="success"] .ecp-notify-cta {
    background: #00cc88;
}

/* ── Type: warning (#ffaa00 amber) ───────────────────────────────────── */
.ecp-notify-dialog[data-ecp-type="warning"] .ecp-notify-container {
    border-top-color: #ffaa00;
}
.ecp-notify-dialog[data-ecp-type="warning"] .ecp-notify-header {
    background: rgba(255, 170, 0, 0.1);
}
.ecp-notify-dialog[data-ecp-type="warning"] .ecp-notify-header i,
.ecp-notify-dialog[data-ecp-type="warning"] .ecp-notify-title {
    color: #ffaa00;
}
.ecp-notify-dialog[data-ecp-type="warning"] .ecp-notify-cta {
    background: #ffaa00;
}

/* ── Type: error (#ff4455 red) ───────────────────────────────────────── */
.ecp-notify-dialog[data-ecp-type="error"] .ecp-notify-container {
    border-top-color: #ff4455;
}
.ecp-notify-dialog[data-ecp-type="error"] .ecp-notify-header {
    background: rgba(255, 68, 85, 0.1);
}
.ecp-notify-dialog[data-ecp-type="error"] .ecp-notify-header i,
.ecp-notify-dialog[data-ecp-type="error"] .ecp-notify-title {
    color: #ff4455;
}
.ecp-notify-dialog[data-ecp-type="error"] .ecp-notify-cta {
    background: #ff4455;
}
