/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

.loading-content {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-message {
    margin-top: 1rem;
    color: #333;
    font-size: 1.1rem;
}

/* Messages */
.messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    width: 90%;
}

.message {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.message.fade-out {
    animation: fadeOut 0.3s ease-out;
    opacity: 0;
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.message i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.message.warning {
    background-color: #fff8e1;
    color: #f57f17;
    border-left: 4px solid #ffc107;
}

.message.info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-close:hover {
    opacity: 1;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    margin-top: 1rem;
}

.progress {
    width: 100%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #4caf50;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .messages-container {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .loading-content {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .no-print,
    .messages-container,
    .loading-overlay {
        display: none !important;
    }
}
