/**
 * RS House Filter - 前端樣式
 *
 * 注意：此樣式嚴格遵守提供的 HTML 規範
 * 禁止添加任何 hover/active/focus 效果
 * 禁止添加 box-shadow、額外 border、outline
 *
 * @package RS_House_Filter
 */

/* ========================================
   基礎樣式
   ======================================== */

.rshf-filter-wrapper {
    box-sizing: border-box;
}

.rshf-filter-wrapper *,
.rshf-filter-wrapper *::before,
.rshf-filter-wrapper *::after {
    box-sizing: border-box;
}

.rshf-filter-form {
    width: 100%;
}

/* ========================================
   下拉選單樣式
   ======================================== */

.rshf-select {
    width: 100%;
    border: none;
    background: transparent;
    color: rgba(51, 51, 51, 0.60);
    font-size: 14px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    line-height: 22.40px;
    letter-spacing: 0.70px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* 已選擇時的顏色 */
.rshf-select:not([value=""]):not(:invalid) {
    color: #333333;
}

/* Disabled 狀態 */
.rshf-select:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Disabled 選項樣式 */
.rshf-select option:disabled,
.rshf-select option.rshf-option-disabled {
    color: #cccccc;
    background-color: #f9f9f9;
}

/* 移除所有互動效果 */
.rshf-select:hover,
.rshf-select:focus,
.rshf-select:active {
    outline: none;
    border: none;
    box-shadow: none;
}

/* ========================================
   搜尋按鈕
   ======================================== */

.rshf-submit-btn {
    transition: none;
}

/* 移除按鈕的所有互動效果 */
.rshf-submit-btn:hover,
.rshf-submit-btn:focus,
.rshf-submit-btn:active {
    outline: none;
    border: none;
    box-shadow: none;
    background: #04BEB2;
}

/* ========================================
   無結果彈窗樣式
   ======================================== */

.rshf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.rshf-modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
}

.rshf-modal-icon {
    margin-bottom: 20px;
}

.rshf-modal-text {
    color: #333333;
    font-size: 16px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 24px;
}

.rshf-modal-close {
    background: #04BEB2;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 40px;
    font-size: 14px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    cursor: pointer;
    transition: none;
}

.rshf-modal-close:hover,
.rshf-modal-close:focus,
.rshf-modal-close:active {
    background: #04BEB2;
    outline: none;
    border: none;
    box-shadow: none;
}

/* ========================================
   RWD 響應式設計
   ======================================== */

/* 平板 (768px - 1024px) */
@media (max-width: 1024px) {
    .rshf-filter-wrapper {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }

    .rshf-row {
        gap: 8px !important;
    }

    .rshf-field {
        width: calc(50% - 8px) !important;
        min-width: 180px !important;
        margin-bottom: 10px !important;
    }
}

/* 手機版 (768px 以下) - 垂直堆疊 */
@media (max-width: 768px) {
    .rshf-filter-wrapper {
        padding-left: 16px !important;
        padding-right: 16px !important;
        padding-top: 16px !important;
        padding-bottom: 16px !important;
    }

    .rshf-row {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .rshf-field {
        width: 100% !important;
        min-width: 100% !important;
        height: 80px !important;
        margin-bottom: 10px !important;
    }

    .rshf-submit-field {
        margin-top: 8px;
        margin-bottom: 0 !important;
    }

    /* 調整標籤間距 */
    .rshf-field .Frame5 {
        margin-bottom: 4px;
    }

    /* 展開按鈕顯示 */
    .rshf-expand-toggle {
        display: block !important;
    }

    /* 預設隱藏可摺疊欄位 */
    .rshf-collapsible-field {
        display: none !important;
    }

    /* 展開狀態 */
    .rshf-filter-wrapper.rshf-expanded .rshf-collapsible-field {
        display: inline-flex !important;
    }

    /* 展開後隱藏展開按鈕文字改變 */
    .rshf-filter-wrapper.rshf-expanded .rshf-expand-arrow {
        transform: rotate(180deg);
    }
}

/* 小手機 (480px 以下) */
@media (max-width: 480px) {
    .rshf-filter-wrapper {
        padding-left: 12px !important;
        padding-right: 12px !important;
        border-radius: 8px !important;
    }

    .rshf-field {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
}
