/* =========================
   INMOALQUIVIR CHATBOT
========================= */

#ia-chatbot-button,
#ia-chatbot-window,
#ia-chatbot-window * {
    box-sizing: border-box;
}
/*
#ia-chatbot-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: #194254;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    z-index: 2147483000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}
*/
#ia-chatbot-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 68px;
    height: 68px;
    border-radius: 999px;
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2147483000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.ia-chatbot-avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

#ia-chatbot-button:hover {
    transform: scale(1.05);
}

#ia-chatbot-window {
    position: fixed;
    right: 18px;
    bottom: 90px;
    width: 370px;
    height: 640px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 100px);
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 2147483000;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.18);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* HEADER */

#ia-chatbot-header {
    background: #194254;
    color: #ffffff;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#ia-chatbot-header strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

#ia-chatbot-header span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.3;
    opacity: 0.9;
}

#ia-chatbot-close {
    background: transparent;
    border: 0;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

/* MENSAJES */

#ia-chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f5f7fb;
    scroll-behavior: smooth;
}

.ia-message {
    max-width: 86%;
    padding: 10px 13px;
    margin-bottom: 12px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.45;
    word-wrap: break-word;
}

.ia-message.bot {
    background: #ffffff;
    color: #1f2937;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ia-message.user {
    margin-left: auto;
    background: #194254;
    color: #ffffff;
    border-bottom-right-radius: 6px;
}

.ia-typing {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}

/* BOTONES */

.ia-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 16px;
}

.ia-option-button {
    border: 1px solid #dbe2ea;
    background: #ffffff;
    color: #1f2937;
    border-radius: 999px;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.2s ease;
}

@media (hover: hover) {
    .ia-option-button:hover {
        background: #194254;
        color: #ffffff;
        border-color: #194254;
    }
}

/* INPUT */

#ia-chatbot-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
}

#ia-chatbot-input {
    flex: 1;
    min-width: 0;
    border: 1px solid #dbe2ea;
    border-radius: 999px;
    padding: 12px 14px;
    font-size: 16px;
    outline: none;
    background: #f9fafb;
}

#ia-chatbot-input:focus {
    border-color: #194254;
    background: #ffffff;
}

#ia-chatbot-send {
    border: 0;
    background: #194254;
    color: #ffffff;
    border-radius: 999px;
    padding: 11px 15px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* TARJETAS DE INMUEBLES */

.ia-property-results-block {
    background: #ffffff;
    border-radius: 20px;
    padding: 14px;
    margin: 12px 0 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.ia-property-results-header {
    margin-bottom: 14px;
}

.ia-property-results-title {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.ia-results-icon {
    font-size: 20px;
    line-height: 1;
}

.ia-property-results-title strong {
    display: block;
    font-size: 15px;
    line-height: 1.25;
    color: #111827;
    font-weight: 800;
}

.ia-property-results-title small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.35;
}

.ia-property-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.ia-property-card {
    display: block;
    background: #ffffff;
    border-radius: 17px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ia-property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.13);
}

.ia-property-image-wrap {
    position: relative;
    width: 100%;
    height: 145px;
    background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
    overflow: hidden;
}

.ia-property-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ia-property-ref {
    position: absolute;
    left: 10px;
    bottom: 10px;
    background: #194254;
    color: #ffffff;
    border-radius: 7px;
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.18);
}

.ia-property-content {
    padding: 12px 13px 14px;
}

.ia-property-card strong {
    display: block;
    min-height: 38px;
    font-size: 13px;
    line-height: 1.35;
    margin-bottom: 10px;
    color: #111827;
    font-weight: 800;
}

.ia-property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 8px;
}

.ia-property-features span {
    color: #374151;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.ia-property-location {
    display: block;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 9px;
}

.ia-property-price {
    display: block;
    color: #194254;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 900;
    margin-bottom: 11px;
}

.ia-property-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1.5px solid #194254;
    background: #ffffff;
    color: #194254;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.ia-property-card:hover .ia-property-link {
    background: #194254;
    color: #ffffff;
}

/* BOTÓN CTA EN CHAT */

.ia-action-wrapper {
    margin: 8px 0 16px;
}

.ia-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #d68110;
    color: #ffffff;
    text-decoration: none;
    border-radius: 999px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(214, 129, 16, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ia-action-button:hover {
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 11px 24px rgba(214, 129, 16, 0.38);
}

/* RGPD / PRIVACIDAD */

.ia-chatbot-privacy {
    padding: 8px 14px 12px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    font-size: 11px;
    line-height: 1.4;
    color: #6b7280;
    text-align: center;
}

.ia-chatbot-privacy a {
    color: #194254;
    font-weight: 600;
    text-decoration: none;
}

.ia-chatbot-privacy a:hover {
    text-decoration: underline;
}

/* MÓVIL */

@media (max-width: 768px) {

	#ia-chatbot-button {
		right: 12px;
		bottom: 12px;
		width: 62px;
		height: 62px;
	}

    #ia-chatbot-window {
        width: calc(100vw - 20px) !important;
        height: 72dvh !important;
        max-height: 72dvh !important;

        right: 10px !important;
        bottom: 10px !important;
        top: auto !important;
        left: auto !important;

        border-radius: 18px !important;
    }

    #ia-chatbot-header {
        min-height: 64px !important;
        padding: 12px 14px !important;
    }

    #ia-chatbot-close {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 30px !important;
        padding: 8px !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}