/* =========================================================
    File: stay-search-bar.css
    Description: メイン検索バーのデザイン（PC：横並び / スマホ：グリッド整列）
========================================================= */

/* --- 1. Base Containers (外枠) --- */
.wan-search-bar {
    width: 100%;
    margin: 40px 0;
    padding: 0;
}

.wan-search-form {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.wan-search-fields {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* --- 2. Common Field Styles (各入力エリアの共通設定) --- */
.wan-search-field {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border: 1px solid #999;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.wan-search-field:hover {
    border-color: #f39800;
    box-shadow: 0 4px 12px rgba(243, 152, 0, 0.1);
}

.wan-search-field.-area {
    flex: 1;
    position: relative;
    min-width: 0;
}

.wan-search-field.-dogs {
    flex: 1;
    gap: 15px;
    position: relative;
    min-width: 0;
}

.wan-search-field.-submit {
    flex: 0 0 130px;
    padding: 0;
    border: none;
}

/* --- 3. Icons (共通アイコン) --- */
.c-search-image,
.c-paw-image {
    object-fit: contain;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-right: 12px;
}

.c-paw-image {
    width: 28px;
    height: 28px;
}

/* --- 4. Area Field Specifics --- */
.wan-search-field.-area .modal-search-inner-left.-main {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.wan-search-field.-area .modal-search-inner-left.-main::-webkit-scrollbar { height: 4px; }
.wan-search-field.-area .modal-search-inner-left.-main::-webkit-scrollbar-track { background: transparent; }
.wan-search-field.-area .modal-search-inner-left.-main::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 10px; }

.modal-search-inner-left.-main .area-tag { flex-shrink: 0; }

/* --- 5. Dog Field Specifics (PC：デフォルトは横並び) --- */
.field-text {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.dog-display-row {
    display: flex;
    justify-content: space-around;
    flex: 1;
}

.dog-type {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.dog-type span {
    margin: 0 4px;
    color: #f39800;
    font-size: 16px;
    font-weight: 700;
}

/* --- 6. Submit Button --- */
.wan-search-btn {
    width: 100%;
    height: 100%;
    background: #f39800;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.wan-search-btn:hover { background: #e68a00; }

/* --- 7. Responsive Adjustments (スマホ時) --- */
@media screen and (max-width: 768px) {
    .wan-search-bar { 
        padding: 20px 0; 
    }
    
    .wan-search-fields {
        flex-direction: column;
        padding: 0;
        gap: 10px;
        border: none;
        background: transparent;
        box-shadow: none;
    }
    
    .wan-search-field { 
        width: 100%; 
        flex: none !important; 
        height: 56px; 
        padding: 0 15px; 
    }
    
    .wan-search-field.-area { 
        order: 1; 
        gap: 10px; 
    }
    
    /* スマホ版：犬の頭数表示を2x2グリッドにして整列 */
    .wan-search-field.-dogs {
        order: 2;
        gap: 10px;
        padding: 10px 15px;
        height: 100%;
    }

    .dog-display-row {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2列 */
        gap: 8px 12px;
        flex: 1;
    }

    .dog-type {
        display: grid !important;
        grid-template-columns: 4em 3em 1.5em; /* ラベル・数字・単位の幅を固定して揃える */
        align-items: end;
        font-size: 13px;
    }
    
    .wan-search-field.-submit { 
        order: 3; 
        height: 50px; 
    }
    
    .c-search-image, 
    .c-paw-image { 
        width: 20px; 
        height: 20px; 
        margin-right: 8px; 
    }
}