/**
 * 地點詳細頁面樣式
 * /public/place/assets/css/place-detail.css
 *
 * @version 1.1
 * @date 2025-12-08
 * 字體大小已轉換為 rem (基準: 18px = 1rem)
 */

/* 平滑滾動 */
html {
    scroll-behavior: smooth;
}

/* ============================================
   Page Layout
   ============================================ */
.place-detail-page {
    background: #f5f5f5;
    min-height: calc(100vh - 60px);
    padding-bottom: 80px;
}

.place-detail-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    overflow: hidden;
}

/* ============================================
   Navigation
   ============================================ */
.place-detail-nav {
    padding: 16px;
    background: white;
    border-bottom: 1px solid #eee;
    align-items: center;
    display: flex;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #666;
    text-decoration: none;
    font-size: 0.778rem; /* 14px */
    transition: color 0.2s;
}

.back-btn:hover {
    color: #F5A623;
}

.back-btn .material-icons {
    font-size: 1.111rem; /* 20px */
}

/* ============================================
   Photo Section
   ============================================ */
.detail-photo-section {
    position: relative;
    background: #f0f0f0;
}

.detail-photo-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
}

.detail-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: #999;
}

.detail-photo-placeholder .material-icons {
    font-size: 2.667rem; /* 48px */
    margin-bottom: 8px;
}

/* Map Fallback (when no photos) */
.detail-photo-map-fallback {
    width: 100%;
    height: 300px;
    background: #f0f0f0;
}

.detail-photo-map-fallback iframe {
    width: 100%;
    height: 100%;
}

.detail-photo-dots {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    padding: 0;
    margin: 0;
}

.detail-photo-dots > * > * {
    background: rgba(255, 255, 255, 0.7);
}

.detail-photo-dots > .uk-active > * {
    background: white;
}

/* Rating Overlay */
.detail-rating-overlay {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 20px;
    color: white;
}

.detail-rating-overlay .rating-number {
    font-size: 1rem; /* 18px */
    font-weight: 600;
}

.detail-rating-overlay .rating-stars {
    color: #FFD700;
    font-size: 0.778rem; /* 14px */
}

.detail-rating-overlay .rating-count {
    font-size: 0.667rem; /* 12px */
    color: rgba(255, 255, 255, 0.8);
}

/* Tags Overlay */
.detail-tags-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.667rem; /* 12px */
    font-weight: 500;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.detail-tag.primary {
    background: #F5A623;
    color: white;
}

/* ============================================
   單頁專用：地點名稱突出顯示
   (已移除獨立 h1 標題，改用資訊列表第一項)
   ============================================ */
.detail-info-list .detail-info-item:first-child {
    padding: 16px 0;
    border-bottom: 2px solid #F5A623;
}

.detail-info-list .detail-info-item:first-child .info-label {
    display: none;
}

.detail-info-list .detail-info-item:first-child .place-name-row>span:first-child {
    font-size: 1.1rem;
}

/* ============================================
   Actions
   ============================================ */
.detail-actions {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.detail-actions .action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
    height: 60px;
    padding: 8px 4px;
    border: none;
    background: #f5f5f5;
    border-radius: 12px;
    color: #333;
    font-size: 0.611rem; /* 11px */
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.detail-actions .action-btn:hover {
    background: #F5A623;
    color: white;
}

.detail-actions .action-btn .material-icons {
    font-size: 1.222rem; /* 22px */
}

.detail-actions .action-btn span:last-child {
    white-space: nowrap;
}

.detail-actions .action-btn.active {
    color: #F5A623;
}

.detail-actions .action-btn.active .material-icons {
    color: #F5A623;
}

/* Toast 通知 */
.places-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 0.778rem; /* 14px */
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.places-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Modal 圓角 */
.uk-modal-dialog {
    border-radius: 16px;
    overflow: hidden;
}

/* 收藏分類選擇器 */
.favorite-category-select {
    text-align: center;
}

.category-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.category-option {
    padding: 10px 18px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    font-size: 0.778rem; /* 14px */
    cursor: pointer;
    transition: all 0.2s;
}

.category-option:hover,
.category-option.active {
    background: #F5A623;
    color: white;
    border-color: #F5A623;
}

/* ============================================
   Info List
   ============================================ */
.detail-info-list {
    padding: 16px;
}

.detail-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-info-item:last-child {
    border-bottom: none;
}

.detail-info-item .info-icon {
    color: #F5A623;
    font-size: 1.333rem; /* 24px */
    flex-shrink: 0;
}

.detail-info-item .info-content {
    flex: 1;
}

.detail-info-item .info-label {
    font-size: 0.667rem; /* 12px */
    color: #999;
    margin-bottom: 2px;
}

.detail-info-item .info-value {
    font-size: 0.833rem; /* 15px */
    color: #333;
}

.detail-info-item .info-value a {
    color: #F5A623;
    text-decoration: none;
}

.detail-info-item .info-value a:hover {
    text-decoration: underline;
}

/* ============================================
   Sections
   ============================================ */
.detail-section {
    padding: 16px;
    border-top: 8px solid #f5f5f5;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.section-header .material-icons {
    color: #F5A623;
    font-size: 1.333rem; /* 24px */
}

.section-title {
    font-size: 1rem; /* 18px */
    font-weight: 600;
    color: #333;
}

/* ============================================
   Hours
   ============================================ */
.hours-list-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 12px 16px;
}

