/* Contenedor principal del formulario */
#nm-custom-form-container {
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    padding: 35px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e5e5;
}

/* Estilos para mensajes del sistema */
#nm-form-messages,
.nm-messages {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 15px;
    border-left: 4px solid;
}

.nm-messages.error {
    background-color: #fff2f2;
    border-color: #dc3545;
    color: #721c24;
}

.nm-messages.success {
    background-color: #f0fff4;
    border-color: #0E6F6C;
    color: #0b5a57;
}

/* Estilos base para campos del formulario */
.nm-form-field {
    margin-bottom: 25px;
    position: relative;
}

/* Headers y secciones */
.nm-form-field[data-type="header"] {
    margin: 40px -35px 20px;
    padding: 15px 35px;
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.nm-form-field[data-type="header"] h3 {
    margin: 0;
    color: #0E6F6C;
    font-size: 1.2em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nm-form-field[data-type="header"] + .nm-form-field {
    margin-top: 25px;
}

/* Campos dentro de una sección */
.nm-form-field[data-type="header"] ~ .nm-form-field:not([data-type="header"]) {
    margin-left: 15px;
    padding-left: 20px;
    border-left: 3px solid #f0f0f0;
}

/* Estilos específicos por tipo de campo */
/* Campos de texto, número, URL, fecha */
.nm-form-field[data-type="text"] input,
.nm-form-field[data-type="number"] input,
.nm-form-field[data-type="url"] input,
.nm-form-field[data-type="date"] input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dde1e7;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
}

/* Campo de rango */
.nm-form-field[data-type="range"] input[type="range"] {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    outline: none;
}

/* Área de texto */
.nm-form-field[data-type="textarea"] textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 15px;
    border: 1px solid #dde1e7;
    border-radius: 6px;
    resize: vertical;
}

/* Campos de archivo e imagen */
.nm-form-field[data-type="file"] input[type="file"],
.nm-form-field[data-type="image"] input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #dde1e7;
    border-radius: 6px;
    background: #f8f9fa;
}

/* Grupos de radio y checkbox */
.radio-group,
.checkbox-group {
    margin-top: 10px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #0E6F6C;
}

/* Select y Conditional Select */
.nm-form-field[data-type="select"] select,
.nm-conditional-select select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dde1e7;
    border-radius: 6px;
    background-color: #fff;
    font-size: 15px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L0 2h12L6 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

/* Mapa */
#nm-map-canvas,
.nm-form-field[data-type="map"] #map_data {
    height: 400px;
    border-radius: 8px;
    border: 1px solid #dde1e7;
    margin-top: 10px;
}

/* Estilos para campos condicionales */
.nm-conditional-group {
    border-left: 3px solid #0E6F6C;
    margin: 15px 0;
    padding: 10px 0 10px 15px;
    background-color: #f8f9fa;
    border-radius: 0 6px 6px 0;
}

.nm-conditional-fields {
    margin-left: 20px;
    padding-top: 10px;
}

.nm-conditional-field {
    color: #2c3e50;
    font-size: 0.95em;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dde1e7;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botón de envío */
.button {
    background-color: #0E6F6C;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    min-width: 150px;
    text-align: center;
}

.button:hover {
    background-color: #0b5a57;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(14, 111, 108, 0.2);
}

/* Estados focus para inputs */
.nm-form-field input:focus,
.nm-form-field select:focus,
.nm-form-field textarea:focus {
    outline: none;
    border-color: #0E6F6C;
    box-shadow: 0 0 0 3px rgba(14, 111, 108, 0.1);
}

/* Media Queries */
@media (max-width: 768px) {
    #nm-custom-form-container {
        padding: 20px;
        margin: 15px auto;
    }
    
    .button {
        width: 100%;
    }

    .nm-conditional-group {
        margin: 10px 0;
        padding: 10px;
    }

    .nm-conditional-fields {
        margin-left: 10px;
    }
}

@media (max-width: 480px) {
    .nm-form-field label {
        font-size: 13px;
    }
    
    .nm-form-field input,
    .nm-form-field select,
    .nm-form-field textarea {
        font-size: 14px;
        padding: 10px;
    }

    .nm-conditional-field {
        padding: 10px;
    }
}