/* =========================================
   ESTILOS GENERALES DEL FORMULARIO
   v11.6 - Fix: Loader Rojo y Validación Visual
   ========================================= */

.ap-public-wrapper { max-width: 800px; margin: 40px auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: #444; }
.ap-section { background: #ffffff; padding: 30px; border: 1px solid #e0e0e0; border-radius: 12px; margin-bottom: 25px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.ap-section.highlight-box { background: #f0fdf4; border: 2px dashed #0FD291; }
.ap-subtitle { font-size: 1.3rem; color: #333; border-bottom: 3px solid #0FD291; padding-bottom: 10px; margin-bottom: 25px; font-weight: 600; }
.ap-row { display: flex; gap: 20px; margin-bottom: 20px; }
.ap-col { flex: 1; min-width: 0; }
@media (max-width: 700px) { .ap-row { flex-direction: column; gap: 15px; } }

/* INPUTS Y CAMPOS */
label { display: block; margin-bottom: 8px; font-weight: 600; color: #2c3e50; font-size: 0.95rem; }
.req { color: #e74c3c; margin-left: 3px; }

.ap-input, .ap-textarea, select.ap-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    background: #fafafa;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-height: 48px;
    line-height: 1.5;
}

select.ap-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
}

.ap-input:focus, .ap-textarea:focus { border-color: #0FD291; background: #fff; outline: none; }

/* Contador de Palabras */
#ap-title-counter { font-size: 0.85rem; text-align: right; margin-top: 5px; color: #7f8c8d; font-weight: bold; }
#ap-title-counter.limit-reached { color: #e74c3c; }

/* Botón Principal */
.ap-submit-btn {
    background-color: #0FD291 !important;
    color: #ffffff !important;
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 18px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 5px 15px rgba(15, 210, 145, 0.4);
    transition: transform 0.2s;
    margin-top: 10px;
}
.ap-submit-btn:hover { background-color: #0bc084 !important; transform: translateY(-2px); }

/* Mensajes */
#ap-form-message { display: none; padding: 20px; border-radius: 8px; margin-bottom: 30px; text-align: center; font-size: 1.1rem; line-height: 1.6; }
.ap-success { background-color: #d1fae5; color: #065f46; border: 1px solid #10b981; }
.ap-error { background-color: #fee2e2; color: #991b1b; border: 1px solid #ef4444; }

/* LOADER ROJO SOLICITADO */
.ap-loader { 
    display: block; 
    text-align: center; 
    margin-top: 15px; 
    font-weight: 800; /* Texto más grueso */
    color: #ff0000; /* Rojo Puro */
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ap-input-file { padding: 10px; background: #f9f9f9; border: 1px dashed #ccc; border-radius: 6px; width: 100%; box-sizing: border-box; }
#ap-map-container { width: 100%; height: 350px; border-radius: 8px; border: 2px solid #ecf0f1; margin-top: 10px; }

/* ESTILOS ESPECÍFICOS PARA TARJETAS */
.ap-tarjeta-theme .ap-btn-orange { background-color: #EAAE99 !important; color: #fff !important; }
.ap-tarjeta-theme .ap-btn-orange:hover { background-color: #d69a88 !important; }
.ap-tarjeta-theme .ap-subtitle { border-bottom-color: #EAAE99; }

.ap-color-selector { display: flex; gap: 15px; flex-wrap: wrap; margin-top: 10px; }
.ap-color-option { cursor: pointer; position: relative; }
.ap-color-option input { display: none; }
.ap-color-option span { display: block; width: 40px; height: 40px; border-radius: 50%; border: 3px solid transparent; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: transform 0.2s; }
.ap-color-option input:checked + span { border-color: #333; transform: scale(1.1); box-shadow: 0 5px 10px rgba(0,0,0,0.3); }
.ap-color-option:hover span { transform: scale(1.05); }