.hours-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.hours-row:last-child {
    border-bottom: none;
}

.hours-row .day {
    font-weight: 500;
    color: #333;
}

.hours-row .time {
    color: #666;
}

/* ============================================
   AI Guide
   ============================================ */
.guide-summary {
    font-size: 0.778rem; /* 14px */
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.guide-score {
    margin-left: auto;
    font-size: 0.778rem; /* 14px */
}

.guide-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.guide-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.722rem; /* 13px */
    background: #f0f0f0;
    color: #666;
}

.guide-tag.positive {
    background: #e8f5e9;
    color: #2e7d32;
}

.guide-tag .material-icons {
    font-size: 0.889rem; /* 16px */
}

.guide-tips {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: #fff8e1;
    border-radius: 8px;
    color: #f57c00;
    font-size: 0.778rem; /* 14px */
}

.guide-tips .material-icons {
    font-size: 1.111rem; /* 20px */
    flex-shrink: 0;
}

/* Guide text formatting */
.guide-yes {
    color: #2e7d32;
    font-weight: 600;
}

.guide-no {
    color: #c62828;
    font-weight: 600;
}

.guide-uncertain {
    color: #f57c00;
    font-weight: 600;
}

/* ============================================
   Reviews
   ============================================ */
.reviews-summary-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
}

.summary-rating .big-number {
    font-size: 2.667rem; /* 48px */
    font-weight: 700;
    color: #333;
}

.summary-stars {
    color: #FFD700;
    font-size: 1.333rem; /* 24px */
    margin: 4px 0;
}

.summary-count {
    font-size: 0.778rem; /* 14px */
    color: #999;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-item {
    padding: 16px;
    background: #f9f9f9;
    border-radius: 12px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reviewer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initial {
    font-size: 1rem; /* 18px */
    font-weight: 600;
    color: #666;
}

.reviewer-info {
    flex: 1;
}

.reviewer-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.reviewer-stars {
    color: #FFD700;
    font-size: 0.667rem; /* 12px */
}

.review-time {
    font-size: 0.667rem; /* 12px */
    color: #999;
}

.review-text {
    font-size: 0.778rem; /* 14px */
    color: #555;
    line-height: 1.6;
}

/* ============================================
   Nearby
   ============================================ */
.nearby-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nearby-item {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nearby-item:hover {
    transform: translateY(-2px);
}

.nearby-photo {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.nearby-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nearby-photo .material-icons {
    font-size: 1.556rem; /* 28px */
    color: #999;
}

.nearby-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nearby-name {
    font-weight: 500;
    font-size: 0.778rem; /* 14px */
    color: #333;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nearby-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.667rem; /* 12px */
    color: #888;
}

.nearby-meta .rating {
    color: #F5A623;
}

.nearby-meta .distance {
    color: #666;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .place-detail-page {
        padding-bottom: calc(56px + 16px);
    }

    .place-detail-container {
        max-width: 100%;
        box-shadow: none;
    }

    .detail-photo-img {
        height: 380px;
    }

    .detail-title {
        font-size: 1.111rem; /* 20px */
    }

    /* 操作按鈕統一大小 */
    .detail-actions .action-btn {
        width: 54px;
        height: 54px;
        padding: 6px 4px;
        font-size: 0.556rem; /* 10px */
    }

    .detail-actions .action-btn .material-icons {
        font-size: 1.111rem; /* 20px */
    }

    .nearby-list {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .detail-photo-img {
        height: 380px;
    }

    .nearby-list {
        grid-template-columns: 1fr;
    }

    .nearby-item {
        flex-direction: row;
    }

    .nearby-photo {
        width: 80px;
        height: 80px;
    }

    .nearby-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* ============================================
   User Guides Section
   (主要樣式已移至 place-content.php 共用)
   這裡只保留單頁特定的覆蓋樣式
   ============================================ */

/* 單頁專用：user guide card 的陰影效果 */
.user-guide-card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* 單頁專用：guide summary card 的陰影效果 */
.guide-summary-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
