
body {
    background-color: #f8f9fa;
    font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
}

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

.ui.segment h1.ui.header {
    color: #004B78; /* Massy Navy Blue */
    margin-bottom: 0.5rem;
}

/* Estilos para el header con layout flexbox */
.header-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Estilos para el acordeón con colores corporativos de Massy */
.ui.accordion .title {
    background-color: #004B78; /* Light Massy Blue */
    color:  #FFD300 !important; /* Massy Navy Blue */
    border: 1px solid #00AEEF; /* Massy Blue */
    font-weight: 600;
    font-size: 1.1rem;
}

.ui.accordion .title:hover {
    background-color: #004B78; /* Slightly darker light blue */
}

.ui.accordion .title.active {
    background-color: #00AEEF !important; /* Massy Navy Blue */
    color: #00AEEF;
}

.ui.accordion .title i {
    color: #00AEEF; /* Massy Blue */
    margin-right: 0.5rem;
}

.ui.accordion .title.active i {
    color: #00AEEF;
}

.ui.accordion .title .dropdown.icon {
    color: white; /* Massy Blue */
    margin-right: 0.5rem;
}

.ui.accordion .title.active .dropdown.icon {
    color: white;
}

.ui.accordion .content {
    border: 1px solid #E0E0E0;
    border-top: none;
    background-color: #FAFAFA;
}

.ui.accordion .content.active {
    background-color: white;
}

/* Estilos para el modal de mapa */
.ui.fullscreen.modal {
    width: 95vw !important;
    height: 95vh !important;
    margin: 2.5vh auto !important;
}

.ui.fullscreen.modal .content {
    padding: 0 !important;
}

#map {
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ui.fullscreen.modal .header {
    background-color: #004B78; /* Massy Navy Blue */
    color: white;
    border-bottom: 1px solid #00AEEF; /* Massy Blue */
}

.ui.fullscreen.modal .header i {
    color: white;
    margin-right: 0.5rem;
}

.ui.fullscreen.modal .actions {
    background-color: #FAFAFA;
    border-top: 1px solid #E0E0E0;
}

/* Estilos para campos de coordenadas de solo lectura */
input[readonly] {
    background-color: #F5F5F5 !important;
    color: #666 !important;
    cursor: not-allowed !important;
}

input[readonly]:focus {
    border-color: #E0E0E0 !important;
    box-shadow: none !important;
}

/* Estilos para el modal de errores de validación */
.ui.modal .header {
    background-color: #004B78; /* Massy Navy Blue */
    color: white;
    border-bottom: 1px solid #00AEEF; /* Massy Blue */
}

.ui.modal .header i {
    color: white;
    margin-right: 0.5rem;
}

.ui.modal .actions {
    background-color: #FAFAFA;
    border-top: 1px solid #E0E0E0;
}

/* Estilos para la lista de errores */
.error-link {
    color: #004B78 !important; /* Massy Navy Blue */
    text-decoration: none !important;
    display: block;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.error-link:hover {
    background-color: #E6F7FF; /* Light Massy Blue */
    color: #003A5F !important; /* Darker Navy Blue */
}

.error-link i {
    color: #00AEEF; /* Massy Blue */
    margin-right: 0.5rem;
}

.error-link strong {
    color: #004B78; /* Massy Navy Blue */
}

/* Estilos para mensajes de error */
.ui.error.message {
    background-color: #FFF2F2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
}

.ui.error.message .header {
    color: #DC2626;
    font-weight: bold;
}

/* Estilos para mensajes de información */
.ui.info.message {
    background-color: #E6F7FF; /* Light Massy Blue */
    color: #004B78; /* Massy Navy Blue */
    border: 1px solid #00AEEF; /* Massy Blue */
}

.ui.info.message i {
    color: #00AEEF; /* Massy Blue */
}

/* Estilos adicionales para el modal de errores */
#errorsModal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1001 !important;
    max-width: 600px !important;
    width: 90% !important;
    max-height: 70vh !important;
}

#errorsModal .content {
    max-height: 50vh !important;
    overflow-y: auto !important;
    padding-right: 1rem !important;
}

#errorsModal .content::-webkit-scrollbar {
    width: 8px;
}

#errorsModal .content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#errorsModal .content::-webkit-scrollbar-thumb {
    background: #00AEEF;
    border-radius: 4px;
}

#errorsModal .content::-webkit-scrollbar-thumb:hover {
    background: #004B78;
}

#errorsModal.active {
    display: block !important;
}

#errorsModal.visible {
    opacity: 1 !important;
}

/* Backdrop styles */
.ui.dimmer.modals {
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1000 !important;
}

/* Estilos para la sección de campos faltantes en el modal de confirmación */
#missingFieldsSection {
    margin-top: 1rem;
    border: 1px solid #FCA5A5;
    border-radius: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

#missingFieldsList {
    margin-top: 0.5rem;
    padding-right: 1rem;
}

#missingFieldsList li {
    padding: 0.25rem 0;
    color: #DC2626;
}

