/**
 * HABALOG Notification Popup Styles
 * Responsive & Modern
 */

/* ========================================
   NOTIFICATION CONTAINER
======================================== */

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    pointer-events: none;
}

/* ========================================
   NOTIFICATION POPUP
======================================== */

.notification-popup {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

.notification-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #17a2b8, #2563eb);
}

.notification-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-popup.hide {
    opacity: 0;
    transform: translateX(120%);
}

/* Typ-spezifische Border-Farben */
.notification-info::before {
    background: linear-gradient(135deg, #17a2b8, #2563eb);
}

.notification-success::before {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification-warning::before {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.notification-error::before {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ========================================
   NOTIFICATION ICON
======================================== */

.notification-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   NOTIFICATION CONTENT
======================================== */

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.3;
}

.notification-message {
    margin: 0;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    word-wrap: break-word;
}

/* ========================================
   NOTIFICATION BUTTONS
======================================== */

.notification-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.notification-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.notification-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-btn-primary {
    background: linear-gradient(135deg, #17a2b8, #2563eb);
    color: white;
}

.notification-btn-primary:hover {
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.4);
}

.notification-btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.notification-btn-secondary:hover {
    background: #cbd5e1;
}

.notification-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.notification-btn-success:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.notification-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.notification-btn-danger:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* ========================================
   NOTIFICATION CLOSE BUTTON
======================================== */

.notification-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.3s ease;
    padding: 0;
}

.notification-close:hover {
    background: #e2e8f0;
    color: #1e3a5f;
    transform: rotate(90deg);
}

.notification-close svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Icon Animation */
.notification-icon svg {
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 768px) {
    #notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .notification-popup {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .notification-icon {
        width: 40px;
        height: 40px;
    }

    .notification-icon svg {
        width: 24px;
        height: 24px;
    }

    .notification-title {
        font-size: 1rem;
    }

    .notification-message {
        font-size: 0.9rem;
    }

    .notification-buttons {
        flex-direction: column;
    }

    .notification-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    #notification-container {
        top: 5px;
        right: 5px;
        left: 5px;
    }

    .notification-popup {
        padding: 1rem;
        gap: 0.75rem;
    }

    .notification-icon {
        width: 36px;
        height: 36px;
    }

    .notification-title {
        font-size: 0.95rem;
    }

    .notification-message {
        font-size: 0.85rem;
    }

    .notification-close {
        width: 28px;
        height: 28px;
        top: 0.75rem;
        right: 0.75rem;
    }

    .notification-close svg {
        width: 16px;
        height: 16px;
    }

    .notification-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   DARK MODE SUPPORT (optional)
======================================== */

@media (prefers-color-scheme: dark) {
    .notification-popup {
        background: #1e293b;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    .notification-title {
        color: #f1f5f9;
    }

    .notification-message {
        color: #cbd5e1;
    }

    .notification-close {
        background: #334155;
        color: #cbd5e1;
    }

    .notification-close:hover {
        background: #475569;
        color: #f1f5f9;
    }

    .notification-btn-secondary {
        background: #334155;
        color: #cbd5e1;
    }

    .notification-btn-secondary:hover {
        background: #475569;
    }
}

/* ========================================
   SPECIAL EFFECTS
======================================== */

/* Success Checkmark Animation */
.notification-success .notification-icon svg {
    animation: successCheck 0.6s ease-in-out;
}

@keyframes successCheck {
    0% {
        transform: scale(0) rotate(-45deg);
    }
    50% {
        transform: scale(1.2) rotate(-45deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Error Shake Animation */
.notification-error .notification-icon svg {
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Warning Bounce Animation */
.notification-warning .notification-icon svg {
    animation: warningBounce 0.6s ease-in-out;
}

@keyframes warningBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* ========================================
   LOADING STATE
======================================== */

.notification-loading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(135deg, #17a2b8, #2563eb);
    animation: loading 3s linear forwards;
}

@keyframes loading {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}