/* distillery-map.css — crafters-jin */

.distillery-map-wrap {
    display: grid;
    grid-template-columns: 1fr 280px;
    height: 800px;
    border: 1px solid #e8e4de;
    border-radius: 12px;
    overflow: hidden;
    margin: 32px 0;
    font-family: inherit;
}

#distillery-map { height: 100%; z-index: 1; }

#distillery-sidebar {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e8e4de;
    background: #faf9f7;
    overflow: hidden;
    height: 100%;
}

/* ヘッド */
.sb-head    { padding: 16px 18px 12px; border-bottom: 1px solid #e8e4de; flex-shrink: 0; }
.sb-eyebrow { font-size: 11px; letter-spacing: 0.12em; color: #3B6D11; text-transform: uppercase; margin-bottom: 4px; }
.sb-title   { font-size: 16px; font-weight: 700; color: #1a1a1a; }
.sb-count   { font-size: 12px; color: #1a1a1a; margin-top: 2px; }

/* 検索 */
.sb-search { padding: 10px 15px; border-bottom: 1px solid #e8e4de; flex-shrink: 0; }
.sb-search input {
    width: 100%;
    background: #f0ede8;
    border: 1px solid #d3d1c7;
    border-radius: 7px;
    padding: 8px 12px;
    font-size: 13px;
    color: #1a1a1a;
    outline: none;
    box-sizing: border-box;
}
.sb-search input::placeholder { color: #888780; }

/* チップ */
.sb-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
    padding: 8px 15px 4px;
    flex-shrink: 0;
}
.sb-chip {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 12px;
    border: 1px solid #d3d1c7;
    color: #1a1a1a;
    background: #faf9f7;
    cursor: pointer;
}
.sb-chip.active { background: #EAF3DE; border-color: #97C459; color: #27500A; }

/* 複数選択可 */
.sb-filter-note {
    font-size: 10px;
    color: #888780;
    letter-spacing: 0.04em;
    padding: 0 15px 6px;
    border-bottom: 1px solid #e8e4de;
    flex-shrink: 0;
}

/* リセットボタン */
.sb-reset-btn {
    font-size: 13px;
    font-weight: 500;
    color: #3B6D11;
    text-align: center;
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 1px solid #e8e4de;
    letter-spacing: 0.04em;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}
.sb-reset-btn:hover  { background: #f0ede8; }
.sb-reset-btn:active { background: #EAF3DE; color: #27500A; }

/* 地域・都道府県 */
.sb-region { padding: 7px 15px; border-bottom: 1px solid #e8e4de; flex-shrink: 0; }
.sb-region select {
    width: 100%;
    background: #faf9f7;
    border: 1px solid #d3d1c7;
    border-radius: 7px;
    padding: 7px 12px;
    font-size: 12px;
    color: #1a1a1a;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888780'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
.sb-region select:focus { border-color: #97C459; }

#sb-pref-select {
    width: 100%;
    background: #f0ede8;
    border: 1px solid #d3d1c7;
    border-radius: 7px;
    padding: 7px 32px 7px 12px;
    font-size: 12px;
    color: #1a1a1a;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%23888780'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 8px;
}
#sb-pref-select:disabled { opacity: 0.4; cursor: not-allowed; }
#sb-pref-select:focus    { border-color: #97C459; }

/* リスト */
#distillery-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.ditem { display: flex; gap: 9px; padding: 12px 15px; border-bottom: 1px solid #e8e4de; cursor: pointer; align-items: flex-start; }
.ditem:hover  { background: #f5f3ef; }
.ditem.active { background: #f7f9f4; border-left: 2px solid #3B6D11; padding-left: 13px; }

.dname { font-size: 14px; font-weight: 700; color: #1a1a1a; line-height: 1.3; }
.ditem.active .dname { color: #27500A; }
.dpref { font-size: 12px; color: #1a1a1a; margin-top: 2px; }
.dtags { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 5px; }
.dtag  { font-size: 11px; padding: 2px 8px; border-radius: 7px; background: #f0ede8; color: #1a1a1a; border: 1px solid #d3d1c7; }

/* アコーディオン詳細 */
.ditem-detail {
    padding: 12px 15px;
    background: #f7f9f4;
    border-bottom: 1px solid #e8e4de;
    border-left: 2px solid #3B6D11;
    animation: slideDown 0.15s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.det-region { font-size: 11px; letter-spacing: 0.1em; color: #3B6D11; text-transform: uppercase; margin-bottom: 3px; }
.det-name   { font-size: 16px; font-weight: 700; color: #1a1a1a; margin-bottom: 5px; }
.det-desc   { font-size: 12px; color: #1a1a1a; line-height: 1.6; margin-bottom: 8px; }
.det-row    { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 9px; }
.det-tag    { font-size: 11px; padding: 3px 9px; border-radius: 9px; background: #EAF3DE; color: #27500A; border: 1px solid #C0DD97; }
.det-tag.gray { background: #f0ede8; color: #1a1a1a; border-color: #d3d1c7; }
.det-link   { font-size: 13px; color: #3B6D11; text-decoration: none; }
.det-link:hover { text-decoration: underline; }

/* ピン */
.custom-pin { background: none; border: none; }
.pin-drop {
    width: 16px;
    height: 16px;
    background: #3B6D11;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    position: relative;
    border: 2px solid #faf9f7;
    box-shadow: 0 0 0 1.5px #3B6D11;
}
.pin-drop::after {
    content: '';
    width: 6px;
    height: 6px;
    background: #faf9f7;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
}

/* ポップアップ */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 8px !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12) !important;
    padding: 0 !important;
    border: 1px solid #e8e4de !important;
}
.custom-popup .leaflet-popup-content { margin: 0 !important; width: auto !important; }
.custom-popup .leaflet-popup-tip     { background: #faf9f7 !important; }

.map-popup          { padding: 12px 14px; background: #faf9f7; border-radius: 8px; min-width: 160px; }
.map-popup-name     { font-size: 13px; font-weight: 700; color: #1a1a1a; margin-bottom: 2px; line-height: 1.3; }
.map-popup-pref     { font-size: 11px; color: #888780; margin-bottom: 6px; }
.map-popup-badges   { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.map-popup-badge    { font-size: 10px; padding: 1px 6px; border-radius: 7px; background: #f0ede8; color: #1a1a1a; border: 1px solid #d3d1c7; }
.map-popup-link     { display: block; font-size: 11px; color: #3B6D11; text-decoration: none; margin-top: 8px; padding-top: 7px; border-top: 0.5px solid #e8e4de; }
.map-popup-link:hover { text-decoration: underline; }

/* Leaflet上書き */
.leaflet-control-attribution { font-size: 9px !important; background: rgba(250,249,247,0.8) !important; }
.leaflet-control-zoom a      { color: #1a1a1a !important; border-color: #e8e4de !important; background: #faf9f7 !important; }
.leaflet-control-zoom a:hover { background: #f0ede8 !important; }

/* レスポンシブ */
@media (max-width: 640px) {
    .distillery-map-wrap {
        grid-template-columns: 1fr;
        grid-template-rows: 320px 1fr;
        height: auto;
    }
    #distillery-map     { height: 320px; }
    #distillery-sidebar { border-left: none; border-top: 1px solid #e8e4de; max-height: none; height: auto; }
    #distillery-list    { height: 300px; max-height: 300px; overflow-y: auto; min-height: 0; }
}