.selected-homes-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    width: 60px;
    min-width: 60px;
    background: #fff;
    border: solid 1px #f5f3f1;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: width 0.25s ease, min-width 0.25s ease;
}

.selected-homes-toggle-btn {
    width: 36px;
    height: 20px;
    border: none;
    border-radius: 1rem;
    background-color: #e7e7e7;
    color: #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.selected-homes-toggle-btn .material-symbols-outlined {
    font-size: 1.375rem;
}

.selected-homes-sidebar-collapsed {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.selected-homes-sidebar-label {
    transform: rotate(90deg);
    white-space: nowrap;
    margin-top: 66px;
}

.selected-homes-sidebar-expanded {
    display: none;
}

.selected-homes-sidebar.is-expanded {
    width: 390px;
    min-width: 390px;
    align-items: stretch;
}

.selected-homes-sidebar.is-expanded .selected-homes-sidebar-collapsed {
    display: none;
}

.selected-homes-sidebar.is-expanded .selected-homes-sidebar-expanded {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 0 0.75rem 0.75rem;
    overflow-y: auto;
}

.selected-homes-sidebar.is-expanded .selected-homes-toggle-btn {
    margin-top: 0;
    margin-bottom: 0;
}

.selected-homes-expanded-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 0 0.5rem 0.5rem;
}

.selected-homes-expanded-header .selected-homes-toggle-btn {
    flex-shrink: 0;
}

.selected-homes-tabs {
    display: flex;
    align-items: center;
    background: var(--hoa-cream);
    border-radius: 1rem;
    padding: 0.125rem;
    margin: 0 0.5rem 0.75rem;
}

.selected-homes-tab {
    flex: 1;
    border: none;
    background: var(--hoa-cream);
    color: var(--hoa-medium-grey);
    border-radius: 0.875rem;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 600;
}

.selected-homes-tab.is-active {
    background: var(--hoa-beige);
    color: var(--hoa-dark-grey);
    font-weight: 600;
}

.selected-homes-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #1f2933;
}

.selected-homes-empty-icon-wrap {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #f8efea;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.selected-homes-empty-icon-wrap img {
    width: 30px;
    height: 30px;
}

.selected-homes-empty-title {
    margin-bottom: 0.5rem;
}

.selected-homes-empty-subtitle {
    font-style: italic;
}

.selected-homes-empty-divider {
    width: 2rem;
    height: 0.125rem;
    background: #b5b8bc;
    border-radius: 0.125rem;
    margin: 1.5rem 0;
}

.selected-homes-list {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 0 0.25rem;
}

.selected-homes-list.is-loading {
    pointer-events: none;
}

.selected-homes-list.is-single-layout {
    padding: 0 0.5rem;
}

.selected-home-card {
    position: relative;
    border: 1px solid #d9d9d9;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #fff;
    display: flex;
    min-height: 140px;
}

.selected-home-image-wrap {
    width: 40%;
    min-width: 40%;
    background: #f5f5f5;
}

.selected-home-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-home-image-link,
.selected-home-single-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.selected-home-content {
    /* width: 55%; */
    /* padding: 4px 0px; */
    display: flex;
    flex-direction: column;
}

.selected-home-status-wrap {
    display: flex;
    justify-content: space-between;
}

.selected-home-status-tag {
    /* width: 80%; */
    background: var(--hoa-beige);
    padding: 4px 8px;
    border-radius: 0;
    border-bottom-right-radius: 0.75rem;
    margin-bottom: 8px;
}

.selected-home-address {
    margin-bottom: 0.375rem;
    line-height: 1.3;
}

