:root {
    --coast-ink: #17324d;
    --coast-blue: #0f6f8f;
    --coast-teal: #138a8a;
    --coast-sand: #f4ead7;
    --coast-cream: #fffdf8;
    --coast-muted: #64748b;
}

body {
    min-height: 100vh;
    background: var(--coast-cream);
    color: var(--coast-ink);
}

.public-navbar {
    background: rgba(255, 253, 248, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(23, 50, 77, 0.08);
}

.site-header-logo {
    display: block;
    width: auto;
    height: var(--site-logo-height, 98px);
}

.maintenance-admin-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    color: var(--coast-teal);
    background: rgba(19, 138, 138, 0.08);
    border: 1px solid rgba(19, 138, 138, 0.28);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.025em;
    text-align: center;
    transform: translate(-50%, -50%);
}

.public-navbar > .container {
    position: relative;
}

@media (max-width: 575.98px) {
    .maintenance-admin-banner {
        max-width: 9.5rem;
        padding: 0.35rem 0.65rem;
        font-size: 0.72rem;
        line-height: 1.15;
    }
}

.brand-mark {
    display: inline-grid;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--coast-blue), var(--coast-teal));
    border-radius: 50%;
}

.hero-public {
    --hero-image-fade-duration: 1.6s;
    --hero-slogan-fade-duration: 0.8s;
    position: relative;
    overflow: hidden;
    padding: 6rem 0 8rem;
    color: #fff;
    background: #0a2a3e url('../uploads/listings/1/01-cover.png') center 48% / cover;
}

.hero-public.has-hero-images {
    background: #0a2a3e;
}

.hero-public-overlays {
    position: absolute;
    z-index: 1;
    inset: 0;
}

.hero-public-overlay {
    --image-overlay-rgb: 10, 42, 62;
    --image-overlay-start-opacity: 0.94;
    --image-overlay-end-opacity: 0.68;
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(115deg, rgba(var(--image-overlay-rgb), var(--image-overlay-start-opacity)), rgba(var(--image-overlay-rgb), var(--image-overlay-end-opacity)));
    transition: opacity var(--hero-image-fade-duration) ease-in-out;
}

.hero-public-overlay.is-active {
    opacity: 1;
}

.hero-public-backgrounds {
    position: absolute;
    z-index: 0;
    inset: 0;
}

.hero-public-image {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--hero-image-size, 100%);
    height: auto;
    max-width: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity var(--hero-image-fade-duration) ease-in-out;
}

.hero-public-image.is-active {
    opacity: 1;
}

.hero-public::after {
    position: absolute;
    z-index: 2;
    right: -8rem;
    bottom: -10rem;
    width: 28rem;
    height: 28rem;
    content: '';
    background: rgba(255, 255, 255, 0.09);
    border-radius: 50%;
}

