/* base.css */

/* Base layout styles */
html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
}

main {
    flex: 1;
    padding-bottom: 40px;  /* Space before footer */
}

/* Estilos del Navbar */
.navbar {
    background-color: #2c3e50 !important;
    padding: 15px 0;
    font-family: 'Roboto', sans-serif;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.navbar-brand a {
    color: #ecf0f1;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand a:hover {
    color: #3498db;
}

.navbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.navbar-menu li {
    position: relative;
}

.navbar-menu a {
    color: #ecf0f1 !important;
    text-decoration: none;
    padding: 8px 16px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.navbar-menu a:hover {
    background-color: #34495e;
    color: #ecf0f1 !important;
}

/* Login Button */
.login-button {
    background-color: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Dropdown Styles */
.dropdown .dropbtn {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ecf0f1 !important;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #34495e;
    min-width: 260px;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
}

.dropdown-content a {
    color: #ecf0f1 !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: #2c3e50;
    color: #ecf0f1 !important;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Logout Link */
.logout-link {
    color: #e74c3c !important;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 5px;
    padding-top: 12px;
}

.logout-link:hover {
    background-color: #c0392b !important;
    color: white !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar-brand {
        margin-bottom: 15px;
    }

    .navbar-menu {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .navbar-menu li {
        width: 100%;
    }

    .navbar-menu a {
        width: 100%;
        display: block;
    }

    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .login-button {
        width: 100%;
        text-align: center;
    }
}

/* Footer styles */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

footer p {
    margin: 5px 0;
}

footer small {
    display: block;
    margin-top: 10px;
    color: #ecf0f1;
}

/* Toast styles */
.toast {
    background-color: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    padding: 0 !important;
    margin-bottom: 10px !important;
    min-width: 300px !important;
    max-width: 400px !important;
    color: #212529 !important;
    border: none !important;
}

.toast-header {
    padding: 12px 16px !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    border-top-left-radius: 8px !important;
    border-top-right-radius: 8px !important;
    background-color: #fff !important;
}

.toast-body {
    padding: 12px 16px !important;
    color: #212529 !important;
}

.toast-success .toast-header {
    background-color: #28a745 !important;
    color: #fff !important;
}

.toast-error .toast-header {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.toast-info .toast-header {
    background-color: #17a2b8 !important;
    color: #fff !important;
}

.toast-warning .toast-header {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

.toast .toast-close-button {
    color: inherit !important;
    opacity: 0.8 !important;
    text-shadow: none !important;
    font-size: 1.2rem !important;
    font-weight: 400 !important;
    padding: 0 !important;
    margin-left: 8px !important;
}

.toast .toast-close-button:hover {
    opacity: 1 !important;
}

.toast .toast-message {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    margin-right: 10px !important;
    color: inherit !important;
}

.toast .toast-progress {
    background-color: rgba(255,255,255,0.3) !important;
}

.toast .toast-progress .toast-progress-bar {
    background-color: rgba(255,255,255,0.7) !important;
}

/* Modal Width Fixes - Override Bootstrap defaults */

/* Contact Modal - make wider for better form UX */
#contactModal .modal-dialog {
    max-width: 700px !important;
    width: 90% !important;
}

@media (min-width: 768px) {
    #contactModal .modal-dialog {
        max-width: 700px !important;
        width: 700px !important;
    }
}

/* Create Alert Modal - make wider for better form UX */
#createAlertModal .modal-dialog {
    max-width: 800px !important;
    width: 90% !important;
}

@media (min-width: 768px) {
    #createAlertModal .modal-dialog {
        max-width: 800px !important;
        width: 800px !important;
    }
}
