/* Estilos para la página de importación */
.wrap .card {
    max-width: 800px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.wrap .card h2 {
    margin-top: 0;
    color: #23282d;
    font-size: 1.3em;
    font-weight: 600;
}

/* Barra de progreso */
#progress-bar {
    width: 100%;
    height: 20px;
    background-color: #f1f1f1;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
    position: relative;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005a87);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

#progress-text {
    font-weight: 600;
    color: #0073aa;
    margin: 10px 0;
}

/* Log de importación */
#import-log {
    max-height: 300px;
    overflow-y: auto;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    margin-top: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
}

.log-entry {
    margin-bottom: 5px;
    padding: 2px 0;
}

.log-entry .timestamp {
    color: #666;
    font-weight: bold;
}

.log-entry .message {
    margin-left: 5px;
}

.log-success .message {
    color: #46b450;
}

.log-error .message {
    color: #dc3232;
}

.log-warning .message {
    color: #ffb900;
}

/* Formulario */
.form-table th {
    width: 200px;
    padding: 20px 10px 20px 0;
}

.form-table td {
    padding: 15px 10px;
}

.form-table input[type="url"],
.form-table input[type="number"] {
    width: 100%;
    max-width: 400px;
}

.form-table input[type="url"].error {
    border-color: #dc3232;
}

.error-message {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Botones */
.button-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    text-shadow: none;
    padding: 0 12px;
    height: 30px;
    line-height: 28px;
    font-size: 13px;
    font-weight: 600;
}

.button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.button-primary:disabled {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 782px) {
    .form-table th {
        width: 100%;
        display: block;
        padding: 10px 0 5px 0;
    }
    
    .form-table td {
        padding: 0 0 15px 0;
        display: block;
    }
    
    .form-table input[type="url"],
    .form-table input[type="number"] {
        max-width: 100%;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#import-progress {
    animation: fadeIn 0.3s ease-in;
}

/* Estilos para el Custom Post Type */
.post-type-propiedad .wp-list-table .column-title {
    width: 25%;
}

.post-type-propiedad .wp-list-table .column-precio {
    width: 10%;
}

.post-type-propiedad .wp-list-table .column-habitaciones {
    width: 8%;
}

.post-type-propiedad .wp-list-table .column-metros {
    width: 8%;
}

.post-type-propiedad .wp-list-table .column-ciudad {
    width: 12%;
}

/* Información adicional en la lista de propiedades */
.property-meta {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.property-meta strong {
    color: #333;
}

/* Estilos para el plugin Inmovilla Properties Importer */

/* Widget de Galería */
.inmovilla-gallery-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.inmovilla-gallery-slider {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    background: #f8f9fa;
}

.inmovilla-gallery-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.inmovilla-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.inmovilla-gallery-slide:hover .inmovilla-gallery-image {
    transform: scale(1.05);
}

/* Controles de navegación */
.inmovilla-gallery-slider .swiper-button-prev,
.inmovilla-gallery-slider .swiper-button-next {
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

.inmovilla-gallery-slider .swiper-button-prev:hover,
.inmovilla-gallery-slider .swiper-button-next:hover {
    background: rgba(255,255,255,1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.inmovilla-gallery-slider .swiper-button-prev i,
.inmovilla-gallery-slider .swiper-button-next i {
    font-size: 18px;
    font-weight: bold;
}

/* Paginación */
.inmovilla-gallery-slider .swiper-pagination {
    bottom: 20px;
}

.inmovilla-gallery-slider .swiper-pagination-bullet {
    background: rgba(255,255,255,0.6);
    opacity: 1;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.inmovilla-gallery-slider .swiper-pagination-bullet-active {
    background: #fff;
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Estado vacío */
.inmovilla-gallery-empty {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    color: #6c757d;
    font-style: italic;
    border: 2px dashed #dee2e6;
}

.inmovilla-gallery-empty::before {
    content: "📷";
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

/* Meta boxes en el admin */
.inmovilla-property-meta-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.inmovilla-property-meta-box h3 {
    margin-top: 0;
    color: #0073aa;
    font-size: 16px;
}

.inmovilla-property-meta-box table {
    margin-top: 15px;
    width: 100%;
}

.inmovilla-property-meta-box th {
    width: 140px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.inmovilla-property-meta-box td {
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
    color: #212529;
}

.inmovilla-property-meta-box em {
    color: #6c757d;
    font-style: italic;
}

/* Meta box de galería */
#inmovilla_galeria_urls {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .inmovilla-gallery-slider {
        height: 300px;
        border-radius: 8px;
    }
    
    .inmovilla-gallery-slider .swiper-button-prev,
    .inmovilla-gallery-slider .swiper-button-next {
        width: 40px;
        height: 40px;
    }
    
    .inmovilla-gallery-slider .swiper-button-prev i,
    .inmovilla-gallery-slider .swiper-button-next i {
        font-size: 16px;
    }
    
    .inmovilla-gallery-slider .swiper-pagination {
        bottom: 15px;
    }
    
    .inmovilla-gallery-slider .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
}

@media (max-width: 480px) {
    .inmovilla-gallery-slider {
        height: 250px;
    }
    
    .inmovilla-gallery-slider .swiper-button-prev,
    .inmovilla-gallery-slider .swiper-button-next {
        width: 36px;
        height: 36px;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inmovilla-gallery-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

/* Mejoras para el frontend */
.inmovilla-gallery-slider .swiper-slide {
    transition: all 0.3s ease;
}

.inmovilla-gallery-slider .swiper-slide-active {
    transform: scale(1.02);
}

/* Indicador de carga */
.inmovilla-gallery-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: #f8f9fa;
    border-radius: 12px;
}

.inmovilla-gallery-loading::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #dee2e6;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fallback cuando Swiper no está disponible */
.inmovilla-gallery-wrapper.swiper-fallback {
    position: relative;
    overflow: hidden;
}

.inmovilla-gallery-wrapper.swiper-fallback .swiper {
    display: flex;
    transition: transform 0.3s ease;
}

.inmovilla-gallery-wrapper.swiper-fallback .swiper-slide {
    flex: 0 0 100%;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.inmovilla-gallery-wrapper.swiper-fallback .swiper-slide.active {
    opacity: 1;
}

.inmovilla-gallery-wrapper.swiper-fallback .swiper-slide:hover {
    opacity: 0.9;
}

.inmovilla-gallery-wrapper.swiper-fallback .swiper-button-prev,
.inmovilla-gallery-wrapper.swiper-fallback .swiper-button-next {
    display: none;
}

.inmovilla-gallery-wrapper.swiper-fallback .swiper-pagination {
    display: none;
}

/* Mensaje de ayuda para el fallback */
.inmovilla-gallery-wrapper.swiper-fallback::after {
    content: "Haz clic en las imágenes para navegar";
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0.8;
    pointer-events: none;
} 