.hero-kicker {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.hero-slogan {
    opacity: 1;
    transition: opacity var(--hero-slogan-fade-duration) ease-in-out;
}

.hero-slogan.is-changing {
    opacity: 0;
}

.search-panel {
    position: relative;
    z-index: 2;
    margin-top: -3.6rem;
    border: 0;
    border-radius: 1.1rem;
    box-shadow: 0 20px 50px rgba(23, 50, 77, 0.18);
}

.listing-card {
    overflow: hidden;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 12px 30px rgba(23, 50, 77, 0.09);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(23, 50, 77, 0.14);
}

.listing-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.listing-image-wrap {
    position: relative;
    display: block;
}

.photo-count-badge {
    position: absolute;
    right: 0.9rem;
    bottom: 0.9rem;
    padding: 0.45rem 0.7rem;
    color: #fff;
    background: rgba(23, 50, 77, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
}

.listing-location,
.text-coast-muted {
    color: var(--coast-muted);
}

.btn-coast {
    color: #fff;
    background: var(--coast-blue);
    border-color: var(--coast-blue);
}

.btn-coast:hover,
.btn-coast:focus {
    color: #fff;
    background: #0b5b76;
    border-color: #0b5b76;
}

.guest-portal-page {
    background:
        radial-gradient(circle at top right, rgba(19, 138, 138, 0.09), transparent 34rem),
        var(--coast-cream);
}

.guest-auth-shell {
    min-height: calc(100vh - 120px);
    display: grid;
    align-items: center;
}

.guest-code-input {
    letter-spacing: 0.55em;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.guest-portal-hero {
    color: #fff;
    background: linear-gradient(125deg, #0a2a3e, var(--coast-blue) 58%, var(--coast-teal));
}

.guest-portal-cover {
    display: block;
    width: 100%;
    height: min(42vw, 390px);
    min-height: 240px;
    object-fit: cover;
}

.guest-detail-card {
    height: 100%;
    padding: 1rem;
    background: #f7fafc;
    border: 1px solid rgba(23, 50, 77, 0.09);
    border-radius: 0.85rem;
}

.guest-resources-card {
    background: #f7fafc;
    border: 1px solid rgba(23, 50, 77, 0.09);
}

.maintenance-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 20%, rgba(42, 157, 143, 0.2), transparent 32rem),
        linear-gradient(145deg, #edf8f8, #f7fbff 55%, #e8f2f7);
}

.maintenance-navbar {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 30px rgba(16, 42, 67, 0.08);
    backdrop-filter: blur(12px);
}

.maintenance-page {
    min-height: calc(100vh - 120px);
    padding: 3rem 1rem;
    display: grid;
    place-items: center;
}

.maintenance-card {
    width: min(720px, 100%);
    padding: clamp(2rem, 6vw, 4.5rem);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(23, 50, 77, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 24px 70px rgba(16, 42, 67, 0.14);
}

.maintenance-icon {
    width: 4.5rem;
    height: 4.5rem;
    margin: 0 auto 1.5rem;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--coast-blue), var(--coast-teal));
    border-radius: 50%;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 12px 28px rgba(19, 138, 138, 0.25);
}

.guest-detail-card span,
.guest-detail-card small {
    display: block;
    color: var(--coast-muted);
}

.guest-detail-card strong {
    display: block;
    margin: 0.25rem 0;
    font-size: 1.05rem;
}

.guest-financial-lines > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
}

.guest-financial-lines span {
    color: var(--coast-muted);
}

.guest-financial-total {
    padding-top: 1rem !important;
    margin-top: 0.4rem;
    border-top: 1px solid rgba(23, 50, 77, 0.14);
    font-size: 1.08rem;
}

.guest-concierge-preview {
    background: linear-gradient(145deg, #eef8f7, #f8fbff);
    border: 1px solid rgba(19, 138, 138, 0.18) !important;
}

.guest-resource-title {
    transition: color 0.15s ease-in-out;
}

.guest-resource-link:hover .guest-resource-title,
.guest-resource-link:focus-visible .guest-resource-title {
    color: #0d6efd !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(19, 138, 138, 0.35);
    outline-offset: 2px;
}

.property-carousel,
.property-carousel .carousel-inner,
.property-carousel .carousel-item {
    overflow: hidden;
    border-radius: 1rem;
}

.property-carousel-library-link {
    position: absolute;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 4;
    border: 1px solid rgba(23, 50, 77, 0.18);
    box-shadow: 0 6px 20px rgba(23, 50, 77, 0.24);
    font-weight: 700;
}

.property-carousel-image {
    width: 100%;
    height: min(68vh, 640px);
    min-height: 360px;
    object-fit: cover;
}

.property-carousel .carousel-control-prev-icon,
.property-carousel .carousel-control-next-icon {
    padding: 1.35rem;
    background-color: rgba(23, 50, 77, 0.72);
    background-size: 55%;
    border-radius: 50%;
}

.home-assistant-section {
    position: relative;
    z-index: 2;
}

.home-assistant-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(10, 42, 62, 0.07);
    border-radius: 1.3rem;
    box-shadow: 0 12px 28px rgba(10, 42, 62, 0.05);
}

.home-assistant-title {
    font-size: clamp(1.8rem, 2vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1.08;
    color: var(--coast-blue);
}

.home-assistant-badge {
    background: rgba(10, 42, 62, 0.03);
    color: rgba(10, 42, 62, 0.72);
    border: 1px solid rgba(10, 42, 62, 0.1);
    padding: 0.42rem 0.78rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-assistant-form {
    margin-top: 1.1rem;
}

.home-assistant-label {
    margin-bottom: 0.7rem;
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgba(10, 42, 62, 0.8);
}

.home-assistant-input {
    min-height: 4.2rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(10, 42, 62, 0.12);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 1px 2px rgba(10, 42, 62, 0.02);
    resize: vertical;
    color: var(--coast-blue);
}

.home-assistant-input::placeholder {
    color: rgba(10, 42, 62, 0.45);
}

.home-assistant-input:focus {
    border-color: rgba(15, 118, 143, 0.7);
    box-shadow: 0 0 0 0.22rem rgba(15, 118, 143, 0.12);
}

.home-assistant-button {
    min-height: 4.2rem;
    border-radius: 0.9rem;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    box-shadow: none;
    transition: transform 160ms ease, filter 160ms ease;
}

.home-assistant-button:hover,
.home-assistant-button:focus {
    transform: translateY(-1px);
    filter: brightness(1.03);
}

.home-assistant-response {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 1rem;
    border-color: rgba(10, 42, 62, 0.08);
}

.ai-drawer-shell {
    position: fixed;
    right: 0;
    top: 50%;
    z-index: 1040;
    transform: translateY(-50%);
}

.ai-drawer-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 3rem;
    padding: .55rem;
    border: 1px solid #79aaa8;
    border-right: 0;
    border-radius: .75rem 0 0 .75rem;
    background: transparent;
    color: #507e7d;
    box-shadow: inset 0 0 0 1px rgba(121, 170, 168, .35), -3px 3px 10px rgba(23, 50, 77, .10);
    transition: box-shadow 160ms ease, border-color 160ms ease;
}

.ai-drawer-trigger[hidden] { display: none; }

.ai-drawer-trigger:hover {
    border-color: #507e7d;
    box-shadow: inset 0 0 0 1px rgba(121, 170, 168, .35), -3px 3px 12px rgba(23, 50, 77, .14);
}

.ai-drawer-trigger:focus-visible {
    outline: 2px solid #507e7d;
    outline-offset: 3px;
}

.ai-drawer-trigger.is-disabled {
    opacity: .8;
    cursor: pointer;
}

.ai-drawer-tab-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ai-drawer-tab-inner .ai-feature-sparkle {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0;
    color: inherit;
}

.ai-drawer {
    position: absolute;
    right: 0;
    top: 50%;
    width: min(24rem, calc(100vw - 2rem));
    padding: 1rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(10, 42, 62, 0.08);
    border-radius: 1.15rem 0 0 1.15rem;
    border-right: 0;
    box-shadow: 0 18px 38px rgba(10, 42, 62, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(calc(100% + 1rem));
    transition: opacity 200ms ease, transform 220ms ease, visibility 220ms ease;
}

.ai-drawer.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.ai-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.ai-drawer-kicker {
    margin: 0 0 0.25rem;
    color: var(--coast-teal);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ai-drawer-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--coast-blue);
}

.ai-drawer-close {
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(10, 42, 62, 0.12);
    border-radius: 999px;
    background: rgba(10, 42, 62, 0.02);
    color: var(--coast-blue);
    font-size: 1.2rem;
    line-height: 1;
}

.ai-drawer-form {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.ai-drawer-label {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(10, 42, 62, 0.76);
}

.ai-drawer-input {
    width: 100%;
    min-height: 6rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid rgba(10, 42, 62, 0.12);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    resize: vertical;
    color: var(--coast-blue);
}

.ai-drawer-input::placeholder {
    color: rgba(10, 42, 62, 0.45);
}

.ai-drawer-button {
    margin-top: 0.2rem;
    min-height: 3rem;
    border-radius: 0.8rem;
    font-weight: 800;
}

.ai-drawer-message {
    margin-top: 0.9rem;
    padding: 0.85rem 0.95rem;
    background: rgba(233, 247, 246, 0.9);
    border: 1px solid rgba(20, 113, 121, 0.12);
    border-radius: 0.85rem;
    color: rgba(10, 42, 62, 0.82);
    line-height: 1.55;
}

.ai-drawer-message-warning {
    background: rgba(255, 247, 216, 0.9);
    border-color: rgba(181, 130, 31, 0.24);
    color: #634505;
}

.ai-drawer-message-error {
    background: rgba(244, 236, 201, 0.88);
    border-color: rgba(196, 148, 0, 0.22);
}

.ai-drawer-message-title {
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--coast-blue);
}

.section-kicker {
    color: var(--coast-teal);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.photo-library-callout {
    padding: 3rem 1.5rem;
    background: var(--coast-sand);
    border-radius: 1rem;
}

.photo-library-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.photo-library-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(23, 50, 77, 0.1);
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(23, 50, 77, 0.08);
}

.photo-library-image {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
}

.photo-library-caption {
    padding: 1.25rem;
    color: var(--coast-ink);
    line-height: 1.6;
}

.public-footer {
    color: #d9e8ef;
    background: var(--coast-ink);
}

@media (max-width: 767.98px) {
    .site-header-logo {
        height: min(var(--site-logo-height, 98px), 86px);
    }

    .hero-public {
        padding: 4.5rem 0 7rem;
    }

    .search-panel {
        margin-top: -4.5rem;
    }

    .property-carousel-image {
        height: 52vh;
        min-height: 300px;
    }

    .property-carousel-library-link {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .photo-library-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (min-width: 992px) {
    .py-lg-6 {
        padding-top: 6rem !important;
        padding-bottom: 6rem !important;
    }
}
.app-toast-container {
    z-index: 1080;
}

/* Public concierge chat and mobile composer. */
.ai-drawer {
    width: min(26rem, calc(100vw - .75rem));
    max-height: min(42rem, 85vh);
    max-height: min(42rem, 85dvh);
    display: flex;
    flex-direction: column;
}
.public-concierge-chat {
    min-height: 10rem;
    height: 20rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: .4rem;
    margin-bottom: .8rem;
    background: #f3f7f9;
    border-radius: .8rem;
}
.public-concierge-message {
    max-width: 92%;
    padding: .75rem .85rem;
    border-radius: 1rem 1rem 1rem .25rem;
    background: #fff;
    color: var(--coast-blue);
    align-self: flex-start;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.5;
    font-size: .95rem;
}
.public-concierge-message.user {
    align-self: flex-end;
    background: var(--coast-blue);
    color: #fff;
    border-radius: 1rem 1rem .25rem 1rem;
}
.public-concierge-message.error { background: #fff1f0; color: #9c2525; }
.public-concierge-message.thinking { color: #526775; font-style: italic; }
.public-concierge-speaker { display: block; font-size: .7rem; font-weight: 700; opacity: .75; margin-bottom: .2rem; }
.public-concierge-composer { display: flex; align-items: flex-end; gap: .5rem; }
.public-concierge-composer .ai-drawer-input { min-height: 3rem; max-height: 8rem; font-size: 16px; }
.public-concierge-composer .ai-drawer-button { flex-shrink: 0; margin: 0; }
.public-concierge-note { font-size: .75rem; color: #526775; margin: .6rem 0 0; }
.ai-drawer-header, .ai-drawer-form, .public-concierge-note { flex-shrink: 0; }
@media (max-height: 600px) {
    .public-concierge-chat { min-height: 3rem; }
}

/* A quiet moving color rim inspired by Siri; center and icon remain still. */
@property --ai-border-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}
@keyframes ai-border-flow {
    to { --ai-border-angle: 360deg; }
}
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
    .ai-drawer-trigger::before,
    .ai-drawer::before,
    .public-concierge-input-wrap:focus-within::before {
        content: "";
        position: absolute;
        inset: -1px;
        padding: 3px;
        border-radius: inherit;
        background: conic-gradient(from var(--ai-border-angle),
            #5dafa9 0deg, #36b9e7 65deg, #9773e8 130deg,
            #ee80b5 195deg, #edb65c 255deg, #5dafa9 360deg);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        mask-composite: exclude;
        opacity: 1;
        pointer-events: none;
        animation: ai-border-flow 4.5s linear infinite;
    }
}
@media (prefers-reduced-motion: reduce) {
    .ai-drawer-trigger::before,
    .ai-drawer::before,
    .public-concierge-input-wrap:focus-within::before { animation: none; }
}

@keyframes ai-star-twinkle {
    0%, 100% { opacity: .75; transform: scale(.94); stroke: #bd913b; fill: #d4a43c; filter: none; }
    40% { opacity: 1; transform: scale(1.07); stroke: #fff5cc; fill: #fff5cc; filter: drop-shadow(0 0 2px rgba(214, 164, 64, .9)); }
    70% { opacity: .9; transform: scale(1); stroke: #e5c16c; fill: #f0cb69; filter: drop-shadow(0 0 1px rgba(214, 164, 64, .45)); }
}
.ai-drawer-trigger .ai-feature-sparkle path {
    stroke: #bd913b;
    fill: #d4a43c;
    transform-box: fill-box;
    transform-origin: center;
}
.ai-drawer-trigger .ai-feature-sparkle path:first-of-type {
    animation: ai-star-twinkle 3.8s ease-in-out infinite;
}
.ai-drawer-trigger .ai-feature-sparkle path:last-of-type {
    animation: ai-star-twinkle 2.8s ease-in-out .7s infinite;
}
@media (prefers-reduced-motion: reduce) {
    .ai-drawer-trigger .ai-feature-sparkle path { animation: none; }
}

.ai-drawer-trigger .ai-feature-sparkle path:nth-of-type(2) {
    animation: ai-star-twinkle 3.3s ease-in-out 1s infinite;
}
@media (prefers-reduced-motion: reduce) {
    .ai-drawer-trigger .ai-feature-sparkle path:nth-of-type(2) { animation: none; }
}

.public-concierge-input-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
    border-radius: .8rem;
}
.public-concierge-input-wrap .ai-drawer-input { display: block; }
@supports ((mask-composite: exclude) or (-webkit-mask-composite: xor)) {
    .public-concierge-input-wrap:focus-within::before {
        inset: 0;
        z-index: 1;
    }
    .public-concierge-input-wrap .ai-drawer-input:focus {
        outline: none;
        border-color: transparent;
        box-shadow: none;
    }
}

.public-concierge-message.assistant a:not(.btn) {
    color: #507a7b;
    text-decoration-color: rgba(80, 122, 123, .45);
    text-underline-offset: .16em;
    font-weight: 500;
}
.public-concierge-message.assistant a:not(.btn):hover,
.public-concierge-message.assistant a:not(.btn):focus-visible {
    color: #365d63;
    text-decoration-color: currentColor;
}
