/* ════════════════════════════════════════════════════════════════
   DEÜ YBS — UX Feedback Sistemi (Toast / Spinner / Success / Empty)
   ════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────
   1. Toast Notification Sistem
   ─────────────────────────────────────────────────────────────── */
#deu-toast-container {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: calc(100vw - 2.5rem);
    pointer-events: none;
}

.deu-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    min-width: 320px;
    max-width: 420px;
    padding: 1rem 1.25rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 26, 61, 0.18);
    font-family: 'DM Sans', sans-serif;
    border-left: 4px solid #001A3D;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.17, 0.84, 0.44, 1), opacity 0.3s ease;
    pointer-events: auto;
}
.deu-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.deu-toast-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #001A3D;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
}

.deu-toast-body {
    flex: 1 1 auto;
    min-width: 0;
}
.deu-toast-title {
    display: block;
    color: #001A3D;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}
.deu-toast-msg {
    color: #444;
    font-size: 0.875rem;
    line-height: 1.5;
}

.deu-toast-close {
    flex-shrink: 0;
    background: transparent;
    border: 0;
    color: #888;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-top: -2px;
    transition: color 0.2s;
}
.deu-toast-close:hover {
    color: #001A3D;
}

/* Type variants */
.deu-toast-success { border-left-color: #1A7A4A; }
.deu-toast-success .deu-toast-icon { background: #1A7A4A; }
.deu-toast-error   { border-left-color: #8C1515; }
.deu-toast-error   .deu-toast-icon { background: #8C1515; }
.deu-toast-warning { border-left-color: #B8962E; }
.deu-toast-warning .deu-toast-icon { background: #B8962E; }
.deu-toast-info    { border-left-color: #001A3D; }
.deu-toast-info    .deu-toast-icon { background: #001A3D; }

@media (max-width: 575px) {
    #deu-toast-container {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
        max-width: none;
    }
    .deu-toast {
        min-width: 0;
        max-width: 100%;
    }
}

/* ───────────────────────────────────────────────────────────────
   2. Button Loading Spinner
   ─────────────────────────────────────────────────────────────── */
.deu-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 0.5em;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: deu-spin 0.7s linear infinite;
    vertical-align: -0.15em;
}

.deu-btn-loading {
    cursor: progress !important;
    opacity: 0.85;
    pointer-events: none;
}
.deu-btn-loading > * {
    pointer-events: none;
}

@keyframes deu-spin {
    to { transform: rotate(360deg); }
}

/* ───────────────────────────────────────────────────────────────
   3. Başarı Overlay (Full-Screen Animation)
   ─────────────────────────────────────────────────────────────── */
.deu-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 26, 61, 0.85);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.deu-success-overlay.show {
    opacity: 1;
}

.deu-success-card {
    background: #fff;
    border-radius: 12px;
    padding: 3rem 2.5rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.85);
    transition: transform 0.45s cubic-bezier(0.17, 0.84, 0.44, 1);
}
.deu-success-overlay.show .deu-success-card {
    transform: scale(1);
}

.deu-success-check {
    margin: 0 auto 1.5rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.deu-success-check svg {
    transform: scale(0);
    animation: deu-check-pop 0.6s cubic-bezier(0.17, 0.84, 0.44, 1) 0.2s forwards;
}
.deu-success-check svg circle,
.deu-success-check svg path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: deu-check-draw 0.8s ease 0.4s forwards;
}
@keyframes deu-check-pop {
    to { transform: scale(1); }
}
@keyframes deu-check-draw {
    to { stroke-dashoffset: 0; }
}

.deu-success-title {
    font-family: 'Playfair Display', Georgia, serif;
    color: #001A3D;
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
}
.deu-success-msg {
    font-family: 'DM Sans', sans-serif;
    color: #444;
    line-height: 1.6;
    margin: 0;
}
.deu-success-redirect {
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: #888;
    font-style: italic;
}

/* ───────────────────────────────────────────────────────────────
   4. Form Field Error Highlighting
   ─────────────────────────────────────────────────────────────── */
.is-invalid,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: #8C1515 !important;
    box-shadow: 0 0 0 3px rgba(140, 21, 21, 0.12) !important;
    background-image: none !important;
}

.deu-field-error {
    display: block;
    margin-top: 0.4rem;
    color: #8C1515;
    font-size: 0.825rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    line-height: 1.4;
}
.deu-field-error::before {
    content: "⚠ ";
    margin-right: 0.2rem;
}

/* ───────────────────────────────────────────────────────────────
   5. Empty State Component (Boş Veri Ekranı)
   ─────────────────────────────────────────────────────────────── */
.deu-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #ECEAE4;
    max-width: 520px;
    margin: 2rem auto;
}

.deu-empty-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #F0EEE9, #ECEAE4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8C1515;
    font-size: 2.5rem;
}

.deu-empty-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    color: #001A3D;
    margin: 0 0 0.625rem;
    font-weight: 800;
}

.deu-empty-message {
    font-family: 'DM Sans', sans-serif;
    color: #6B6760;
    line-height: 1.7;
    max-width: 420px;
    margin: 0 0 1.5rem;
}

.deu-empty-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.deu-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 1.5rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
}
.deu-empty-btn-primary {
    background: #001A3D;
    color: #fff;
    border-color: #001A3D;
}
.deu-empty-btn-primary:hover {
    background: #fff;
    color: #001A3D;
}
.deu-empty-btn-secondary {
    background: transparent;
    color: #001A3D;
    border-color: #ECEAE4;
}
.deu-empty-btn-secondary:hover {
    background: #001A3D;
    color: #fff;
    border-color: #001A3D;
}

@media (max-width: 575px) {
    .deu-empty-state {
        padding: 2.5rem 1rem;
    }
    .deu-empty-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    .deu-empty-title {
        font-size: 1.2rem;
    }
}

/* ───────────────────────────────────────────────────────────────
   6. Skeleton Loader (yükleme sırasında placeholder)
   ─────────────────────────────────────────────────────────────── */
.deu-skeleton {
    display: block;
    background: linear-gradient(90deg, #F0EEE9 0%, #ECEAE4 50%, #F0EEE9 100%);
    background-size: 200% 100%;
    animation: deu-skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes deu-skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
