/**
 * WP Category 3D - Styles
 */

.wp-category-3d-container {
    position: relative;
    display: flex;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: #1a1a2e;
}

/* Left panel - 3D Canvas */
.wp-category-3d-left-panel {
    position: relative;
    flex: 1 1 auto;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wp-category-3d-canvas-wrapper {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.wp-category-3d-canvas-wrapper canvas {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.wp-category-3d-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 40px;
    border-radius: 8px;
}

/* Resizer */
.wp-category-3d-resizer {
    width: 6px;
    background: #0f3460;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}

.wp-category-3d-resizer:hover {
    background: #e94560;
}

.wp-category-3d-resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 1px;
}

/* Right panel - Sidebar */
.wp-category-3d-right-panel {
    position: relative;
    flex: 0 0 400px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wp-category-3d-sidebar {
    width: 100%;
    height: 100%;
    background: #16213e;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wp-category-3d-sidebar-header {
    padding: 20px;
    background: #0f3460;
    border-bottom: 2px solid #e94560;
    flex-shrink: 0;
}

.wp-category-3d-sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.wp-category-3d-sidebar-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.wp-category-3d-sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.wp-category-3d-sidebar-content::-webkit-scrollbar-track {
    background: #0f3460;
}

.wp-category-3d-sidebar-content::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 4px;
}

.wp-category-3d-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #ff5577;
}

.category-info {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-info h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: #e94560;
}

.category-description {
    color: #b8c1cc;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
}

.category-count {
    color: #4ecdc4;
    font-size: 14px;
    font-weight: 600;
    margin: 10px 0 0 0;
}

.wp-category-3d-spinner {
    text-align: center;
    padding: 40px;
    color: #4ecdc4;
    font-size: 16px;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-item {
    background: #0f3460;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.post-thumbnail {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #1a1a2e;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 15px;
}

.post-content h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.post-content h4 a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;
}

.post-content h4 a:hover {
    color: #e94560;
}

.post-date {
    color: #4ecdc4;
    font-size: 12px;
    margin: 0 0 10px 0;
}

.post-excerpt {
    color: #b8c1cc;
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0 0 0;
}

/* Category labels in 3D space */
.category-label {
    pointer-events: none;
    user-select: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .wp-category-3d-container {
        flex-direction: column;
    }

    .wp-category-3d-left-panel {
        min-height: 300px;
        height: 50%;
    }

    .wp-category-3d-resizer {
        display: none;
    }

    .wp-category-3d-right-panel {
        width: 100%;
        min-width: 100%;
        height: 50%;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.wp-category-3d-loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Full-width mode - width and margins are set by JavaScript */
.wp-category-3d-fullwidth {
    max-width: none;
    box-sizing: border-box;
}
