/* ═══════════════════════════════════════════════════════════════════════
   PhoenixNotify — Global Toast Notification Styles
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Container positions ─────────────────────────────────────────────── */
.phoenix-notify-container {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: 420px;
    min-width: 320px;
    padding: 16px;
    box-sizing: border-box;
}
.phoenix-notify-container > * { pointer-events: auto; }

.phoenix-notify-top-right      { top: 0; right: 0; align-items: flex-end; }
.phoenix-notify-top-left       { top: 0; left: 0;  align-items: flex-start; }
.phoenix-notify-top-center     { top: 0; left: 50%; transform: translateX(-50%); align-items: center; }
.phoenix-notify-bottom-right   { bottom: 0; right: 0; align-items: flex-end; flex-direction: column-reverse; }
.phoenix-notify-bottom-left    { bottom: 0; left: 0;  align-items: flex-start; flex-direction: column-reverse; }
.phoenix-notify-bottom-center  { bottom: 0; left: 50%; transform: translateX(-50%); align-items: center; flex-direction: column-reverse; }

/* ── Toast base ──────────────────────────────────────────────────────── */
.phoenix-notify-toast {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-family: inherit;
    line-height: 1.4;
    color: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18), 0 1px 4px rgba(0, 0, 0, .1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 300ms ease, transform 300ms ease;
    position: relative;
    overflow: hidden;
}

/* ── Show / Hide animations ──────────────────────────────────────────── */
.phoenix-notify-toast-show {
    opacity: 1;
    transform: translateX(0);
}
.phoenix-notify-toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Left-side positions slide from left */
.phoenix-notify-top-left .phoenix-notify-toast,
.phoenix-notify-bottom-left .phoenix-notify-toast {
    transform: translateX(-100%);
}
.phoenix-notify-top-left .phoenix-notify-toast-show,
.phoenix-notify-bottom-left .phoenix-notify-toast-show {
    transform: translateX(0);
}
.phoenix-notify-top-left .phoenix-notify-toast-hide,
.phoenix-notify-bottom-left .phoenix-notify-toast-hide {
    transform: translateX(-100%);
}

/* Center positions slide from top/bottom */
.phoenix-notify-top-center .phoenix-notify-toast {
    transform: translateY(-100%);
}
.phoenix-notify-top-center .phoenix-notify-toast-show {
    transform: translateY(0);
}
.phoenix-notify-top-center .phoenix-notify-toast-hide {
    transform: translateY(-100%);
}
.phoenix-notify-bottom-center .phoenix-notify-toast {
    transform: translateY(100%);
}
.phoenix-notify-bottom-center .phoenix-notify-toast-show {
    transform: translateY(0);
}
.phoenix-notify-bottom-center .phoenix-notify-toast-hide {
    transform: translateY(100%);
}

/* ── Type colors ─────────────────────────────────────────────────────── */
.phoenix-notify-toast-success {
    background: linear-gradient(135deg, rgba(25, 135, 84, .94), rgba(20, 108, 67, .94));
    border-left: 4px solid #0f5132;
}
.phoenix-notify-toast-error {
    background: linear-gradient(135deg, rgba(220, 53, 69, .94), rgba(176, 42, 55, .94));
    border-left: 4px solid #842029;
}
.phoenix-notify-toast-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, .94), rgba(224, 168, 0, .94));
    border-left: 4px solid #997404;
    color: #212529;
}
.phoenix-notify-toast-info {
    background: linear-gradient(135deg, rgba(13, 110, 253, .94), rgba(10, 88, 202, .94));
    border-left: 4px solid #084298;
}

/* ── Icon ─────────────────────────────────────────────────────────────── */
.phoenix-notify-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-right: 10px;
    opacity: 0.9;
}

/* ── Message ──────────────────────────────────────────────────────────── */
.phoenix-notify-message {
    flex: 1;
    word-break: break-word;
}

/* ── Close button ─────────────────────────────────────────────────────── */
.phoenix-notify-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 0 0 10px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 150ms;
}
.phoenix-notify-close:hover { opacity: 1; }
.phoenix-notify-toast-warning .phoenix-notify-close { color: #212529; }

/* ── Progress bar ─────────────────────────────────────────────────────── */
.phoenix-notify-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    transform: scaleX(1);
    border-radius: 0 0 10px 10px;
}
.phoenix-notify-progress-active {
    animation: phoenix-notify-shrink linear forwards;
}
.phoenix-notify-progress-success { background: rgba(255, 255, 255, .4); }
.phoenix-notify-progress-error   { background: rgba(255, 255, 255, .4); }
.phoenix-notify-progress-warning { background: rgba(0, 0, 0, .2); }
.phoenix-notify-progress-info    { background: rgba(255, 255, 255, .4); }

@keyframes phoenix-notify-shrink {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ── Hover pause — progress bar pauses on hover ──────────────────────── */
.phoenix-notify-toast:hover .phoenix-notify-progress-active {
    animation-play-state: paused;
}
