/**
 * Component Styles
 * Estilos reutilizables para componentes UI creados por UIComponents.js
 */

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: #0a9396;
    text-decoration: none;
    cursor: pointer;
    margin: 0 5px;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 5px;
    color: #999;
}

/* Search Bar with Filters */
.search-bar-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-bar input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-bar button {
    padding: 12px 20px;
    background-color: #0a9396;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.search-bar button:hover {
    background-color: #088989;
}

.search-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-filter label {
    font-weight: 500;
    font-size: 13px;
}

.search-filter select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.search-filter input[type="checkbox"] {
    cursor: pointer;
}

/* Table of Contents */
.table-of-contents {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
    max-width: 300px;
    position: sticky;
    top: 20px;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin: 8px 0;
    padding: 4px 0;
}

.table-of-contents a {
    color: #0a9396;
    text-decoration: none;
    font-size: 13px;
    display: block;
    padding: 4px 8px;
    border-radius: 3px;
}

.table-of-contents a:hover {
    background-color: #e0f2f1;
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.modal-close-button {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-button:hover {
    color: #333;
}

.modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Notification */
.notification {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    border-left: 4px solid #0a9396;
    background-color: #e0f7f6;
    color: #333;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    border-left-color: #4caf50;
    background-color: #e8f5e9;
}

.notification.error {
    border-left-color: #f44336;
    background-color: #ffebee;
}

.notification.warning {
    border-left-color: #ff9800;
    background-color: #fff3e0;
}

.notification-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

.notification-close:hover {
    color: #333;
}

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

/* Theme Toggle Button */
.theme-toggle {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.theme-toggle:hover {
    background-color: #e0e0e0;
}

/* Loading Indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0a9396;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-text {
    color: #666;
    font-size: 14px;
}

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

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #0a9396;
    color: white;
    padding: 12px 15px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.scroll-to-top.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top:hover {
    background-color: #088989;
    transform: scale(1.1);
}

/* Header */
#app-header {
    background-color: white;
    border-bottom: 2px solid #e0e0e0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    font-size: 18px;
    font-weight: bold;
    color: #0a9396;
}

.header-nav {
    display: flex;
    gap: 15px;
}

.header-nav button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
}

.header-nav button:hover {
    color: #0a9396;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Footer */
#app-footer {
    background-color: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    padding: 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.footer-section {
    text-align: center;
}

.footer-section h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #666;
}

.footer-section a {
    color: #0a9396;
    text-decoration: none;
    font-size: 12px;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-copyright {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
    }

    .search-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    #app-header {
        flex-direction: column;
        gap: 10px;
    }

    .header-left,
    .header-right {
        width: 100%;
        justify-content: center;
    }

    .table-of-contents {
        position: static;
        margin: 15px 0;
        max-width: 100%;
    }

    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        padding: 10px 12px;
        font-size: 16px;
    }
}
