@charset "UTF-8";

/* ==============================================
   1. 検索結果ページ用スタイル (変更なし)
   ============================================== */
.postal-archive-container { background-color: #fff; margin-bottom: 40px; }
.postal-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid #eee; }
.postal-item { display: flex; align-items: center; padding: 10px 16px; border-bottom: 1px solid #eee; background: #fff; transition: background 0.1s; position: relative; min-height: 52px; box-sizing: border-box; }
.postal-item:hover { background-color: #f5f9fc; }
.item-status-bar { width: 4px; height: 32px; border-radius: 2px; margin-right: 12px; flex-shrink: 0; }
.status-visited { background-color: #388e3c; }
.status-unvisited { background-color: #ddd; }
.item-main-area { display: flex; align-items: center; flex-grow: 1; margin-right: 10px; min-width: 0; flex-wrap: wrap; gap: 6px; }
.item-name { font-size: 15px; font-weight: bold; color: #333; line-height: 1.4; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: bold; color: #fff; padding: 2px 6px; border-radius: 3px; height: auto; line-height: 1.2; white-space: nowrap; }
.status-badge.closed { background-color: #e6a23c; }
.status-badge.abolished { background-color: #666; }
.item-meta-group { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.item-city-link { font-size: 10px; color: #555; background: #f0f0f0; padding: 3px 6px; border-radius: 3px; text-decoration: none; transition: background 0.2s; position: relative; z-index: 2; white-space: nowrap; }
.item-city-link:hover { background: #e0e0e0; text-decoration: none; color: #333; }
.item-code { font-size: 12px; color: #555; font-family: "Consolas", "Monaco", monospace; letter-spacing: 0.03em; }
.p-tag { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; font-size: 10px; font-weight: bold; color: #fff; }
.tag-saving { background-color: #388e3c; }
.tag-lunch { background-color: #d32f2f; }
.tag-disabled { background-color: #eee; color: #ccc; }
.row-link { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }

@media (max-width: 600px) {
    .postal-item { display: grid; grid-template-columns: 4px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 6px; padding: 10px 12px; align-items: start; }
    .item-status-bar { grid-column: 1; grid-row: 1 / 3; height: 100%; margin: 0; }
    .item-main-area { grid-column: 2; grid-row: 1; width: 100%; margin: 0; }
    .item-name { font-size: 15px; white-space: normal; }
    .item-meta-group { grid-column: 2; grid-row: 2; width: 100%; margin: 0; justify-content: flex-start; flex-wrap: wrap; }
    .item-code { font-size: 11px; }
    .p-tag { width: 20px; height: 20px; font-size: 9px; }
}


/* ==============================================
   2. 統合検索ウィジェット用スタイル (汎用化)
   ※ #secondary を削除し、どこでも使えるように変更
   ============================================== */

/* ウィジェットカード本体 */
/* サイドバー内(.widget) または ショートコードラッパー */
#secondary .widget,
.postal-unified-search-shortcode-wrapper {
    background-color: #fff;
    border: none;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ウィジェットタイトル */
#secondary .widget-title,
.postal-unified-search-shortcode-wrapper .widget-title {
    background: transparent;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    padding: 24px 24px 10px;
    position: relative;
    letter-spacing: 0.05em;
    border-bottom: none;
    margin: 0;
}
#secondary .widget-title:before,
.postal-unified-search-shortcode-wrapper .widget-title:before {
    content: "";
    display: block;
    position: absolute;
    left: 24px;
    bottom: 0px;
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, #0068b7, #00a0e9);
    border-radius: 2px;
}

/* レイアウト・余白 */
.dynamic-municipality-widget-container, 
.postal-search-wrapper {
    width: 100%;
    padding: 0 24px 28px;
    box-sizing: border-box;
}

/* フォーム行 */
.municipality-form-row, 
.pds-form-row {
    margin-bottom: 24px;
}

/* 区切り線 */
.pus-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px 24px;
    position: relative;
}
.pus-divider:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background-color: #eee;
    z-index: 0;
}
.pus-divider-title {
    position: relative;
    z-index: 1;
    background-color: #f0f7ff;
    color: #0068b7;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 5px rgba(0, 104, 183, 0.05);
}

/* ラベル */
.municipality-label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
    padding-left: 2px;
}

/* 入力フォーム・ドロップダウン */
.municipality-dropdown, 
.pds-input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    font-size: 14px;
    color: #333;
    background-color: #f5f7f9;
    border: 2px solid transparent;
    border-radius: 8px;
    height: 48px;
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230068b7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}
.pds-input {
    cursor: text;
    background-image: none;
}
.municipality-dropdown:focus, 
.pds-input:focus {
    outline: none;
    background-color: #fff;
    border-color: #0068b7;
    box-shadow: 0 4px 12px rgba(0, 104, 183, 0.1);
}

/* ボタン */
.municipality-button-container, 
.pds-button-container {
    margin-top: 24px;
    text-align: center;
}
.municipality-button, 
.pds-button {
    display: block;
    width: 100%;
    padding: 14px 0;
    background: linear-gradient(135deg, #0068b7 0%, #005090 100%) !important;
    color: #fff !important;
    border: none;
    border-radius: 50px;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    line-height: 1;
    box-shadow: 0 5px 15px rgba(0, 104, 183, 0.3);
    transition: all 0.2s ease;
}
.municipality-button:hover, 
.pds-button:hover {
    background: linear-gradient(135deg, #007bd3 0%, #0060aa 100%) !important;
    box-shadow: 0 7px 20px rgba(0, 104, 183, 0.4);
}
.municipality-button:active, 
.pds-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0, 104, 183, 0.3);
}
.municipality-button:disabled {
    background: #e0e0e0 !important;
    color: #999 !important;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* 余計なPタグ削除 */
.widget_postal_unified_search_widget p:empty, 
.widget_block p:empty,
.postal-unified-search-shortcode-wrapper p:empty {
    display: none;
}