/* =====================================================
   PropertiesModal.css
   Modal "Me interesa esta propiedad" — DOMUS
===================================================== */

/* ── Overlay ──────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;

    background: rgba(10, 15, 30, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.modal-activo {
    opacity: 1;
    visibility: visible;
}

/* ── Caja del modal ───────────────────────────────── */
.modal-box {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.18),
        0 8px 24px rgba(0, 0, 0, 0.10);

    transform: translateY(24px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.modal-activo .modal-box {
    transform: translateY(0) scale(1);
}

/* ── Header ───────────────────────────────────────── */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0;
}

.modal-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a3c5e 0%, #2d6a9f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-icon-wrap svg {
    width: 26px;
    height: 26px;
    color: #ffffff;
    stroke: #ffffff;
}

.modal-cerrar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.modal-cerrar:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.modal-cerrar svg {
    width: 16px;
    height: 16px;
    color: #64748b;
    stroke: #64748b;
}

/* ── Body ─────────────────────────────────────────── */
.modal-body {
    padding: 1.25rem 1.5rem 1rem;
}

.modal-titulo {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0.5rem 0 0.25rem;
    line-height: 1.3;
}

.modal-propiedad-nombre {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d6a9f;
    margin: 0 0 0.75rem;
    padding: 0.35rem 0.75rem;
    background: #eff6ff;
    border-left: 3px solid #2d6a9f;
    border-radius: 0 6px 6px 0;
}

.modal-descripcion {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

/* ── Formulario ───────────────────────────────────── */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}

.modal-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.modal-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-opcional {
    font-weight: 400;
    color: #9ca3af;
}

.modal-input {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.modal-input:focus {
    border-color: #2d6a9f;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(45, 106, 159, 0.12);
}

.modal-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* ── Aviso WhatsApp ───────────────────────────────── */
.modal-whatsapp-aviso {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.78rem;
    color: #64748b;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    margin: 0;
    line-height: 1.5;
}

.modal-whatsapp-aviso svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #16a34a;
    margin-top: 1px;
}

/* ── Footer / Acciones ────────────────────────────── */
.modal-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.modal-btn-cancelar {
    flex: 1;
    padding: 0.75rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    font-family: inherit;
}

.modal-btn-cancelar:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #374151;
}

.modal-btn-confirmar {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.modal-btn-confirmar:hover {
    opacity: 0.93;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.42);
}

.modal-btn-confirmar:active {
    transform: translateY(0);
}

.modal-btn-confirmar svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Botón "Me interesa" en la tarjeta ───────────── */
.btn-me-interesa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a3c5e 0%, #2d6a9f 100%);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    font-family: inherit;
    letter-spacing: 0.01em;
    box-shadow: 0 3px 10px rgba(26, 60, 94, 0.28);
    margin-top: 0.6rem;
}

.btn-me-interesa:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(26, 60, 94, 0.36);
}

.btn-me-interesa:active {
    transform: translateY(0);
}

.btn-me-interesa svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* ── Accesibilidad: foco visible ──────────────────── */
.modal-cerrar:focus-visible,
.modal-btn-cancelar:focus-visible,
.modal-btn-confirmar:focus-visible,
.btn-me-interesa:focus-visible {
    outline: 3px solid #2d6a9f;
    outline-offset: 2px;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 520px) {
    .modal-box {
        border-radius: 16px;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-btn-cancelar,
    .modal-btn-confirmar {
        flex: unset;
        width: 100%;
    }
}

