/**
 * Page Categories Styles
 * 
 * Custom styles for the page categories display
 * @package finview
 */

.page-categories-wrapper {
    margin: 30px 0;
    padding: 20px;
}

.page-categories-header {
    margin-bottom: 25px;
}

.page-categories-header .categories-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.page-categories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.category-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.category-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.category-content .category-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-content .category-name a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.category-content .category-name a:hover {
    color: #3498db;
}

.category-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.category-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #999;
}

.category-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.no-categories-message {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .page-categories-list {
        grid-template-columns: 1fr;
    }

    .page-categories-header .categories-title {
        font-size: 24px;
    }
}

/* Category Relationships Styles */
.category-relationships-wrapper {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.category-relationships-header {
    margin-bottom: 30px;
    text-align: center;
}

.category-relationships-header .relationships-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.category-relationships-header .relationships-description {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.category-relationships-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.relationship-item {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.relationship-item:hover {
    border-color: #3498db;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.15);
}

.relationship-item.no-relationship {
    border-color: #f0f0f0;
}

.relationship-content {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.page-category-section,
.post-categories-section {
    flex: 1;
    min-width: 200px;
}

.section-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.category-badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-category-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.post-category-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
    margin: 5px;
}

.post-categories-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-badge-link {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.category-badge-link:hover {
    transform: translateY(-2px);
}

.category-badge-link.category-not-found {
    cursor: not-allowed;
    opacity: 0.6;
}

.category-badge-link.category-not-found:hover {
    transform: none;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-badge-link:hover .category-badge {
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.5);
}

.category-badge-link.category-not-found .category-badge {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: 0 4px 12px rgba(127, 140, 141, 0.3);
}

.external-link-icon,
.warning-icon {
    flex-shrink: 0;
    opacity: 0.9;
}

.category-badge-link:hover .external-link-icon {
    opacity: 1;
    animation: bounce-icon 0.6s ease;
}

@keyframes bounce-icon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.relationship-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3498db;
    font-size: 24px;
    flex-shrink: 0;
}

.relationship-arrow svg {
    width: 40px;
    height: 40px;
}

.no-relationship-message,
.no-relationships-message {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 15px;
    font-style: italic;
    margin: 10px 0 0 0;
}

/* Responsive styles for relationships */
@media (max-width: 768px) {
    .relationship-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .relationship-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }

    .page-category-section,
    .post-categories-section {
        width: 100%;
    }

    .category-relationships-header .relationships-title {
        font-size: 24px;
    }
}

/* Simple Mode Styles */
.relationship-content.simple-mode {
    display: block;
}

.post-categories-badges-simple {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Hide header if empty */
.category-relationships-wrapper:has(.category-relationships-header:empty) .category-relationships-header {
    display: none;
}