/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1, h2, h3, h4, h5 {
    color: #333;
}

/* Secciones */
.section {
    margin-bottom: 20px;
}

.section-title {
    background-color: #007bff;
    color: white;
    padding: 15px;
    margin: 0 0 20px 0;
    border-radius: 5px;
}

/* Formularios */
form {
    display: flex;
    flex-direction: column;
}

input, select, button {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

input[type="radio"] {
    transform: scale(1.2);
    margin-right: 10px;
}

input[type="email"] {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Botones de tipo de vehículo */
#vehicleTypeButtons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.vehicle-type-button {
    background-color: #DAA520;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.vehicle-type-button i {
    margin-right: 10px;
}

.vehicle-type-button.selected {
    background-color: #007bff;
}

/* Opciones del menú */
#menuOptions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.menu-option {
    background-color: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100px;
}

.menu-option:hover {
    background-color: #e0e0e0;
    transform: translateY(-3px);
}

.menu-option.selected {
    background-color: #007bff;
    color: white;
}

.menu-option i {
    font-size: 2em;
    margin-bottom: 10px;
}

.menu-option span {
    font-size: 0.9em;
}

.menu-option.inactive {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.menu-option.inactive:hover {
    background-color: #cccccc;
    transform: none;
}

/* Política de privacidad */
.privacy-policy {
    margin-bottom: 10px;
}

.privacy-policy a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-policy a:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* Botones de control */
.control-button {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#selectAll {
    background-color: #28a745;
}

#selectAll:hover {
    background-color: #218838;
}

#deselectAll {
    background-color: #dc3545;
}

#deselectAll:hover {
    background-color: #c82333;
}

#startEvaluation {
    background-color: #ffc107;
    color: #000;
}

#startEvaluation:hover {
    background-color: #e0a800;
}

/* Secciones de evaluación */
.evaluation-section {
    margin-bottom: 30px;
    display: none;
    transition: opacity 0.3s ease;
}

.evaluation-section.active {
    display: block;
    opacity: 1;
}

.evaluation-content {
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.evaluation-item {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    transition: box-shadow 0.3s ease;
}

.evaluation-item:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.option:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
}

.image-placeholder {
    width: 100%;
    max-width: 300px; /* Increased from 200px */
    height: 200px; /* Increased from 150px */
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    font-style: italic;
    color: #666;
    border: 1px dashed #ccc;
    transition: all 0.3s ease;
    overflow: hidden;
}

.image-placeholder:hover {
    background-color: #e0e0e0;
}

.image-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Changed from cover to contain */
}

.option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

.option input[type="radio"] {
    margin-top: 10px;
}

/* Botones de navegación */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.nav-button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background-color: #0056b3;
}

#finishEvaluation {
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    margin: 20px auto;
    display: block;
    transition: background-color 0.3s ease;
}

#finishEvaluation:hover {
    background-color: #218838;
}

/* Tabla de resultados */
#resultTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#resultTable th, #resultTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#resultTable th {
    background-color: #f2f2f2;
}

.circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.circle.empty {
    border: 2px solid #ccc;
    background-color: transparent;
}

.circle.verde { background-color: #4CAF50; }
.circle.amarillo { background-color: #FFC107; }
.circle.rojo { background-color: #F44336; }

#finalResult {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    color: white;
    transition: background-color 0.3s ease;
}

#finalResult.poco-probable { background-color: #4CAF50; }
#finalResult.medio-probable { background-color: #FFC107; color: black; }
#finalResult.muy-probable { background-color: #F44336; }

/* Estilos específicos para secciones de motor y elementos de seguridad */
@media (min-width: 768px) {
    #motor .options-grid,
    #elementos-seguridad .options-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

#motor .option,
#elementos-seguridad .option {
    display: flex;
    flex-direction: column; /* Changed from row to column */
    align-items: center;
    text-align: center; /* Changed from left to center */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

#motor .option label,
#elementos-seguridad .option label {
    display: flex;
    flex-direction: column; /* Changed from row to column */
    align-items: center;
    width: 100%;
    font-size: 0.9em;
    margin-top: 10px; /* Changed from margin-left to margin-top */
}

#motor .option input[type="radio"],
#elementos-seguridad .option input[type="radio"] {
    margin-top: 10px;
    margin-right: 0; /* Removed right margin */
}

#motor .image-placeholder,
#elementos-seguridad .image-placeholder {
    width: 200px; /* Increased from 100px */
    height: 150px; /* Increased from 100px */
    flex-shrink: 0;
}

/* Ajuste responsivo adicional */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    #app {
        padding: 10px;
    }

    .options-grid {
        grid-template-columns: 1fr !important;
    }
    
    .option label {
        font-size: 0.9em;
    }
    
    .image-placeholder {
        height: 150px; /* Increased from 100px */
    }

    #vehicleTypeButtons {
        flex-direction: column;
        align-items: center;
    }

    .vehicle-type-button {
        width: 100%;
        margin-bottom: 10px;
    }

    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .nav-button {
        width: 100%;
    }
}

/* Estilos para el indicador de carga */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-indicator {
    text-align: center;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    margin-bottom: 10px;
}
.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); }
}

.loading-indicator p {
    color: white;
    margin-top: 10px;
    font-size: 18px;
}

/* Estilos para las nuevas secciones de motos */
#moto-sections .evaluation-section {
    margin-bottom: 30px;
}

#moto-sections .evaluation-item {
    margin-bottom: 20px;
}

#moto-sections .options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

#moto-sections .option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
}

#moto-sections .option:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px);
}

#moto-sections .image-placeholder {
    width: 100%;
    max-width: 200px; /* Increased from 150px */
    height: 150px; /* Increased from 100px */
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    font-style: italic;
    color: #666;
    border: 1px dashed #ccc;
}

#moto-sections .option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    cursor: pointer;
}

#moto-sections .option input[type="radio"] {
    margin-top: 10px;
}

/* Ajustes responsivos para las secciones de motos */
@media (max-width: 600px) {
    #moto-sections .options-grid {
        grid-template-columns: 1fr;
    }
    
    #moto-sections .option label {
        font-size: 0.9em;
    }
    
    #moto-sections .image-placeholder {
        height: 120px; /* Increased from 80px */
    }
}
#textReport {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#textReport h2 {
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

#textReport p {
    margin-bottom: 15px;
    line-height: 1.6;
}

#textReport ol {
    padding-left: 20px;
}

#textReport li {
    margin-bottom: 10px;
}

/* Estilos para los botones de acción */
.action-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.action-button:hover {
    background-color: #0056b3;
}

.action-button i {
    margin-right: 10px;
}
/* Estilos adicionales para mejorar la visualización en PDF */
@media print {
    #resultTable {
        font-size: 10pt;
    }

    .circle {
        width: 12px;
        height: 12px;
        border: 1px solid #000;
    }

    .circle.verde { background-color: #4CAF50 !important; print-color-adjust: exact; }
    .circle.amarillo { background-color: #FFC107 !important; print-color-adjust: exact; }
    .circle.rojo { background-color: #F44336 !important; print-color-adjust: exact; }
}

/* Estilos para el botón de ayuda */
.help-button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

.help-button:hover {
    background-color: #0056b3;
}

.help-button i {
    margin-right: 5px;
}

.help-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.help-popup-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}

.close-popup {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-popup:hover,
.close-popup:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}