/* ======================================================
   ESTILOS UNIFICADOS PARA EL FORMULARIO DE PUBLICACIÓN
   ====================================================== */

/* --- Contenedor Principal del Formulario --- */
.inmoproptech-form-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- Títulos de Sección (ej. "Información Principal") --- */
/* --- Títulos de Sección (ej. "Información Principal") --- */
.inmoproptech-form-container .form-section-title {
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    font-size: 17px; /* <--- Tamaño ajustado */
    font-weight: 500;
    color: #1a202c;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
}
.tab-content > .form-section-title:first-child {
    margin-top: 1rem;
}

/* --- Pestañas de Navegación --- */
.tab-buttons {
    display: flex;
    justify-content: center; /* <-- Línea añadida para centrar el menú */
    gap: 10px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 1.5rem;
}
.tab-button {
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}
.tab-button:hover {
    color: #007bff;
}
.tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
}

/* --- Grupos de Campos y Etiquetas --- */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 15px; /* Tamaño de texto consistente */
}

/* --- Campos de Texto, Selects y Textareas --- */
.inmoproptech-form-container input[type="text"],
.inmoproptech-form-container input[type="number"],
.inmoproptech-form-container input[type="url"],
.inmoproptech-form-container select,
.inmoproptech-form-container textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px; /* Bordes redondeados consistentes */
    font-size: 15px; /* Tamaño de texto consistente */
    color: #1f2937;
    background-color: #f9fafb;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.inmoproptech-form-container select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23555" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 40px; /* Espacio para la flecha */
}

/* --- Estilo al hacer Foco (click) en un campo --- */
.inmoproptech-form-container input:focus,
.inmoproptech-form-container select:focus,
.inmoproptech-form-container textarea:focus {
    outline: none;
    border-color: #007bff;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* --- Layout de Columnas --- */
.form-group-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.form-group-columns .form-group:last-child {
    grid-column: 1 / -1; /* Hacer que el último campo (descripción) ocupe todo el ancho */
}
@media (max-width: 768px) {
    .form-group-columns {
        grid-template-columns: 1fr;
    }
}

/* --- Botones de Acción (Siguiente y Publicar) --- */
.form-submit-section {
    display: flex;
    flex-direction: column;   /* <-- Apila los elementos verticalmente */
    align-items: center;      /* <-- Centra los elementos horizontalmente */
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}
.next-button,
.submit-button {
    padding: 12px 28px;
    background-color: #007bff;
    color: #ffffff;
    font-size: 15px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.next-button:hover,
.submit-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* --- Estilos para Checkboxes --- */
.checkbox-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.checkbox-group-grid label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}
.checkbox-group-grid label:hover {
    border-color: #007bff;
    background-color: #f0f7ff;
}
.checkbox-group-grid input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    accent-color: #007bff;
}

/* --- Estilos para la subida de imágenes (movidos desde functions.php) --- */
.image-upload-box {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 2px dashed #d1d5db;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background-color: #f9fafb;
}
.image-upload-box:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}
.image-upload-box input[type="file"] {
    display: none;
}
.image-upload-box span.dashicons-upload {
    font-size: 2.5rem;
    color: #9ca3af;
}
.image-upload-box span:last-of-type {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* --- Estilos para los mensajes de éxito/error (movidos desde functions.php) --- */
.form-messages-bottom {
    margin-bottom: 20px;
    margin-top: 20px;
    width: 100%; /* Ocupa todo el ancho */
}
.form-messages-bottom .alert {
    padding: 15px;
    border-radius: 8px; /* Bordes redondeados */
    font-weight: 500;
    text-align: center;
    border: 1px solid;
}
.form-messages-bottom .alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
.form-messages-bottom .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}
.form-messages-bottom .alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}
/* ======================================================
   CORRECCIÓN PARA PESTAÑAS DE NAVEGACIÓN DEL FORMULARIO
   ====================================================== */

/* Oculta todos los contenidos de las pestañas por defecto */
.tab-content {
    display: none;
}

/* Muestra únicamente el contenido de la pestaña que esté activa */
.tab-content.active {
    display: block;
}


/* ======================================================
   ADAPTACIÓN RESPONSIVA PARA PESTAÑAS DE NAVEGACIÓN
   ====================================================== */

@media (max-width: 768px) {
    .tab-buttons {
        /* Permite que los botones pasen a la siguiente línea si no caben */
        flex-wrap: wrap; 
    }

    .tab-button {
        /* Reduce el tamaño de la fuente en móviles */
        font-size: 0.9rem; 
        /* Reduce el espaciado interno para que los botones sean más compactos */
        padding: 8px 15px; 
    }
}