/* Modal Error System - Responsive and Elegant */

/* Modal Overlay */
.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.error-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.error-modal {
    background: linear-gradient(135deg, #ffffff 0%, #fefae0 100%);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    border: 2px solid #d4a373;
    position: relative;
}

.error-modal-overlay.show .error-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.error-modal-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #e6c9a8;
    position: relative;
}

.error-modal-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.error-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #3a3a3a;
    margin: 0;
    letter-spacing: -0.01em;
}

.error-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.error-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Modal Body */
.error-modal-body {
    padding: 20px 24px;
}

.error-modal-description {
    font-size: 1rem;
    color: #666;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Error List */
.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.error-item:hover {
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.3);
}

.error-item-icon {
    color: #e74c3c;
    font-size: 16px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

.error-item-text {
    color: #3a3a3a;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
}

/* Modal Footer */
.error-modal-footer {
    padding: 16px 24px 24px;
    text-align: center;
    border-top: 1px solid #e6c9a8;
}

.error-modal-button {
    background: linear-gradient(135deg, #d4a373, #c39667);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(212, 163, 115, 0.3);
    font-family: 'Playfair Display', serif;
}

.error-modal-button:hover {
    background: linear-gradient(135deg, #c39667, #b5895a);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(212, 163, 115, 0.4);
}

.error-modal-button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .error-modal-overlay {
        padding: 16px;
    }
    
    .error-modal {
        max-width: 100%;
        border-radius: 12px;
    }
    
    .error-modal-header {
        padding: 20px 20px 16px;
    }
    
    .error-modal-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .error-modal-title {
        font-size: 1.3rem;
    }
    
    .error-modal-body {
        padding: 16px 20px;
    }
    
    .error-modal-footer {
        padding: 12px 20px 20px;
    }
    
    .error-item {
        padding: 10px 12px;
        margin-bottom: 6px;
    }
    
    .error-item-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .error-modal-overlay {
        padding: 12px;
    }
    
    .error-modal {
        border-radius: 8px;
    }
    
    .error-modal-header {
        padding: 16px 16px 12px;
    }
    
    .error-modal-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .error-modal-title {
        font-size: 1.2rem;
    }
    
    .error-modal-body {
        padding: 12px 16px;
    }
    
    .error-modal-footer {
        padding: 10px 16px 16px;
    }
    
    .error-modal-button {
        padding: 10px 24px;
        font-size: 0.95rem;
    }
}

/* Animation for error items */
.error-item {
    animation: slideInError 0.3s ease forwards;
    opacity: 0;
    transform: translateX(-10px);
}

.error-item:nth-child(1) { animation-delay: 0.1s; }
.error-item:nth-child(2) { animation-delay: 0.2s; }
.error-item:nth-child(3) { animation-delay: 0.3s; }
.error-item:nth-child(4) { animation-delay: 0.4s; }
.error-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInError {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Accessibility */
.error-modal-overlay[aria-hidden="true"] {
    display: none;
}

.error-modal:focus {
    outline: 2px solid #d4a373;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .error-modal {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        border-color: #d4a373;
    }
    
    .error-modal-title {
        color: #ffffff;
    }
    
    .error-modal-description {
        color: #cccccc;
    }
    
    .error-item {
        background: rgba(231, 76, 60, 0.1);
        border-color: rgba(231, 76, 60, 0.3);
    }
    
    .error-item:hover {
        background: rgba(231, 76, 60, 0.15);
    }
    
    .error-item-text {
        color: #ffffff;
    }
    
    .error-modal-header,
    .error-modal-footer {
        border-color: #444;
    }
}