/**
 * Form Restore Notification - Bottom Banner Style
 * Pfad: public/assets/css/modules/form-restore.css
 * 
 * Funktionen:
 * - Fixed Bottom Banner am unteren Seitenrand
 * - Slide-in Animation von unten
 * - An Bibercare-Farben angepasst
 * - Responsive Design
 * - Accessibility-Features
 */

/* ==========================================================================
   Form Restore Container - Fixed Bottom
   ========================================================================== */

#form-restore-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    pointer-events: none;
}

#form-restore-container > * {
    pointer-events: auto;
}

/* ==========================================================================
   Form Restore Notification Banner
   ========================================================================== */

.form-restore-notification {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e4080 100%);
    border-top: 3px solid var(--accent-color);
    padding: 1.25rem 2rem;
    box-shadow: 0 -4px 20px rgba(44, 90, 160, 0.3);
    transform: translateY(100%);
    opacity: 0;
    animation: slideInFromBottom 0.4s ease-out forwards;
    color: white;
    position: relative;
}

@keyframes slideInFromBottom {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.form-restore-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.form-restore-icon {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.form-restore-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.form-restore-text {
    flex: 1;
    min-width: 300px;
}

.form-restore-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-restore-message {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.form-restore-timestamp {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.form-restore-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.form-restore-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.form-restore-close:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ==========================================================================
   Action Buttons - Horizontal Layout
   ========================================================================== */

.form-restore-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.form-restore-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    white-space: nowrap;
}

.form-restore-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Wiederherstellen Button - Primär */
.form-restore-btn.restore {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.form-restore-btn.restore:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Verwerfen Button */
.form-restore-btn.discard {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.form-restore-btn.discard:hover {
    background: rgba(255, 67, 54, 0.9);
    border-color: rgba(255, 67, 54, 0.9);
    transform: translateY(-2px);
}

/* Später Button */
.form-restore-btn.later {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
}

.form-restore-btn.later:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Status Badge
   ========================================================================== */

.form-restore-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.form-restore-status.auto-saved {
    background: rgba(72, 187, 120, 0.3);
}

/* ==========================================================================
   Animation States
   ========================================================================== */

.form-restore-notification.hiding {
    animation: slideOutToBottom 0.3s ease-in forwards;
}

@keyframes slideOutToBottom {
    to {
        transform: translateY(110%);
        opacity: 0;
    }
}

.form-restore-notification.restoring .form-restore-icon {
    animation: pulse 1s infinite;
}

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

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 968px) {
    .form-restore-notification {
        padding: 1rem 1.5rem;
    }
    
    .form-restore-header {
        gap: 1rem;
    }
    
    .form-restore-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-restore-text {
        min-width: auto;
        width: 100%;
    }
    
    .form-restore-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .form-restore-notification {
        padding: 1rem;
    }
    
    .form-restore-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .form-restore-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .form-restore-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .form-restore-btn {
        flex: 1;
        min-width: calc(50% - 0.25rem);
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
    
    .form-restore-btn.later {
        min-width: 100%;
        order: 3;
    }
    
    .form-restore-close {
        top: 1rem;
        right: 1rem;
        transform: none;
        width: 32px;
        height: 32px;
    }
    
    .form-restore-title {
        font-size: 0.95rem;
    }
    
    .form-restore-message {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .form-restore-btn {
        min-width: 100%;
    }
}

/* ==========================================================================
   Accessibility Features
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .form-restore-notification,
    .form-restore-notification.hiding {
        animation: none;
        transform: translateY(0);
        opacity: 1;
    }
    
    .form-restore-notification.hiding {
        display: none;
    }
    
    .form-restore-notification.restoring .form-restore-icon {
        animation: none;
    }
    
    .form-restore-btn {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-restore-notification {
        background: black;
        border-top-color: white;
    }
    
    .form-restore-btn.restore {
        background: white;
        color: black;
        font-weight: 700;
    }
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}