/* ============================================
   Property Type Pills Component - Pill Button Design
   Based on Environment Filter Design Pattern
   Horizontal pill-button layout with icons
   ============================================ */

/* Main Container */
.property-type-pills {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* Visible Rows Container (first 7 items) */
.property-type-pills__visible-rows {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

/* Extra Rows Container (hidden by default) */
.property-type-pills__extra-rows {
    display: none;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0;
}

/* Show extra rows when expanded */
.collapsable-container.expanded .property-type-pills__extra-rows {
    display: flex;
}

/* Individual Pill Container */
.property-type-pills .property-type-pill {
    position: relative;
    display: inline-flex !important;
}

/* Hide Default Checkbox Input */
.property-type-pill__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Pill Button Label/Styling */
.property-type-pills .property-type-pill .property-type-pill__label {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px !important;
    padding: 6px 12px !important;
    background-color: #F7F7F7 !important; /* Grey 9 */
    border: 1px solid transparent !important;
    border-radius: 4px !important;

    /* Typography from Figma */
    font-family: 'Neue Plak', 'Neue Plak Regular', 'Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important; /* Normal weight, not bold */
    font-style: normal;
    line-height: 1.5;
    color: #464646 !important; /* Grey 4 */

    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Icon Container */
.property-type-pills .property-type-pill .property-type-pill__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.property-type-pills .property-type-pill .property-type-pill__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Text */
.property-type-pills .property-type-pill .property-type-pill__text {
    display: inline-block;
    font-family: 'Neue Plak', 'Neue Plak Regular', 'Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important; /* Ensure normal weight */
    color: inherit;
}

/* Hover State */
.property-type-pills .property-type-pill .property-type-pill__label:hover {
    background-color: #EFEFEF !important;
}

/* Selected/Checked State */
.property-type-pills .property-type-pill .property-type-pill__input:checked + .property-type-pill__label {
    background-color: #F7F7F7 !important; /* Grey 9 - same as default */
    border: 1px solid #464646 !important; /* Grey 4 border */
    color: #181A1B !important; /* Grey 1 - darker text */
}

/* Override any icon color changes on checked state */
.property-type-pills .property-type-pill .property-type-pill__input:checked + .property-type-pill__label .property-type-pill__icon img {
    filter: none !important; /* Keep original icon colors */
}

/* Override text color on checked state */
.property-type-pills .property-type-pill .property-type-pill__input:checked + .property-type-pill__label .property-type-pill__text {
    color: #181A1B !important; /* Grey 1 - darker text, not white */
}

/* Focus State for Accessibility */
.property-type-pills .property-type-pill .property-type-pill__input:focus + .property-type-pill__label {
    outline: 2px solid #464646;
    outline-offset: 2px;
}

/* Active/Pressed State */
.property-type-pills .property-type-pill .property-type-pill__label:active {
    transform: scale(0.98);
}

/* Disabled State */
.property-type-pills .property-type-pill .property-type-pill__input:disabled + .property-type-pill__label {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #F0F0F0;
}

.property-type-pills .property-type-pill .property-type-pill__input:disabled + .property-type-pill__label:hover {
    background-color: #F0F0F0;
    border-color: transparent;
    transform: none;
}

/* Show More/Less Button */
.property-type-show-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    margin-top: 8px;
    background-color: transparent;
    border: 1px solid #EBEBEB;
    border-radius: 4px;
    font-family: 'Neue Plak', 'Neue Plak Regular', 'Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #464646;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.property-type-show-more:hover {
    background-color: #F7F7F7;
    border-color: #464646;
}

/* Toggle button text visibility */
.property-type-show-more .collapsable-btn-hide {
    display: none;
}

.collapsable-container.expanded .property-type-show-more .collapsable-btn-show {
    display: none;
}

.collapsable-container.expanded .property-type-show-more .collapsable-btn-hide {
    display: inline;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .property-type-pill__label {
        font-size: 12px;
        padding: 6px 10px;
        height: 30px;
    }

    .property-type-pill__icon {
        width: 14px;
        height: 14px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .property-type-pills {
        gap: 10px;
    }

    .property-type-pills__visible-rows,
    .property-type-pills__extra-rows {
        gap: 6px;
    }

    .property-type-pill__label {
        font-size: 12px;
        padding: 6px 10px;
        height: 32px;
        gap: 4px;
    }

    .property-type-pill__icon {
        width: 14px;
        height: 14px;
    }

    .property-type-show-more {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .property-type-pill {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .property-type-pill__label {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .property-type-show-more {
        display: none;
    }
}

/* ============================================
   Dark Mode Support (Future Enhancement)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Keep light theme for now - uncomment when dark mode is implemented */
    /*
    .property-type-pill__label {
        background-color: #2A2A2A;
        color: #F7F7F7;
        border-color: #3A3A3A;
    }

    .property-type-pill__label:hover {
        background-color: #333333;
    }

    .property-type-pill__input:checked + .property-type-pill__label {
        border-color: #F7F7F7;
        color: #FFFFFF;
    }

    .property-type-show-more {
        color: #F7F7F7;
        border-color: #3A3A3A;
    }

    .property-type-show-more:hover {
        background-color: #2A2A2A;
        border-color: #F7F7F7;
    }
    */
}
