/*
 * Cross Border Report Plugin - Frontend Styles
 * ThinkPHP 8 + Amaze UI
 */

/* ====== Report Cards ====== */
.report-card {
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.report-card:hover {
    transform: translateY(-4px);
}

.report-card-image {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
    width: 100%;
}

.report-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.report-card:hover .report-card-image img {
    transform: scale(1.05);
}

.report-badge {
    position: absolute;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    z-index: 10;
}

.report-badge-top {
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.report-badge-recommend {
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #3498db, #2980b9);
}

/* ====== Filter Tags ====== */
.report-filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.report-filter-tags .am-btn {
    margin: 0;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
    color: #666;
    white-space: nowrap;
    transition: all 0.3s ease;
    cursor: pointer;
}

.report-filter-tags .am-btn:hover {
    border-color: #3498db;
    color: #3498db;
    background: #f0f7ff;
}

.report-filter-tags .am-btn.active,
.report-filter-tags .am-btn:active {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* ====== Search Section ====== */
.report-search-section {
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.report-search-section .am-input-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.report-search-section .am-input-group input {
    flex: 1;
    min-width: 150px;
}

.report-search-section .sort-select {
    min-width: 120px;
}

.report-search-section .am-btn {
    white-space: nowrap;
}

/* ====== Pagination ====== */
.report-pagination {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.report-pagination .am-pagination {
    margin: 0;
}

.report-pagination .am-pagination a,
.report-pagination .am-pagination span {
    padding: 6px 10px;
    font-size: 13px;
}

/* ====== Detail Page ====== */
.report-detail-breadcrumb {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #3498db;
    margin-bottom: 20px;
    font-size: 12px;
}

.report-detail-breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.report-detail-breadcrumb a:hover {
    text-decoration: underline;
}

.report-detail-header {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}

.report-detail-title {
    font-size: 26px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.report-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: #999;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.report-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.report-detail-meta i {
    color: #bbb;
}

.report-detail-cover {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    max-width: 100%;
}

.report-detail-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.report-detail-desc {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 25px;
    line-height: 1.8;
    color: #666;
}

.report-detail-desc h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.report-detail-desc p {
    margin: 0;
}

/* ====== Download Button ====== */
.report-download-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    text-align: center;
    text-decoration: none;
}

.report-download-btn:hover {
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.3);
    transform: translateY(-2px);
}

.report-download-btn:active {
    transform: translateY(0);
}

.report-download-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* ====== Info Boxes ====== */
.report-info-box {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 15px;
    text-align: center;
}

.report-info-title {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.report-info-value {
    font-size: 20px;
    color: #3498db;
    font-weight: 600;
}

/* ====== Category List ====== */
.report-category-list {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.report-category-list-title,
.report-related-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.report-category-list a {
    display: block;
    padding: 8px 0;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.report-category-list a:last-child {
    border-bottom: none;
}

.report-category-list a:hover {
    color: #3498db;
    padding-left: 5px;
}

/* ====== Related Reports ====== */
.report-related-item {
    display: block;
    padding: 10px 0;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-related-item:last-child {
    border-bottom: none;
}

.report-related-item:hover {
    color: #3498db;
    padding-left: 5px;
}

/* ====== Tags ====== */
.report-detail-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-detail-tag {
    display: inline-block;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #666;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.report-detail-tag:hover {
    border-color: #3498db;
    color: #3498db;
    background: #f0f7ff;
}

/* ====== Responsive Adjustments ====== */
@media (max-width: 768px) {
    .report-detail-breadcrumb {
        font-size: 11px;
    }
    
    .report-detail-title {
        font-size: 20px;
    }
    
    .report-detail-meta {
        gap: 10px;
        font-size: 11px;
    }
    
    .report-detail-header,
    .report-detail-desc {
        padding: 15px;
    }
    
    .report-download-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .report-search-section .am-input-group {
        flex-direction: column;
        gap: 6px;
    }
    
    .report-search-section .am-input-group input,
    .report-search-section .sort-select {
        min-width: 100%;
    }
}

@media (max-width: 640px) {
    .report-detail-title {
        font-size: 18px;
    }
    
    .report-detail-meta {
        font-size: 10px;
    }
    
    .report-filter-tags {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px;
    }
    
    .report-filter-tags .am-btn {
        padding: 4px 12px;
        font-size: 12px;
    }
    
    .report-info-value {
        font-size: 18px;
    }
}

/* ====== Print Styles ====== */
@media print {
    .report-download-btn,
    .report-filter-tags,
    .report-search-section,
    .report-pagination,
    .report-detail-sidebar {
        display: none;
    }
    
    .report-detail-main {
        flex: 1;
        width: 100%;
    }
}

/* ====== Accessibility ====== */
.report-card:focus-visible,
.report-detail-tag:focus-visible,
.report-download-btn:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* ====== Loading State ====== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.report-download-btn.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}