.selected-home-stats {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.selected-home-type {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-home-type-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-home-details-link {
    margin-top: auto;
    width: fit-content;
    margin-left: auto;
    color: var(--hoa-rust);
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.selected-home-details-link .material-symbols-outlined {
    font-size: 1.125rem;
    color: var(--hoa-rust);
}

.selected-home-remove-btn {
    margin-left: auto;
    border: none;
    background: transparent;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    cursor: pointer;
}

.selected-home-remove-btn .material-symbols-outlined {
    font-size: 1.25rem;
    color: #66707a;
}

.selected-home-single-card {
    background: #fff;
    overflow: hidden;
}

.selected-home-single-card.is-refreshing {
    animation: selected-home-refresh-in 220ms ease-out both;
}

.selected-home-single-image-wrap {
    width: 100%;
    height: 13rem;
}

.selected-home-single-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0px 12px 12px 12px;
}

.selected-home-detail-btn-link {
    text-decoration: none;
}

.selected-home-single-content {
    padding-top: 8px;
    display: flex;
    flex-direction: column;
}

.selected-home-single-status-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.selected-home-single-status-row .selected-home-status-tag {
    width: fit-content;
    margin-bottom: 0;
    padding: 0.5rem 0.75rem;
}

.selected-home-single-address {
    margin-bottom: 0.5rem;
    line-height: 1.15;
}

.selected-home-single-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selected-home-single-meta {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.selected-home-single-meta-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-home-single-description {
    margin-top: 0.625rem;
}

.selected-home-single-description p {
    margin: 0.25rem 0 0;
    color: var(--hoa-dark-grey);
}

.selected-home-single-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.875rem;
}

.selected-home-single-actions .hoa-btn {
    flex: 1;
    min-width: 0;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.selected-home-single-footnote {
    margin-top: 0.875rem;
    color: var(--hoa-dark-grey);
    line-height: 1.3;
}

.selected-home-single-card-skeleton .selected-home-single-image-wrap {
    border-radius: 0 0.75rem 0.75rem 0.75rem;
    overflow: hidden;
}

.selected-home-single-content-skeleton {
    padding-top: 0.5rem;
}

.selected-home-skeleton-row {
    margin-bottom: 0.5rem;
}

.selected-home-skeleton-block {
    display: flex;
    border-radius: 0.375rem;
    /* Horizontal shimmer gives users immediate "loading new data" feedback. */
    background: linear-gradient(90deg, #f1f2f4 25%, #e7eaee 50%, #f1f2f4 75%);
    background-size: 200% 100%;
    animation: selected-home-skeleton-shimmer 900ms linear infinite;
}

.selected-home-skeleton-image {
    width: 100%;
    height: 13rem;
}

.selected-home-skeleton-pill {
    width: 11.5rem;
    height: 2rem;
    border-radius: 0 0.75rem 0.75rem 0;
}

.selected-home-skeleton-title {
    width: 88%;
    height: 1.5rem;
}

.selected-home-skeleton-stats {
    width: 66%;
    height: 1.125rem;
}

.selected-home-skeleton-meta {
    width: 55%;
    height: 1.125rem;
}

.selected-home-skeleton-description {
    width: 100%;
    height: 3.125rem;
    margin-top: 0.375rem;
}

.selected-home-skeleton-button {
    flex: 1;
    min-width: 0;
    height: 2.5rem;
}

@keyframes selected-home-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes selected-home-refresh-in {
    /* Subtle fade/slide so similar listings still feel updated. */
    0% {
        opacity: 0.65;
        transform: translateY(0.25rem);
        filter: saturate(0.93);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: saturate(1);
    }
}

.selected-homes-compare-helper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem 1rem 1.75rem;
}

.selected-homes-compare-helper-icon-wrap {
    width: 5.25rem;
    height: 5.25rem;
    border-radius: 50%;
    background: #f8efea;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.selected-homes-compare-helper-icon-wrap img {
    width: 1.875rem;
    height: 1.875rem;
}

.selected-homes-compare-helper-subtitle {
    font-style: italic;
    color: var(--hoa-dark-grey);
}

@media (max-width: 768px) {
    .selected-homes-sidebar {
        display: none;
    }
}