.sw-floorplans {
    --sw-teal: #0b5c63;
    --sw-orange: #b77936;
    --sw-muted: #8a8f90;
    --sw-ink: #171717;
    color: var(--sw-ink);
    font-family: inherit;
}

.sw-floorplans *,
.sw-floorplans *::before,
.sw-floorplans *::after {
    box-sizing: border-box;
}

.sw-floorplans [hidden] {
    display: none !important;
}

.sw-floorplans__intro {
    margin-bottom: 20px;
    color: #6d6d6d;
}

.sw-floorplans .sw-floorplans__heading {
    margin: 0 0 10px;
    color: #111;
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.1;
}

.sw-floorplans__intro p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.sw-floorplans__intro-lead {
    color: #222;
}

.sw-floorplans__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.sw-floorplans__filter {
    padding: 11px 20px;
    border: 1px solid #bdc9c7;
    border-radius: 3px;
    background: transparent;
    color: #28595b;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
}

/* Replace the theme's default pink (#cc3366) button states with site teal */
.sw-floorplans .sw-floorplans__filter:hover,
.sw-floorplans .sw-floorplans__filter:focus {
    border-color: var(--sw-teal);
    background: rgba(11, 92, 99, .06);
    color: var(--sw-teal);
}

.sw-floorplans .sw-floorplans__filter.is-active,
.sw-floorplans .sw-floorplans__filter.is-active:hover,
.sw-floorplans .sw-floorplans__filter.is-active:focus {
    background: var(--sw-teal);
    border-color: var(--sw-teal);
    color: #fff;
}

.sw-floorplans button:focus-visible,
.sw-floorplans a:focus-visible {
    outline: 2px solid var(--sw-teal);
    outline-offset: 2px;
}

/* Small floor plan cards */
.sw-floorplans__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.sw-floorplans__card,
.sw-floorplans__card:hover,
.sw-floorplans__card:focus {
    color: var(--sw-ink);
}

.sw-floorplans__card {
    min-width: 0;
    padding: 14px 16px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #f1f1ef;
    font-family: inherit;
    line-height: 1.3;
    text-align: left;
    white-space: normal;
    cursor: pointer;
}

.sw-floorplans__card:hover,
.sw-floorplans__card:focus {
    background: #f1f1ef;
}

.sw-floorplans__card.is-selected,
.sw-floorplans__card.is-selected:hover,
.sw-floorplans__card.is-selected:focus {
    border-color: #82aaa5;
    background: #e8efea;
    box-shadow: 0 4px 14px rgba(11, 92, 99, .12);
}

.sw-floorplans__card img {
    display: block;
    width: 100%;
    height: 96px;
    margin-bottom: 12px;
    object-fit: contain;
}

.sw-floorplans__card-title,
.sw-floorplans__card-specs,
.sw-floorplans__card-area {
    display: block;
    overflow-wrap: anywhere;
}

.sw-floorplans__card-title {
    margin-bottom: 5px;
    color: var(--sw-ink);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -.01em;
    text-transform: none;
}

