/**
 * Common UI Styles
 * Basic structure - to be enhanced later
 */

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

.loading-text {
    color: white;
    font-size: 1.2rem;
}

/* Overlay (Spinner) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

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

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

/* Page Container */
.page-container {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Alert Container */
#alertContainer {
    position: fixed;
    top: 0;
    right: 0;
    padding: 1rem;
    z-index: 1055;
    max-width: 400px;
}

#alertContainer .alert {
    margin-bottom: 0.5rem;
}

/* Page Message */
#pageMessageDiv {
    margin: 1rem 0;
}

/* Menu Styles */
.main-menu {
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 0;
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

.menu-logo a {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.menu-items {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.menu-items li a,
.menu-items li button {
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
}

.menu-items li a:hover,
.menu-items li button:hover {
    color: #007bff;
}

.menu-items li a.active {
    color: #007bff;
    font-weight: bold;
}

.lang-switcher {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.lang-menu.show {
    display: block;
}

.lang-item {
    margin: 0;
}

.lang-link {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    text-align: left;
    text-decoration: none;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    transition: background-color 0.2s;
}

.lang-link:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Footer Styles */
.main-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    text-align: center;
    color: #6c757d;
}

/* Modal Styles */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
}

.image-preview-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: pointer;
}

.confirm-modal,
.message-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.confirm-modal-content,
.message-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.confirm-modal-content h4,
.message-modal-content h4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: #333;
}

.confirm-modal-content p,
.message-modal-content p {
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.6;
}

.confirm-modal-buttons,
.message-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-modal-buttons button,
.message-modal-buttons button {
    min-width: 100px;
}

.confirm-modal-content img,
.message-modal-content img {
    display: block;
    margin: 0 auto;
}

/* Dark theme support */
[data-theme="dark"] .confirm-modal-content,
[data-theme="dark"] .message-modal-content {
    background-color: #2d2d2d;
    color: #e0e0e0;
}

[data-theme="dark"] .confirm-modal-content h4,
[data-theme="dark"] .message-modal-content h4 {
    color: #e0e0e0;
}

[data-theme="dark"] .confirm-modal-content p,
[data-theme="dark"] .message-modal-content p {
    color: #b0b0b0;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu-items {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .confirm-modal-content,
    .message-modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .confirm-modal-buttons,
    .message-modal-buttons {
        flex-direction: column;
    }
    
    .confirm-modal-buttons button,
    .message-modal-buttons button {
        width: 100%;
    }
}

