/*
=========================================================
20-expand.css — Expandable card area + map + contact list
=========================================================
*/

/* EXPANDABLE AREA */
/* EXPANDABLE CONTENT AREA */
.ml-expand-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    color: #111 !important;
    /* force clean black */
    background: #f7f7f7;
    border-top: 1px solid #e5e5e5;
    transition: max-height .35s ease, padding .35s ease, background .35s ease;
}

/* When open */
.ml-custom-card.open .ml-expand-content {
    max-height: 900px;
    padding: 25px;
    background: #ffffff;
    border-radius: 0 0 14px 14px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.05);
}

/* Clean typographic reset inside the expand section */
.ml-expand-content p,
.ml-expand-content span,
.ml-expand-content div {
    color: #111 !important;
    font-size: 15px;
    line-height: 1.55;
}

/* If MyListing info fields use green icons/text → force clean monotone look */
.ml-expand-content .details-item i,
.ml-expand-content .details-item span,
.ml-expand-content .info-field {
    color: #222 !important;
    fill: #222 !important;
}

/* HEAD BUTTONS SLEEK STYLE */
.ml-expand-content .cts-buttons a {
    background: #111 !important;
    color: #fff !important;
    border-radius: 8px !important;
    padding: 10px 15px !important;
    font-weight: 600;
    transition: background .2s ease;
}

.ml-expand-content .cts-buttons a:hover {
    background: #333 !important;
}

/* MAP SQUARES MODERN GRID */
.ml-map-squares {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.ml-map-square {
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #ececec;
    transition: background .2s ease, box-shadow .2s ease;
}

.ml-map-container {
    width: 100%;
    height: 160px;
    /* matches the height we set in JS for the expandable */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    /* needed for Google Maps to render correctly */
}

/* FOOTER SECTIONS CLEANUP */
.ml-expand-content .listing-footer-section {
    border-top: 1px solid #f0f0f0 !important;
    padding-top: 18px !important;
    margin-top: 18px !important
}

.ml-expand-content .listing-footer-section * {
    color: #111 !important;
}

/* Smooth fade-in animation */
.ml-custom-card.open .ml-expand-content {
    animation: fadeInExpand .25s ease;
}

@keyframes fadeInExpand {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* EXPAND: lf-contact list — make items spaced + visually distinct (TIGHTER) */
.ml-expand-content ul.lf-contact.no-list-style{
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;

    display: grid;
    gap: 6px; /* tighter space between rows */
}

/* Each LI as a mini-card (tighter) */
.ml-expand-content ul.lf-contact.no-list-style > li{
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px 12px !important; /* tighter row height */
    background: #ffffff !important;

    border: 1px solid #e7e7e7 !important;
    border-radius: 11px !important;

    box-shadow: 0 1px 0 rgba(0,0,0,0.03);
    line-height: 1.35;

    color: #111 !important;
    font-size: 15px !important;
}

/* Icon styling inside each LI (slightly smaller) */
.ml-expand-content ul.lf-contact.no-list-style > li > i{
    flex: 0 0 auto;
    width: 30px;
    height: 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;
    background: #f6f6f6;

    font-size: 15px !important;
    line-height: 1 !important;
    margin: 0 !important;

    color: #222 !important;
}

/* If there are links inside (phone/site) */
.ml-expand-content ul.lf-contact.no-list-style > li a{
    color: #111 !important;
    text-decoration: none;
}
.ml-expand-content ul.lf-contact.no-list-style > li a:hover{
    text-decoration: underline;
}

/* Mobile tighter */
@media (max-width: 600px){
    .ml-expand-content ul.lf-contact.no-list-style{
        gap: 5px;
    }
    .ml-expand-content ul.lf-contact.no-list-style > li{
        padding: 7px 11px !important;
        border-radius: 10px !important;
    }
    .ml-expand-content ul.lf-contact.no-list-style > li > i{
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 14px !important;
    }
}

@media (max-width: 600px) {
    .ml-map-container {
        height: 120px;
    }
}

.ml-gmaps-modal { position: fixed; inset: 0; z-index: 999999; display: none; }
.ml-gmaps-modal.is-open { display: block; }

.ml-gmaps-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }

.ml-gmaps-dialog{
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(920px, 92vw);
	height: min(640px, 85vh);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.ml-gmaps-close{
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background: #fff;
	cursor: pointer;
}

.ml-gmaps-frame-wrap{ flex: 1; }
.ml-gmaps-iframe{ width: 100%; height: 100%; border: 0; }

.ml-gmaps-footer{
	padding: 10px 14px;
	border-top: 1px solid #e5e7eb;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

body.ml-gmaps-modal-open{ overflow: hidden; }
