/**
 * Vehiqmas Frontend Posting - Estilos del Filtro de Ubigeo
 */

/* Contenedor principal */
.vfp-ubigeo-filter {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Título */
.vfp-filter-title {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Formulario */
.vfp-filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Campo individual */
.vfp-filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Etiqueta */
.vfp-filter-label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

/* Select */
.vfp-filter-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.vfp-filter-select:hover {
    border-color: #999;
}

.vfp-filter-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.vfp-filter-select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Acciones */
.vfp-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

/* Botón submit */
.vfp-filter-submit {
    flex: 1;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: #0073aa;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vfp-filter-submit:hover {
    background: #005a87;
}

/* Botón limpiar */
.vfp-filter-clear {
    padding: 10px 15px;
    font-size: 13px;
    color: #666;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vfp-filter-clear:hover {
    background: #e0e0e0;
    color: #333;
}

/* =====================================================
   LAYOUT: Horizontal
   ===================================================== */

.vfp-filter-layout-horizontal .vfp-filter-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
}

.vfp-filter-layout-horizontal .vfp-filter-field {
    flex: 1;
    min-width: 150px;
}

.vfp-filter-layout-horizontal .vfp-filter-actions {
    margin-top: 0;
    flex: 0 0 auto;
}

/* =====================================================
   LAYOUT: Inline
   ===================================================== */

.vfp-filter-layout-inline .vfp-filter-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.vfp-filter-layout-inline .vfp-filter-field {
    flex: 0 0 auto;
}

.vfp-filter-layout-inline .vfp-filter-label {
    display: none;
}

.vfp-filter-layout-inline .vfp-filter-select {
    min-width: 180px;
}

.vfp-filter-layout-inline .vfp-filter-actions {
    margin-top: 0;
}

.vfp-filter-layout-inline .vfp-filter-title {
    margin-right: 15px;
    margin-bottom: 0;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .vfp-filter-layout-horizontal .vfp-filter-form,
    .vfp-filter-layout-inline .vfp-filter-form {
        flex-direction: column;
    }
    
    .vfp-filter-layout-horizontal .vfp-filter-field,
    .vfp-filter-layout-inline .vfp-filter-field {
        width: 100%;
        min-width: 100%;
    }
    
    .vfp-filter-layout-inline .vfp-filter-label {
        display: block;
    }
    
    .vfp-filter-layout-inline .vfp-filter-select {
        min-width: 100%;
    }
    
    .vfp-filter-actions {
        flex-direction: column;
    }
    
    .vfp-filter-submit,
    .vfp-filter-clear {
        width: 100%;
        text-align: center;
    }
}

/* =====================================================
   LOADING STATE
   ===================================================== */

.vfp-filter-select.loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 50 50'%3E%3Cpath fill='%23999' d='M25 5C13.954 5 5 13.954 5 25s8.954 20 20 20 20-8.954 20-20h-5c0 8.284-6.716 15-15 15S10 33.284 10 25s6.716-15 15-15V5z'%3E%3CanimateTransform attributeType='xml' attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='0.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E");
    background-position: right 10px center;
    background-size: 18px;
}
