/* ===== "Liên hệ" contacts modal — shared component =====
   Opened by the room card's "Liên hệ" button (room_sale/js/components/room-card.js)
   on /thong-tin-phong/ and in the room preview modal of /khach-xem-phong/.
   Behaviour: room_sale/js/components/room-contacts-modal.js. */

.rs-lh-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.48);
    z-index: var(--z-modal-backdrop, 1040);
    opacity: 0;
    transition: opacity .22s ease;
}
.rs-lh-backdrop.is-open { opacity: 1; }

.rs-lh-modal {
    position: fixed;
    z-index: var(--z-modal, 1050);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    width: min(420px, calc(100vw - 32px));
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Desktop: center */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -44%) scale(.96);
    opacity: 0;
    transition: transform .24s cubic-bezier(.34,1.26,.64,1), opacity .2s ease;
    display: none;
}
.rs-lh-modal.is-open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Mobile: slide up from bottom */
@media (max-width: 600px) {
    .rs-lh-modal {
        width: 100%;
        border-radius: 20px 20px 0 0;
        top: auto;
        bottom: 0;
        left: 0;
        transform: translateY(24px);
        transition: transform .28s cubic-bezier(.32,.72,0,1), opacity .2s ease;
    }
    .rs-lh-modal.is-open { transform: translateY(0); }
}

.rs-lh-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.rs-lh-modal__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.rs-lh-modal__close {
    width: 30px;
    height: 30px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    transition: background .12s;
}
.rs-lh-modal__close:hover { background: #e5e7eb; color: #111827; }

.rs-lh-modal__room {
    padding: 0.55rem 1.1rem 0;
    font-size: 0.78rem;
    color: #6b7280;
}
.rs-lh-modal__room strong {
    color: #374151;
    font-weight: 600;
}

.rs-lh-modal__body {
    padding: 0.75rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.rs-lh-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fafafa;
    transition: border-color .15s;
}
.rs-lh-card:hover { border-color: #93c5fd; background: #eff6ff; }



.rs-lh-card__info {
    flex: 1;
    min-width: 0;
}
.rs-lh-card__role {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-bottom: 0.1rem;
}
.rs-lh-card__name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rs-lh-card__phone {
    font-size: 0.82rem;
    color: #4b5563;
    font-weight: 500;
    margin-top: 0.05rem;
    letter-spacing: 0.02em;
}
.rs-lh-card__phone--empty { color: #d1d5db; font-style: italic; }

.rs-lh-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex-shrink: 0;
}
.rs-lh-action-btn {
    height: 28px;
    padding: 0 0.6rem;
    border-radius: 6px;
    border: none;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    transition: background .12s;
    text-decoration: none;
}
.rs-lh-action-btn--call {
    background: #2563eb;
    color: #fff;
}
.rs-lh-action-btn--call:hover { background: #1d4ed8; color: #fff; }
.rs-lh-action-btn--copy {
    background: #f3f4f6;
    color: #374151;
}
.rs-lh-action-btn--copy:hover { background: #e5e7eb; }
.rs-lh-action-btn--copy.is-copied { background: #dbeafe; color: #2563eb; }
.rs-lh-action-btn--disabled {
    background: #f9fafb;
    color: #d1d5db;
    cursor: default;
    pointer-events: none;
}

.rs-lh-empty {
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
    padding: 1rem 0;
}

.rs-lh-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--rs-accent, #1d4ed8);
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: color 0.15s;
}
.rs-lh-btn:hover { color: var(--rs-accent-strong, #1e40af); text-decoration: underline; }

/* Mobile drag handle */
.rs-lh-modal__handle {
    display: none;
    justify-content: center;
    padding: 0.6rem 0 0.2rem;
}
.rs-lh-modal__handle span {
    display: block;
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
}
@media (max-width: 600px) {
    .rs-lh-modal__handle { display: flex; }
}
