/* 寵物詳細資訊頁面樣式 */
.pet-detail-container {
    background-color: #f8f9fa;
    padding: 40px 0;
    min-height: 100vh;
}

.back-button {
    margin-bottom: 30px;
}

.main-pet-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.pet-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.pet-image-bg {
    display: none; /* 預設隱藏，由 JavaScript 控制 */
}

.main-pet-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    z-index: 2;
    transition: opacity 0.3s ease;
}


/* 圖片切換按鈕 */
.image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    color: #004767;
    font-size: 1.2rem;
}

    .image-nav-btn:hover {
        background: rgba(255, 255, 255, 1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        transform: translateY(-50%) scale(1.1);
    }

    .image-nav-btn:active {
        transform: translateY(-50%) scale(0.95);
    }

.image-nav-prev {
    left: 15px;
}

.image-nav-next {
    right: 15px;
}

/* 圖片指示器 */
.image-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.pet-basic-info {
    padding: 25px;
    text-align: left;
}

.pet-name-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pet-name {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
}

.pet-description {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: left;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #d4edda;
    color: #155724;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

    .status-badge i {
        color: #28a745;
    }

.attribute-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px;
    background-color: #f8f9fa;
}

.attribute-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    justify-content: center;
    text-align: center;
}

    .attribute-card i {
        font-size: 1.5rem;
        color: #004767;
        flex-shrink: 0;
    }

.attribute-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attribute-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.attribute-value {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.recommended-pets {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

    .recommended-pets h4 {
        font-size: 1.3rem;
        font-weight: bold;
        padding: 0 0 15px;
    }

.section-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: white;
    margin: 0;
    padding: 15px 20px;
    background-color: #004767;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .section-title i {
        color: white;
    }

.recommended-pet-list {
    margin-bottom: 20px;
}

.recommended-pet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    flex: 1;
    text-align: center;
}

    .recommended-pet-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.recommended-pet-image {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.recommended-pet-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

    .recommended-pet-info h5 {
        margin: 0;
        color: #2c3e50;
        font-size: 1rem;
        font-weight: 600;
        text-align: center;
    }

.match-percentage {
    color: #6c757d;
    font-size: 0.9rem;
    text-align: center;
}

.info-section {
    background: white;
    border-radius: 18px;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    padding: 30px;
}

    .info-grid.three-columns {
        grid-template-columns: 1fr 1fr 1fr;
    }

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-available {
    color: #28a745;
}

    .status-available i {
        color: #28a745;
    }

.description-box {
    background-color: #f8f9fa;
    padding: 20px 30px 30px 30px;
}

    .description-box p {
        margin: 0;
        line-height: 1.6;
        color: #495057;
    }

.shelter-info {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
}

.shelter-details h5 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.shelter-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 20px;
}

.contact-info {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.contact-item {
    margin-bottom: 10px;
    color: #495057;
}

    .contact-item i {
        color: #c41818;
    }

    .contact-item:last-child i {
        color: #379000;
        width: 20px;
    }

.adoption-notice {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    background-color: white;
}

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

    .adoption-notice-header i {
        color: #004767;
        font-size: 1rem;
    }

.adoption-notice-content {
    color: #004767;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

    .action-buttons .btn {
        flex: 1;
        min-width: 120px;
    }

    .action-buttons .full-width {
        flex: 100%;
        margin-top: 10px;
    }

/* 響應式設計 */
@media (max-width: 992px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

        .info-grid.three-columns {
            grid-template-columns: 1fr;
        }

    .attribute-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pet-detail-container {
        padding: 20px 0;
    }

    .main-pet-card,
    .info-section,
    .recommended-pets {
        margin-bottom: 20px;
    }

    .action-buttons {
        flex-direction: column;
    }

        .action-buttons .btn {
            flex: none;
            width: 100%;
        }

    .pet-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .info-section {
        padding: 20px;
    }

    .pet-basic-info {
        padding: 20px;
    }

    .recommended-pets {
        padding: 20px;
    }
}

/* 配對分數雷達圖樣式 */
.matching-radar-chart {
    margin-bottom: 30px;
}

.radar-chart-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 10px 0 10px;
}

.radar-chart-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
}

    .radar-chart-title i {
        color: #004767;
    }

#radarChartContainer {
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 768px) {
    .matching-radar-chart {
        margin-bottom: 20px;
    }

    .radar-chart-card {
        padding: 15px 5px 0 5px;
    }

    #radarChartContainer {
        min-height: auto;
    }
}

/* 影音資訊樣式 */
.video-content {
    padding: 30px;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 寬高比 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

.no-video-message {
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

    .no-video-message i {
        font-size: 3rem;
        color: #dee2e6;
        margin-bottom: 15px;
        display: block;
    }

    .no-video-message p {
        font-size: 1.1rem;
        margin: 0;
        color: #6c757d;
    }

@media (max-width: 768px) {
    .video-content {
        padding: 20px;
    }

    .no-video-message {
        padding: 40px 20px;
    }

        .no-video-message i {
            font-size: 2rem;
        }
}