﻿
/* ══════════════════════════════════════════════════════════════════════════
   EKLENTİ — ../../../../../../tmp_css_audit/design-system/phoenix_notify.css
   ══════════════════════════════════════════════════════════════════════════ */
/* ============================================================================
   PhoenixERP — PhoenixNotify Styles
   ============================================================================ */

/* ── Notify Container ── */
.phoenix-notify-container {
    position: fixed;
    z-index: var(--phoenix-z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--phoenix-space-2);
    pointer-events: none;
}

.phoenix-notify-container[data-position="top-right"] {
    top: var(--phoenix-space-4);
    right: var(--phoenix-space-4);
}

.phoenix-notify-container[data-position="top-left"] {
    top: var(--phoenix-space-4);
    left: var(--phoenix-space-4);
}

.phoenix-notify-container[data-position="bottom-right"] {
    bottom: var(--phoenix-space-4);
    right: var(--phoenix-space-4);
}

.phoenix-notify-container[data-position="bottom-left"] {
    bottom: var(--phoenix-space-4);
    left: var(--phoenix-space-4);
}

.phoenix-notify-container[data-position="top-center"] {
    top: var(--phoenix-space-4);
    left: 50%;
    transform: translateX(-50%);
}

/* ── Individual Notification ── */
.phoenix-notify {
    display: flex;
    align-items: flex-start;
    gap: var(--phoenix-space-3);
    padding: var(--phoenix-space-3) var(--phoenix-space-4);
    background: var(--phoenix-surface);
    border: 1px solid var(--phoenix-border);
    border-radius: var(--phoenix-radius-lg);
    box-shadow: var(--phoenix-shadow-lg);
    min-width: 320px;
    max-width: 440px;
    pointer-events: auto;
    animation: phoenixNotifySlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: opacity var(--phoenix-transition-base),
                transform var(--phoenix-transition-base);
}

.phoenix-notify.removing {
    opacity: 0;
    transform: translateX(100px);
}

@keyframes phoenixNotifySlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── Notification Icon ── */
.phoenix-notify-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-top: 1px;
}

/* ── Notification Content ── */
.phoenix-notify-content {
    flex: 1;
    min-width: 0;
}

.phoenix-notify-title {
    font-size: var(--phoenix-font-size-sm);
    font-weight: 600;
    margin-bottom: 2px;
}

.phoenix-notify-message {
    font-size: var(--phoenix-font-size-xs);
    color: var(--phoenix-text-primary);
    line-height: 1.4;
}

/* ── Notification Close ── */
.phoenix-notify-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--phoenix-text-muted);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 2px;
    border-radius: var(--phoenix-radius-sm);
    opacity: 0.5;
    transition: opacity var(--phoenix-transition-fast);
}

.phoenix-notify-close:hover {
    opacity: 1;
}

/* ── Notification Progress Bar ── */
.phoenix-notify-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 var(--phoenix-radius-lg) var(--phoenix-radius-lg);
    animation: phoenixNotifyProgress linear forwards;
}

@keyframes phoenixNotifyProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ── Variants ── */
.phoenix-notify--success {
    border-left: 4px solid var(--phoenix-success);
}
.phoenix-notify--success .phoenix-notify-icon { color: var(--phoenix-success); }
.phoenix-notify--success .phoenix-notify-progress { background: var(--phoenix-success); }

.phoenix-notify--error {
    border-left: 4px solid var(--phoenix-danger);
}
.phoenix-notify--error .phoenix-notify-icon { color: var(--phoenix-danger); }
.phoenix-notify--error .phoenix-notify-progress { background: var(--phoenix-danger); }

.phoenix-notify--warning {
    border-left: 4px solid var(--phoenix-warning);
}
.phoenix-notify--warning .phoenix-notify-icon { color: var(--phoenix-warning); }
.phoenix-notify--warning .phoenix-notify-progress { background: var(--phoenix-warning); }

.phoenix-notify--info {
    border-left: 4px solid var(--phoenix-info);
}
.phoenix-notify--info .phoenix-notify-icon { color: var(--phoenix-info); }
.phoenix-notify--info .phoenix-notify-progress { background: var(--phoenix-info); }

/* ── Confirm Dialog (within notify) ── */
.phoenix-notify-confirm {
    padding: var(--phoenix-space-4) var(--phoenix-space-5);
}

.phoenix-notify-confirm .phoenix-notify-message {
    margin: var(--phoenix-space-3) 0 var(--phoenix-space-4);
    font-size: var(--phoenix-font-size-sm);
}

.phoenix-notify-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--phoenix-space-2);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .phoenix-notify {
        min-width: auto;
        max-width: calc(100vw - 2rem);
    }

    .phoenix-notify-container {
        left: var(--phoenix-space-4);
        right: var(--phoenix-space-4);
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   EKLENTİ — phoenix_notify.css
   ══════════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════
   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 (light theme - default) ───────────────────────────── */
.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;
}

/* ── DARK THEME ──────────────────────────────────────────────────────── */
.phoenix-notify-theme-dark.phoenix-notify-toast {
    background: #1a1a1a;
    border-left: 4px solid;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .5), 0 1px 4px rgba(0, 0, 0, .3);
}
.phoenix-notify-theme-dark.phoenix-notify-toast-success {
    border-left-color: #198754;
    background: linear-gradient(135deg, rgba(26, 26, 26, .98), rgba(32, 32, 32, .98));
}
.phoenix-notify-theme-dark.phoenix-notify-toast-error {
    border-left-color: #dc3545;
    background: linear-gradient(135deg, rgba(26, 26, 26, .98), rgba(32, 32, 32, .98));
}
.phoenix-notify-theme-dark.phoenix-notify-toast-warning {
    border-left-color: #ffc107;
    background: linear-gradient(135deg, rgba(26, 26, 26, .98), rgba(32, 32, 32, .98));
    color: #fff;
}
.phoenix-notify-theme-dark.phoenix-notify-toast-info {
    border-left-color: #0dcaf0;
    background: linear-gradient(135deg, rgba(26, 26, 26, .98), rgba(32, 32, 32, .98));
}

/* ── COLORED THEME ───────────────────────────────────────────────────── */
/* Renk phoenix_notify.js'de inline olarak uygulanır (TOAST_*_COLOR) */
.phoenix-notify-theme-colored.phoenix-notify-toast {
    border-left: none;
    color: #fff !important;
}
.phoenix-notify-theme-colored .phoenix-notify-close {
    color: #fff !important;
}
.phoenix-notify-theme-colored.phoenix-notify-toast-warning .phoenix-notify-close {
    color: #fff !important;
}

/* ── 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;
}
