/* Estilos para los formularios de Crear y Editar Casa */
.form-container {
    max-width: 800px;
    margin: 20px auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-container h1, .form-container h3 {
    color: #005f73;
}

.form-container h3 {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

input[type="text"],
input[type="number"],
textarea,
input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.submit-button {
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-button.create { background-color: #0a9396; }
.submit-button.create:hover { background-color: #005f73; }
.submit-button.update { background-color: #17a2b8; }
.submit-button.update:hover { background-color: #138496; }


.amenities-container {
    columns: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
    column-gap: 30px;
}

.amenity-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    break-inside: avoid-column;
}

.amenity-item input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    transform: scale(1.2);
}

.amenity-item label {
    margin-bottom: 0;
    font-weight: normal;
}

/* Estilos para la galería en la página de edición */
.gallery-management {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}
.media-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    position: relative;
}
.media-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}
.media-card .media-control {
    padding: 10px;
    background: #f8f9fa;
}
.media-card .media-control label {
    font-size: 0.9rem;
    font-weight: normal;
    cursor: pointer;
}
.media-card input[type="radio"] {
    margin-right: 5px;
}
.btn-delete-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}
.btn-delete-media:hover {
    background-color: #dc3545;
}
/* --- INICIO CÓDIGO RESPONSIVE PARA TABLA DE PRECIOS --- */
@media (max-width: 768px) {
    .pricing-table thead {
        /* Ocultamos los encabezados de la tabla en móvil */
        display: none;
    }

    .pricing-table, 
    .pricing-table tbody, 
    .pricing-table tr, 
    .pricing-table td {
        /* Hacemos que todos los elementos de la tabla se comporten como bloques */
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .pricing-table tr {
        /* Cada fila será una pequeña tarjeta */
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 5px;
    }

    .pricing-table td {
        /* Cada celda será una fila con su etiqueta y su input */
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        border: none;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .pricing-table tr td:last-child {
        border-bottom: none;
    }

    .pricing-table td::before {
        /* Aquí usamos el data-label que pusimos en el PHP */
        content: attr(data-label);
        font-weight: bold;
        color: #333;
    }
    
    .pricing-table input[type="date"],
    .pricing-table input[type="number"] {
        /* Hacemos los inputs un poco más pequeños y alineamos el texto a la derecha */
        max-width: 60%;
        text-align: right;
    }

    .pricing-table td[data-label="Ação"] {
        /* Centramos el botón de eliminar */
        justify-content: center;
        padding-top: 10px;
    }
}
/* --- FIN CÓDIGO RESPONSIVE --- */

/* Estilos para el selector de casas */
.seletor-casa {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.seletor-casa select {
    flex-grow: 1; /* Ocupa el espacio disponible */
    padding: 10px;
    font-size: 16px; /* Para que se vea bien en móvil */
}

.seletor-casa button {
    padding: 10px 15px; /* Un poco más de espacio a los lados */
    font-size: 16px;
}


/* --- CÓDIGO RESPONSIVE PARA SELECCIONAR CASA --- */
@media (max-width: 480px) {
    .seletor-casa {
        flex-direction: column; /* Cambia la dirección a vertical */
        align-items: stretch;   /* Estira los elementos para que ocupen todo el ancho */
    }
}
