/* 店舗マップ検索ページ */

.stores-map-page {
    background: #f5f5f5;
}

.stores-map-page__notice {
    padding: 48px 16px 64px;
}

.stores-map-page__title {
    margin: 0 0 12px;
    font-size: 1.5rem;
    font-weight: 700;
}

.stores-map-page__limit-message {
    margin: 0 0 12px;
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

.stores-map-page__limit-sub {
    margin: 0 0 20px;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #666;
}

.stores-map-page__fallback-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 999px;
    background: #2d9f4e;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.stores-map-page__fallback-link:hover {
    background: #268a43;
}

.stores-map-page__map-wrap {
    position: relative;
    width: 100%;
}

.stores-map-page__map {
    width: 100%;
    height: min(72vh, 640px);
    min-height: 420px;
    background: #e8e8e8;
}

.stores-map-page__search {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, calc(100% - 32px));
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2;
}

.stores-map-page__keyword {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #fff;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stores-map-page__keyword:focus {
    outline: 2px solid #2d9f4e;
    outline-offset: 2px;
}

.stores-map-page__search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    align-self: center;
    padding: 10px 20px;
    border: none;
    border-radius: 999px;
    background: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stores-map-page__search-btn:hover {
    background: #fafafa;
}

.stores-map-page__search-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.stores-map-page__results {
    padding: 24px 0 48px;
    background: #fff;
}

.stores-map-page__results-title {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 700;
}

.stores-map-page__count {
    margin: 0 0 16px;
    color: #666;
    font-size: 0.875rem;
}

.stores-map-page__empty {
    margin: 0;
    color: #666;
}

.stores-map-page__error {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 24px;
    text-align: center;
    background: #fff;
}

.stores-map-page__error-title {
    margin: 0 0 12px;
    font-size: 1.125rem;
    font-weight: 700;
    color: #c62828;
}

.stores-map-page__error-text {
    margin: 0 0 8px;
    max-width: 420px;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #444;
}

.stores-map-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.stores-map-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.stores-map-list__item:focus,
.stores-map-list__item:active {
    outline: none;
    border-color: #eee;
    box-shadow: none;
}

.stores-map-list__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stores-map-list__name {
    font-size: 1rem;
    font-weight: 700;
}

.stores-map-list__location {
    font-size: 0.875rem;
    color: #444;
}

.stores-map-list__station {
    font-size: 0.8125rem;
    color: #666;
}

/* マップ上の店舗ポップアップ（自前コンテンツ） */
.stores-map-info {
    box-sizing: border-box;
    min-width: 240px;
    max-width: 300px;
    padding: 14px 40px 14px 16px;
    font-family: 'Noto Sans JP', sans-serif;
}

.stores-map-info__name {
    margin: 0 0 8px;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.4;
    color: #111;
}

.stores-map-info__location,
.stores-map-info__station {
    margin: 0 0 6px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #444;
}

.stores-map-info__link {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #2d9f4e;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.stores-map-info__link:focus,
.stores-map-info__link:active {
    outline: none;
}

@media (hover: hover) and (pointer: fine) {
    .stores-map-info__link:hover {
        text-decoration: underline;
    }
}

/* Google Maps InfoWindow の余白・閉じるボタン調整 */
.stores-map-page .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

.stores-map-page .gm-style-iw-chr {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
}

.stores-map-page .gm-style-iw-ch {
    padding-top: 0 !important;
    max-height: none !important;
}

.stores-map-page .gm-style-iw-d {
    overflow: visible !important;
    max-height: none !important;
}

.stores-map-page .gm-ui-hover-effect {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    opacity: 0.7 !important;
}

.stores-map-page .gm-ui-hover-effect > span {
    margin: 0 !important;
}

@media (min-width: 768px) {
    .stores-map-page__map {
        height: min(68vh, 720px);
    }

    .stores-map-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
