@charset "utf-8";

/* ============================================================
   ベースリセット
   ============================================================ */

body {
    background: #f5f7fa;
    font-family: "Hiragino Kaku Gothic ProN", sans-serif;
    color: #333;
}

body.menu-open {
    overflow: hidden;
    height: 100vh; /* iOS対策 */
}

a       { color: #00c; }
a:hover { color: #36F; }

form {
    margin: 0;
    padding: 0;
}

sub, sup {
    font-size: 60%;
}

label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

input[type="checkbox"] {
    margin-right: 6px;
}

/* ============================================================
   レイアウト
   ============================================================ */

.inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================================
   ヘッダー
   ============================================================ */

header {
    height: 75px;
    background: #fff;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
}

header h1 img {
    height: 75px;
}

header ul {
    display: flex;
    gap: 15px;
}

#menu-toggle {
    display: none;
    width: 30px;
    height: 22px;
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
}

#menu-toggle span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: 0.3s ease;
}

/* 3本線の位置 */
#menu-toggle span:nth-child(1) { top: 0; }
#menu-toggle span:nth-child(2) { top: 9px; }
#menu-toggle span:nth-child(3) { top: 18px; }

/* ×になる */
#menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

#menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* ============================================================
   ナビ
   ============================================================ */

#menu-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 998;
}

#menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.sp-links {
    display: none;
}

/* ナビは前面 */
#nav {
    position: relative;
    z-index: 999;
}

/* ============================================================
   トップバー
   ============================================================ */

#top_message {
    margin: 0 auto;
    height: 50px;
    background: #ffa65f;
}

#top_message .inner {
    text-align: center;
    height: inherit;
}

#top_message .inner p {
    line-height: 50px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

/* ============================================================
   ボタン
   ============================================================ */

a.btn {
    font-size: 14px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #ffffff;
}

a.btn-search-clinic {
    background-color: #a2c32d;
}

a.btn-login {
    background-color: #ff896f;
}

.search-btn {
    background: #2b6cb0;
    color: #fff;
    border: none;
    padding: 14px 30px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-btn:hover {
    background: #1f4f85;
}

.reset-btn {
    margin-left: 15px;
    background: #ddd;
    border: none;
    padding: 14px 25px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.reset-btn:hover {
    background: #c9c9c9;
}

/* ============================================================
   検索条件エリア
   ============================================================ */

#search-condition .inner {
    background: #fff;
}

#search-condition h2 {
    position: relative;
    line-height: 1;
    color: #333;
    font-size: 24px;
    font-weight: bold;
    padding-left: 16px;
}

/* セクション枠 */
.filter-section {
    padding: 24px;
    margin-bottom: 76px;
}

/* 見出し */
.section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 40px 0 18px;
    border-left: 4px solid #a2c32d;
    padding-left: 10px;
}

.section-title:first-child {
    margin-top: 0;
}

.section-title-withicon {
    border-left: none;
    padding-left: 0 !important;
}

.section-title-withicon i {
    color: #a2c32d;
    padding-right: 16px;
}

/* 小見出し */
.route-block h3 {
    font-size: 15px;
    margin: 18px 0 10px;
    color: #555;
}

/* ============================================================
   フィルターUI
   ============================================================ */

.intro {
    background: #fff;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.filter-group {
    display: grid;
    gap: 16px;
}

.filter-card {
    background: #fff;
    border-bottom: 1px solid #e9e9e9;
    overflow: hidden;
}

/* アコーディオンヘッダー */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.card-header:hover {
    background: #f7f9fc;
}

/* 親チェック */
.parent-check {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* 矢印アイコン */
.arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.filter-card.active .arrow {
    transform: rotate(-135deg);
}

.filter-card:not(:has(.child)) .arrow,
.no-children .arrow {
    display: none;
}

.no-children .card-header {
    cursor: default;
}

/* コンテンツ */
.content {
    display: none;
    padding: 16px 0 16px 32px;
}

.desc {
    font-size: 13px;
    background: #eef3f8;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

/* チェックUI */
.check-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
}

.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 20px;
    padding-left: 32px;
}

/* ============================================================
   チップ
   ============================================================ */

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 10px;
}

.chip {
    position: relative;
    cursor: pointer;
}

.chip input {
    display: none;
}

.chip span {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #ddd;
    background: #f9fafb;
    font-size: 14px;
    transition: all .2s ease;
}

.chip:hover span {
    border-color: #3b82f6;
    background: #eff6ff;
}

.chip input:checked + span {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.chip input:checked + span em {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   路線チップ（モーダル内）
   ============================================================ */

#modalStations {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 28px;
    position: relative;
    padding: 20px 10px;
    --route-color: #80C342;
}

#modalStations .chip {
    position: relative;
    display: flex;
    align-items: center;
}

#modalStations .chip span {
    background: #fff;
    border: 3px solid var(--route-color);
    border-radius: 50px;
    padding: 6px 14px;
    position: relative;
    z-index: 2;
}

#modalStations .chip::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 100%;
    width: 28px;
    height: 3px;
    background: var(--route-color);
    transform: translateY(-50%);
    z-index: 1;
}

#modalStations .chip:last-child::after {
    display: none;
}

#modalStations input:checked + span {
    background: var(--route-color);
    color: #fff;
}

/* ============================================================
   駅カラーバッジ
   ============================================================ */

.station-color {
    border: none !important;
    padding: 0 4px !important;
    text-align: center;
    color: #fff;
    font-weight: bold;
    margin-right: 6px;
    display: inline-block !important;
}

.station-width-15 { width: 15px; }
.station-width-20 { width: 20px; }
.station-width-25 { width: 25px; }

.station-count {
    background-color: inherit !important;
    padding: 0 !important;
    border: none !important;
}

/* ============================================================
   アクションエリア（ボタンフッター）
   ============================================================ */

.action-area {
    position: fixed;
    left: 0;
    width: 100%;
    text-align: center;
    background: #fff;
    padding: 12px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.action-area.at-bottom {
    background: transparent;
    box-shadow: none;
}

/* ============================================================
   モーダル
   ============================================================ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    width: 90%;
    max-height: 80vh;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 18px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
}

/* ============================================================
   フッター
   ============================================================ */

footer {
    background-image: url(../../images/common/footer.gif);
    padding-top: 25px;
    margin: 0 auto;
}

footer i {
    color: #a2c32d;
}

footer h2 {
    position: relative;
    line-height: 1;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}

footer h2::after {
    content: none;
}

footer span {
    font-size: 14px;
}

footer #addr {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    align-items: center;
}

footer #addr .detail {
    padding: 20px 0;
}

footer #addr .detail p {
    padding: 0;
}

footer .copy-right {
    text-align: center;
    padding: 0 0 20px 0;
    font-size: 14px;
}