.sw-floorplans__card-specs,
.sw-floorplans__card-area {
    color: var(--sw-muted);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.sw-floorplans__card-area {
    margin-top: 4px;
}

.sw-floorplans__card-meta + .sw-floorplans__card-meta::before {
    content: "|";
    margin: 0 8px;
    color: #c3c7c7;
}

/* Hover effect ONLY for View All */
.sw-floorplans.is-view-all .sw-floorplans__card:not([hidden]) {
    transition:
        transform .25s ease,
        box-shadow .25s ease,
        background-color .25s ease,
        border-color .25s ease;
}

.sw-floorplans.is-view-all .sw-floorplans__card:not([hidden]):hover {
    transform: translateY(-4px);
    border-color: #82aaa5;
    background: #e8efea;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
}

.sw-floorplans.is-view-all .sw-floorplans__card:focus-visible {
    outline: 2px solid var(--sw-teal);
    outline-offset: 3px;
}

/* All project details */
.sw-floorplans__details {
    display: grid;
    gap: 18px;
}

.sw-floorplans__detail {
    display: grid;
    grid-template-columns: minmax(240px, .44fr) minmax(0, 1fr);
    align-items: center;
    gap: 24px;
    padding: 44px 48px;
    border-radius: 16px;
    background: #f8f6f1;
    scroll-margin-top: 100px;
}

.sw-floorplans__detail-copy {
    min-width: 0;
}

.sw-floorplans__detail-copy h2 {
    margin: 0 0 22px;
    color: #0b5c63;
    font-size: clamp(40px, 5vw, 64px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1;
}

.sw-floorplans__eyebrow {
    display: block;
    margin-bottom: 18px;
    color: #6b6b6b;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.sw-floorplans__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-bottom: 22px;
    color: #222;
    font-size: 18px;
    line-height: 1.3;
}

.sw-floorplans__specs span + span::before {
    content: "|";
    margin-right: 12px;
    color: #a9a9a9;
}

.sw-floorplans__summary {
    display: -webkit-box;
    overflow: hidden;
    max-width: 320px;
    margin: 0;
    color: #6d6d6d;
    font-size: 15px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* 3 lines x 1.55 line-height; height is animated by the toggle */
    max-height: 4.65em;
    transition: max-height .4s ease;
}

/* Full text after clicking "View Key Features" */
.sw-floorplans__summary.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

/* Orange rule sits above the key features button */
.sw-floorplans .sw-floorplans__features-toggle {
    position: relative;
    display: inline-flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    width: auto;
    min-height: 42px;
    margin: 46px 0 0;
    padding: 11px 26px 11px 24px;
    border: 1px solid #8caeaa;
    border-radius: 3px;
    background: transparent;
    box-shadow: none;
    color: var(--sw-teal);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.sw-floorplans__features-toggle::before {
    content: "";
    position: absolute;
    top: -24px;
    left: -1px;
    width: 78px;
    height: 2px;
    background: var(--sw-orange);
}

.sw-floorplans .sw-floorplans__features-toggle:hover,
.sw-floorplans .sw-floorplans__features-toggle:focus {
    border-color: var(--sw-teal);
    background: rgba(11, 92, 99, .06);
    color: var(--sw-teal);
}

/* Chevron drawn in CSS; the text glyph inside the span is hidden */
.sw-floorplans__features-toggle span {
    display: block;
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    margin-top: -5px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    font-size: 0;
    line-height: 0;
    transform: rotate(45deg);
    transition: transform .3s ease, margin-top .3s ease;
}

.sw-floorplans__features-toggle[aria-expanded="true"] span {
    margin-top: 5px;
    transform: rotate(-135deg);
}

.sw-floorplans__features {
    margin-top: 14px;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    animation: sw-floorplans-fade .4s ease;
}

@keyframes sw-floorplans-fade {

    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.sw-floorplans__features ul {
    margin: 0;
    padding-left: 20px;
}

.sw-floorplans__visual {
    min-width: 0;
}

.sw-floorplans__main-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    margin: 0 auto 20px;
    object-fit: contain;
}

.sw-floorplans__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sw-floorplans__action {
    display: inline-flex;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 12px 22px;
    border: 1px solid #a9c0bd;
    border-radius: 3px;
    background: #fff;
    color: var(--sw-teal);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}

/* Button icons (CSS only, so they survive the download label swap) */
.sw-floorplans__action::before {
    content: "";
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask: var(--sw-icon) center / contain no-repeat;
    mask: var(--sw-icon) center / contain no-repeat;
}

.sw-floorplans__action--primary {
    --sw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    border-color: var(--sw-teal);
    background: var(--sw-teal);
    color: #fff;
}

.sw-floorplans__action--secondary {
    --sw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 11l5 5 5-5M5 20h14'/%3E%3C/svg%3E");
}

.sw-floorplans__action--tour {
    --sw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4M8 14h2M14 14h2M8 17h2'/%3E%3C/svg%3E");
    border-color: var(--sw-orange);
    background: var(--sw-orange);
    color: #fff;
}

.sw-floorplans .sw-floorplans__action--primary:hover,
.sw-floorplans .sw-floorplans__action--primary:focus {
    border-color: var(--sw-teal);
    background: var(--sw-teal);
    color: #fff;
}

.sw-floorplans .sw-floorplans__action--tour:hover,
.sw-floorplans .sw-floorplans__action--tour:focus {
    border-color: var(--sw-orange);
    background: var(--sw-orange);
    color: #fff;
}

.sw-floorplans .sw-floorplans__action--secondary:hover,
.sw-floorplans .sw-floorplans__action--secondary:focus {
    border-color: var(--sw-teal);
    background: #fff;
    color: var(--sw-teal);
}

.sw-floorplans .sw-floorplans__modal-close:hover,
.sw-floorplans .sw-floorplans__modal-close:focus {
    background: transparent;
    color: #fff;
}

.sw-floorplans__action:hover {
    filter: brightness(.94);
}

/* 2D modal */
.sw-floorplans__modal {
    position: fixed;
    z-index: 999999;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, .85);
}

.sw-floorplans__modal img {
    display: block;
    max-width: 95%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #fff;
}

.sw-floorplans__modal-close {
    position: absolute;
    top: 12px;
    right: 24px;
    padding: 4px 12px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 1024px) {

    .sw-floorplans__cards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sw-floorplans__detail {
        gap: 20px;
        padding: 28px 24px;
    }

    .sw-floorplans__specs {
        font-size: 16px;
    }
}

@media (max-width: 680px) {

    .sw-floorplans__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sw-floorplans__detail {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }

    .sw-floorplans__summary {
        max-width: none;
    }

    .sw-floorplans__actions {
        flex-direction: column;
    }

    .sw-floorplans__action {
        width: 100%;
    }

    .sw-floorplans__filter {
        padding: 10px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .sw-floorplans.is-view-all .sw-floorplans__card,
    .sw-floorplans__summary,
    .sw-floorplans__features-toggle span {
        transition: none;
    }

    .sw-floorplans__features {
        animation: none;
    }
}