#missingFieldsList li i {
    color: #00AEEF; /* Massy Blue */
    margin-right: 0.5rem;
}

#missingFieldsList li strong {
    color: #004B78; /* Massy Navy Blue */
}

/* Scrollbar personalizado para la sección de campos faltantes */
#missingFieldsSection::-webkit-scrollbar {
    width: 8px;
}

#missingFieldsSection::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#missingFieldsSection::-webkit-scrollbar-thumb {
    background: #00AEEF;
    border-radius: 4px;
}

#missingFieldsSection::-webkit-scrollbar-thumb:hover {
    background: #004B78;
}

/* Estilos para el mensaje de completar campos */
.completion-message {
    margin-bottom: 1rem;
    border: 1px solid #00AEEF;
    background-color: #E6F7FF;
}

.completion-message .header {
    color: #004B78;
    font-weight: bold;
}

.completion-message i {
    color: #00AEEF;
}

/* Centrar el botón Cancel en el modal de confirmación */
#confirmationModal .actions {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    min-height: 80px;
}

#confirmationModal .actions .ui.cancel.button {
    margin: 0 auto;
    padding: 1rem 2rem;
    min-height: 50px;
}

.svg-container {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.svg-container svg {
    width: 100%;
    height: 100%;
    max-width: 80px;
    max-height: 80px;
}

.title-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.title-container i {
    font-size: 1.2rem;
    color: #00AEEF; /* Massy Blue */
}

.ui.segment h1.ui.header i {
    margin-right: 0.5rem;
}

.ui.segment h2.ui.header {
    color: #333;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.ui.segment h2.ui.header i {
    margin-right: 0.5rem;
    color: #00AEEF; /* Massy Blue */
}

.ui.form .field.required label::after {
    content: ' *';
    color: #db2828;
    font-weight: bold;
}

.ui.form .field.error input,
.ui.form .field.error select,
.ui.form .field.error textarea {
    border-color: #db2828;
    background-color: #fff2f2;
}

.ui.form .field.error input:focus,
.ui.form .field.error select:focus,
.ui.form .field.error textarea:focus {
    border-color: #db2828;
    box-shadow: 0 0 0 2px rgba(219, 40, 40, 0.2);
}

.error-message {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.ui.pointing.red.basic.label.error-message {
    background-color: #fff2f2;
    color: #db2828;
    border: 1px solid #db2828;
}

.ui.pointing.blue.basic.label {
    background-color: #E6F7FF; /* Light Massy Blue */
    color: #004B78; /* Massy Navy Blue */
    border: 1px solid #00AEEF; /* Massy Blue */
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.destination-item {
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    background-color: #fafafa;
}

.destination-item .ui.header {
    background-color: #E6F7FF; /* Light Massy Blue */
    margin: -1rem -1rem 1rem -1rem;
    padding: 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    border-bottom: 1px solid #00AEEF; /* Massy Blue border */
}

.destination-item .ui.header i {
    color: #004B78; /* Massy Navy Blue */
    margin-right: 0.5rem;
}

.destination-item .remove-destination {
    float: right;
    margin-top: -0.25rem;
}

.ui.primary.button {
    background-color: #004B78; /* Massy Navy Blue */
    color: white;
}

.ui.primary.button:hover {
    background-color: #003A5F; /* Darker Navy Blue */
}

.ui.blue.button {
    background-color: #00AEEF; /* Massy Blue */
    color: white;
}

.ui.blue.button:hover {
    background-color: #0096D1; /* Darker Blue */
}

/* Botón especial con color naranja de Massy */
.ui.orange.button {
    background-color: #FF8200; /* Massy Orange */
    color: white;
}

.ui.orange.button:hover {
    background-color: #E67300; /* Darker Orange */
}

.ui.red.button {
    background-color: #db2828;
    color: white;
}

.ui.red.button:hover {
    background-color: #b21e1e;
}

.ui.modal .header {
    background-color: #003A5F; /* Light Massy Blue */
    border-bottom: 1px solid #00AEEF; /* Massy Blue */
}

.ui.modal .header i {
    color: #FFD300; /* Massy Navy Blue */
    margin-right: 0.5rem;
}

.ui.modal .actions {
    background-color: #fafafa;
    border-top: 1px solid #e0e0e0;
}

#notificationContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

/* Logout button styles */
.logout-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-shadow: 0 4px 8px #babbbc;
    transition: all 0.3s ease;
    margin: 0;
    font-weight: 600;
}

/* Panic button styles */
.panic-button {
    background-color: #910000;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-shadow: 0 4px 8px #910000;
    transition: all 0.3s ease;
    margin: 0;
    font-weight: 600;
}

.logout-button i {
    margin-right: 0;
}

.logout-button-text {
    white-space: nowrap;
}

.logout-button:hover {
    box-shadow: 0 6px 12px #575b5e;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .logout-button {
        padding: 8px 12px !important;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .logout-button {
        width: 48px !important;
        min-width: 48px;
        height: 48px;
        padding: 0 !important;
        border-radius: 12px;
        gap: 0;
    }

    
    .ui.basic.blue.button, .ui.negative.basic.button {
        width: 48%;
        margin-bottom: 0.5rem;
    }    
    
    .logout-button-text {
        /*display: none;*/
    }
}

.ui.message {
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ui.success.message {
    background-color: #E6F7FF; /* Light Massy Blue */
    color: #004B78; /* Massy Navy Blue */
    border: 1px solid #00AEEF; /* Massy Blue */
}

.ui.error.message {
    background-color: #FFF2F2;
    color: #DC2626;
    border: 1px solid #FCA5A5;
}

.ui.info.message {
    background-color: #E6F7FF; /* Light Massy Blue */
    color: #004B78; /* Massy Navy Blue */
    border: 1px solid #00AEEF; /* Massy Blue */
}

.ui.warning.message {
    background-color: #FFF8E1; /* Light Massy Yellow */
    color: #B8860B; /* Darker Yellow */
    border: 1px solid #FFD300; /* Massy Yellow */
}

@media (max-width: 768px) {
    .ui.container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .ui.segment {
        margin: 0.5rem 0;
        padding: 1rem;
    }
    
    /* Ajustes responsivos para el header */
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .svg-container {
        width: 60px;
        height: 60px;
    }
    
    .title-container {
        font-size: 1.2rem;
        justify-content: center;
    }
    
    .two.fields,
    .three.fields {
        flex-direction: column;
    }
    
    .two.fields .field,
    .three.fields .field {
        width: 100% !important;
        margin-bottom: 1rem;
    }
    
    #notificationContainer {
        position: fixed;
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .destination-item .ui.header {
        font-size: 1.1rem;
    }
    
    .destination-item .remove-destination {
        float: none;
        display: block;
        margin-top: 0.5rem;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ui.container {
        margin: 0.5rem auto;
        padding: 0 0.25rem;
    }
    
    .ui.segment {
        margin: 0.25rem 0;
        padding: 0.75rem;
    }
    
    /* Ajustes adicionales para pantallas muy pequeñas */
    .svg-container {
        width: 50px;
        height: 50px;
    }
    
    .title-container {
        font-size: 1rem;
    }
    
    .ui.form .field {
        margin-bottom: 1rem;
    }
    
    .ui.button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .ui.button:last-child {
        margin-bottom: 0;
    }
}

.ui.form .field label {
    font-weight: 600;
    color: #333;
}

.ui.form input:focus,
.ui.form select:focus,
.ui.form textarea:focus {
    outline: 2px solid #00AEEF; /* Massy Blue */
    outline-offset: 2px;
}

.ui.button:focus {
    outline: 2px solid #00AEEF; /* Massy Blue */
    outline-offset: 2px;
}

.ui.button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.ui.form .field.success input,
.ui.form .field.success select,
.ui.form .field.success textarea {
    border-color: #00AEEF; /* Massy Blue */
    background-color: #E6F7FF; /* Light Massy Blue */
}

.ui.form .field.success input:focus,
.ui.form .field.success select:focus,
.ui.form .field.success textarea:focus {
    border-color: #00AEEF; /* Massy Blue */
    box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.2);
}

.ui.dropdown .menu {
    max-height: 200px;
    overflow-y: auto;
}

.ui.search.dropdown .menu {
    max-height: 300px;
}

.destination-item .ui.header {
    position: relative;
}

.destination-item .ui.header::before {
    content: counter(destination-counter);
    counter-increment: destination-counter;
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: #004B78; /* Massy Navy Blue */
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

#destinationsContainer {
    counter-reset: destination-counter;
}

@media print {
    .ui.button,
    .ui.modal,
    #notificationContainer {
        display: none !important;
    }
    
    .ui.segment {
        border: 1px solid #000;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
    
    .destination-item {
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Fondo blanco con 90% de opacidad para segmentos y formularios */
.ui.segment {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

#travelForm.ui.form,
.ui.form {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    /* Forzar fondo blanco con opacidad incluso en modo oscuro */
    .ui.segment {
        background-color: rgba(255, 255, 255, 0.9) !important;
        border-color: #e0e0e0 !important;
        color: #333 !important;
    }
    
    #travelForm.ui.form,
    .ui.form {
        background-color: rgba(255, 255, 255, 0.9) !important;
    }
    
    .ui.form input,
    .ui.form select,
    .ui.form textarea {
        background-color: #ffffff;
        border-color: #ddd;
        color: #333;
    }
    
    .ui.form input:focus,
    .ui.form select:focus,
    .ui.form textarea:focus {
        background-color: #ffffff;
        border-color: #00AEEF;
    }
    
    .destination-item {
        background-color: rgba(255, 255, 255, 0.9) !important;
        border-color: #e0e0e0 !important;
    }
    
    .destination-item .ui.header {
        background-color: #E6F7FF;
        border-color: #00AEEF;
        color: #004B78;
    }
}
