/* Lease detail: the "need roommates / subletting my spot" card and the modal
   that holds its form. The form itself is styled inside the iframe
   (css/createlisting/shared/lease-quick-listing-frame.css). */

.lease-quick-listing-card {
    padding: 4px;
    margin-bottom: 16px;
}

.lease-quick-listing-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    overflow: hidden;
    border-radius: 8px;
}

.lease-quick-listing-card__action {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 0 auto;
    min-width: 0;
    max-width: 100%;
    /* The wrapper clips the outside edges, leaving dividers only in the gaps. */
    box-shadow: -1px 0 #e8edf0, 0 -1px #e8edf0;
}

.lease-quick-listing-card__link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    padding: 8px 3px;
    border: 0;
    background: #fff;
    color: #1a5a96;
    font: inherit;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.lease-quick-listing-card__link i {
    flex: none;
}

.lease-quick-listing-card__link span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.lease-quick-listing-card__link:hover,
.lease-quick-listing-card__link:focus-visible {
    background: #f9fbfc;
}

.lease-quick-listing-card__count {
    padding: 5px 8px 8px;
    font-size: 12px;
    gap: 6px;
}

.property-units-row.lease-unit-posts-row {
    grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
    overflow-wrap: anywhere;
}

.lease-unit-posts-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.lease-unit-posts-summary .property-units-thumb {
    flex: none;
}

.lease-unit-posts-title,
.lease-unit-posts-rent {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.lease-unit-posts-detail {
    display: block;
    color: #555;
    font-size: 13px;
}

a.property-units-row.lease-unit-posts-row:focus-visible {
    outline: 2px solid #003660;
    outline-offset: -2px;
}

@media (max-width: 600px) {
    .property-units-row.lease-unit-posts-row {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 5px;
    }

    .lease-unit-posts-row > :not(.lease-unit-posts-summary) {
        padding-left: calc(var(--unit-row-thumb) + 10px);
    }

    .property-units-row--head.lease-unit-posts-row {
        display: none;
    }
}

.lease-quick-listing-card__link:focus-visible {
    outline: 2px solid #003660;
    outline-offset: -2px;
    border-radius: 4px;
}

/* The modal body supplies the bottom inset for the framed form. */
.lease-quick-listing-modal__body {
    padding: 12px 20px 16px;
}

.lease-quick-listing-modal__frame {
    display: block;
    width: 100%;
    height: 420px;
    border: 0;
}

.lease-quick-listing-modal__frame[hidden],
.lease-quick-listing-modal__loading[hidden] {
    display: none;
}

.lease-quick-listing-modal__loading {
    display: grid;
    gap: 14px;
    padding: 12px 4px 220px;
}

.lease-quick-listing-modal__skeleton {
    display: block;
    width: 62%;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #eeeeee 25%, #f7f7f7 50%, #eeeeee 75%);
    background-size: 200% 100%;
    animation: lease-quick-listing-skeleton 1.35s ease-in-out infinite;
}

.lease-quick-listing-modal__skeleton--wide {
    width: 92%;
}

.sr-only-quick-listing {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes lease-quick-listing-skeleton {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

@media (max-width: 800px) {
    .lease-quick-listing-modal__body {
        padding: 10px 12px 16px;
    }

    /* A form needs more room than the read-only detail modals get on phones. */
    .lease-quick-listing-modal .detail-modal__dialog {
        max-height: calc(100vh - 60px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lease-quick-listing-modal__skeleton {
        animation: none;
    }
}
