/* 楽天トラベルマップ - スタイルシート */

/* コンテナ */
.rakuten-travel-map-container {
    width: 100%;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 楽天クレジット表記（最下部） */
.rakuten-credit-bottom {
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    background: transparent;
    border-top: 1px solid #e0e0e0;
}

.rakuten-credit-bottom a {
    color: #999;
    text-decoration: none;
    font-size: 11px;
    font-weight: normal;
    transition: color 0.3s;
}

.rakuten-credit-bottom a:hover {
    color: #bf0000;
    text-decoration: none;
}

/* 検索結果情報 */
.search-results-info {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.results-icon {
    font-size: 24px;
}

.results-text {
    color: #0c4a6e;
    font-size: 16px;
}

.results-text strong {
    color: #0369a1;
    font-size: 20px;
}

.results-instruction {
    color: #64748b;
    font-size: 14px;
    font-style: italic;
    margin-left: auto;
}

@media (max-width: 768px) {
    .results-instruction {
        margin-left: 0;
        width: 100%;
    }
}

/* 地図 */
.rakuten-map {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: relative;
}

/* 地図の中心マーカー（検索位置の目印） */
.center-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1000;
}

.center-marker-horizontal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 2px;
    background: #bf0000;
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.center-marker-vertical {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: #bf0000;
    box-shadow: 0 0 3px rgba(0,0,0,0.5);
}

.center-marker-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #bf0000;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

/* 検索パネル（地図の上） */
.rakuten-search-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
}

.rakuten-search-panel h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #333;
    border-bottom: 3px solid #bf0000;
    padding-bottom: 10px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.form-hint {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
    font-style: italic;
}

.form-hint-center {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 12px;
    font-style: italic;
    padding: 8px;
    background: #f0f8ff;
    border-radius: 4px;
    border-left: 3px solid #4a90e2;
}

.search-input,
.search-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-input:focus,
.search-select:focus {
    outline: none;
    border-color: #bf0000;
    box-shadow: 0 0 0 3px rgba(191,0,0,0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ボタングループ */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* ボタン */
.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #bf0000;
    color: white;
}

.btn-primary:hover {
    background: #a00000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(191,0,0,0.3);
}

.btn-secondary {
    background: #4a90e2;
    color: white;
}

.btn-secondary:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74,144,226,0.3);
}

/* ホテル詳細エリア（地図の下） */
.hotel-details-area {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    /* max-heightとoverflowを削除 - 全て表示 */
}

.hotel-details-area.hidden {
    display: none;
}

.details-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #bf0000;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.details-close:hover {
    background: #a00000;
    transform: scale(1.1);
}

.hotel-details {
    padding-top: 20px;
}

.hotel-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto 20px;
    display: block;
}

.hotel-name {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.hotel-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stars {
    color: #ffa500;
    font-size: 20px;
}

.review-count {
    color: #666;
    font-size: 14px;
}

.hotel-price {
    font-size: 32px;
    color: #bf0000;
    font-weight: bold;
    margin-bottom: 5px;
}

.hotel-price-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* ホテル情報をグリッドレイアウトで表示 */
.hotel-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.hotel-info-section {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #bf0000;
}

.hotel-info-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hotel-info-content {
    color: #666;
    line-height: 1.8;
    font-size: 14px;
}

.hotel-address {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hotel-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.amenity-tag {
    background: #e8f4f8;
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 13px;
    color: #2c5f7c;
    border: 1px solid #d0e8f0;
}

/* アフィリエイトリンク（最上部・大） */
.hotel-links-top {
    margin-bottom: 20px;
}

.affiliate-link-large {
    display: block;
    padding: 20px 30px;
    background: linear-gradient(135deg, #bf0000 0%, #ff6b00 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 20px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(191,0,0,0.4);
    border: 3px solid #fff;
}

.affiliate-link-large:hover {
    background: linear-gradient(135deg, #a00000 0%, #ff8800 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(191,0,0,0.6);
    color: white;
}

/* アフィリエイトリンク */
.hotel-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.affiliate-link {
    display: block;
    padding: 15px 20px;
    background: #bf0000;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
}

.affiliate-link:hover {
    background: #a00000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(191,0,0,0.3);
    color: white;
}

.plan-link {
    display: block;
    padding: 15px 20px;
    background: #4a90e2;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
}

.plan-link:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74,144,226,0.3);
    color: white;
}

/* Leaflet カスタムピンマーカー */
.custom-hotel-marker {
    background: transparent !important;
    border: none !important;
}

.hotel-pin {
    position: relative;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pin-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #bf0000;
    border: 3px solid white;
    border-radius: 50% 50% 50% 0;
    transform: translateX(-50%) rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
}

.pin-head::before {
    content: '🏨';
    transform: rotate(45deg);
    font-size: 20px;
}

.pin-point {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #bf0000;
}

/* ホバー効果 */
.hotel-pin:hover .pin-head {
    transform: translateX(-50%) rotate(-45deg) scale(1.2);
    box-shadow: 0 5px 15px rgba(191,0,0,0.5);
}

.hotel-pin:hover {
    z-index: 1000 !important;
}

/* アクティブ（クリックされた）状態 */
.custom-hotel-marker.active .pin-head {
    background: #ff6b00;
    transform: translateX(-50%) rotate(-45deg) scale(1.3);
    box-shadow: 0 5px 20px rgba(255,107,0,0.6);
    animation: pulse 1.5s infinite;
}

.custom-hotel-marker.active .pin-point {
    border-top-color: #ff6b00;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) rotate(-45deg) scale(1.3);
    }
    50% {
        transform: translateX(-50%) rotate(-45deg) scale(1.4);
    }
}

/* 古いマーカースタイル（念のため残す） */
.hotel-marker {
    background: #bf0000;
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.hotel-marker:hover {
    transform: scale(1.2);
    z-index: 1000;
}

/* Leaflet ツールチップのカスタマイズ */
.leaflet-tooltip {
    background: white;
    border: 2px solid #bf0000;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    padding: 8px 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.leaflet-tooltip-top:before {
    border-top-color: #bf0000;
}

/* ポップアップのスタイル */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.popup-hotel-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.popup-hotel-price {
    color: #bf0000;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.popup-view-details {
    display: inline-block;
    padding: 8px 16px;
    background: #bf0000;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s;
}

.popup-view-details:hover {
    background: #a00000;
}

/* ローディング表示 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #bf0000;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* エラーメッセージ */
.rakuten-map-error {
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .hotel-info-grid {
        grid-template-columns: 1fr;
    }
    
    .hotel-links {
        grid-template-columns: 1fr;
    }
    
    .hotel-name {
        font-size: 22px;
    }
    
    .hotel-price {
        font-size: 26px;
    }
}

/* 管理画面用スタイル */
.rakuten-travel-map-admin .notice {
    margin: 20px 0;
}

.rakuten-travel-map-admin code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}
