/**
 * General Coordinate Converter Styles
 * Enhanced styles based on the Latin America converter design
 */

/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #333;
    line-height: 1.6;
}

h3, h4, h5, h6 {
    font-weight: 600;
}

/* Map styles */
#map {
    height: 400px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

#map:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.map-container {
    position: relative;
}

/* Social media menu */
.social-icon {
    display: inline-block;
    margin: 5px;
    color: white;
    background-color: #007bff;
    padding: 10px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    text-align: center;
    transition: all 0.3s ease;
}

.social-icon i {
    font-size: 20px;
}

.social-icon:hover {
    color: #fff;
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* Typography adjustments */
header nav ul.nav li.nav-item a.nav-link {
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

header nav ul.nav li.nav-item a.nav-link:hover {
    color: rgba(255, 255, 255, 0.85) !important;
}

p {
    font-size: 0.95rem;
}

.recommendations a {
    font-weight: 500;
    text-decoration: none;
}

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

/* Form group styling */
.form-group {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-group:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.conversion-form h4 {
    color: #007bff;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.conversion-form:nth-child(2) h4 {
    color: #17a2b8;
}

.conversion-form:nth-child(3) h4 {
    color: #28a745;
}

.conversion-form:nth-child(4) h4 {
    color: #ffc107;
}

/* Datum selection styling */
.datum-selection {
    background-color: #fff;
    border: 1px solid #e9ecef;
}

.datum-selection h6 {
    margin-bottom: 8px;
    color: #495057;
}

/* Draggable marker style */
.leaflet-marker-draggable {
    cursor: move;
}

/* Map information box */
.map-info {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    border-left: 3px solid #007bff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.map-info i {
    color: #007bff;
}

/* Datum info and badges */
.datum-info {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 5px;
}

.datum-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 5px;
    border-radius: 3px;
    background-color: #e9ecef;
    margin-right: 3px;
}

/* Conversion buttons */
.btn-convert {
    background-color: #28a745;
    border-color: #28a745;
    transition: all 0.3s ease;
}

.btn-convert:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-1px);
}

.btn-action {
    transition: all 0.3s ease;
}

.btn-action:hover {
    transform: translateY(-1px);
}

/* Reference notes */
.reference-note {
    font-size: 0.85rem;
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-left: 3px solid #007bff;
    margin: 15px 0;
    border-radius: 4px;
}

/* Information section */
.info-section {
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.info-section h5 {
    color: #007bff;
    margin-bottom: 10px;
}

.info-section ul {
    padding-left: 20px;
}

.info-section ul li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* System badges */
.badge-primary {
    background-color: #007bff;
}

.badge-info {
    background-color: #17a2b8;
}

.badge-success {
    background-color: #28a745;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-secondary {
    background-color: #6c757d;
}

/* Form input styling */
.form-control {
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Labels */
label {
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: #495057;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .form-row .col {
        margin-bottom: 10px;
    }
    
    .form-group {
        padding: 12px;
    }
    
    .social-icon {
        margin: 3px;
        width: 38px;
        height: 38px;
        padding: 8px;
    }
    
    .social-icon i {
        font-size: 18px;
    }
}

/* Animation for focus */
.form-control:focus {
    animation: highlight-border 0.5s ease;
}

@keyframes highlight-border {
    0% { border-color: #ced4da; }
    50% { border-color: #80bdff; }
    100% { border-color: #80bdff; }
}

/* Success highlight */
.highlight-success {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0% { background-color: transparent; }
    50% { background-color: rgba(40, 167, 69, 0.1); }
    100% { background-color: transparent; }
}

/* Header and footer styling */
header.bg-primary {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
}

footer {
    border-top: 1px solid #dee2e6;
}

/* Ajuste para campos UTM en móviles */
@media (max-width: 768px) {
    /* Contenedor especial para UTM Estándar */
    .utm-container .form-row {
        display: block;
    }
    
    /* Fila para Zona y Hemisferio */
    .utm-row-1 {
        display: flex;
        margin-bottom: 10px;
    }
    
    .utm-row-1 .col {
        flex: 1;
        padding-right: 5px;
        padding-left: 5px;
    }
    
    /* Fila para Este y Norte */
    .utm-row-2 {
        display: flex;
    }
    
    .utm-row-2 .col {
        flex: 1;
        padding-right: 5px;
        padding-left: 5px;
    }
    
    /* Aseguramos que los campos de Este y Norte tengan más espacio */
    .utm-container input[type="number"] {
        width: 100%;
    }
}

/* Garantizar que en escritorio se mantenga el diseño original */
@media (min-width: 769px) {
    .utm-row-1, .utm-row-2 {
        width: 100%;
    }
}