/**
 * Orbital Diagram Styles
 * Well-Being Cards Section
 *
 * @package Yicheng_Commonweal
 */

/* Exact gradient styles */
.gradient-belief {
    background: linear-gradient(135deg, #84A3E9 0%, #DFFEE6 100%);
}

.gradient-citizen {
    background: linear-gradient(135deg, #80F1A6 0%, #EFD000 100%);
}

.gradient-education {
    background: linear-gradient(82.84deg, #4ACF8C 0%, #75EDA6 100%);
}

.gradient-morality {
    background: linear-gradient(135deg, #7EAEFF 0%, #FCA6E9 100%);
}

.gradient-commerce {
    background: linear-gradient(135deg, #FF5F6D 0%, #FFC371 100%);
}

.gradient-social {
    background: linear-gradient(135deg, #B65FC4 0%, #DB6E4E 100%);
}

.gradient-enterprise {
    background: linear-gradient(135deg, #A1FF8B 0%, #3F93FF 100%);
}

.gradient-economy {
    background: linear-gradient(225.4deg, #FEDC2A 0%, #DD5789 51.42%, #7A2C9E 100%);
}

.gradient-nation {
    background: linear-gradient(135deg, #FBDA61 0%, #F76B1C 100%);
}

/* Thin orbital lines */
.orbit-line {
    stroke: #667f98;
    stroke-width: 1.5;
    fill: none;
    opacity: 0.4;
}

/* Node styling */
.node {
    position: absolute;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.node-circle {
    box-shadow: 0px 0.6px 1.8px 0px rgba(0, 0, 0, 0.16);
    width: 60px;
    height: 60px;
    aspect-ratio: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
    position: relative;
}

.node:hover .node-circle {
    transform: scale(1.1);
    box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

/* Center circle */
.center-circle {
    width: 60px;
    height: 60px;
    border: 1.5px solid #667f98;
}

/* Text styling */
.node-label {
    color: rgba(26, 25, 30, 0.50);
    font-size: 10.8px;
    font-weight: 500;
    letter-spacing: -0.6px;
    line-height: 16.8px;
}

/* Tooltip styling - Black overlay */
.tooltip {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: normal;
    pointer-events: none;
}

.tooltip p {
    word-wrap: break-word;
    hyphens: auto;
}

/* Container aspect ratio */
.diagram-container {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 800 / 600;
    position: relative;
    margin: 0 auto;
    overflow: visible;
}

/* Ensure nodes container doesn't clip tooltips */
#nodes-container {
    overflow: visible !important;
}

/* Highlight effect */
.orbit-highlight {
    stroke: #3B82F6;
    opacity: 0.7;
    stroke-width: 2;
}

/* Pause animation on hover */
.paused {
    animation-play-state: paused !important;
}

/* Mobile view styles */
.mobile-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 600px;
}

.mobile-card {
    padding: 1.5rem 1rem;
    border-radius: 12px;
    box-shadow: 0px 0.6px 1.8px 0px rgba(0, 0, 0, 0.16);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mobile-card:active {
    transform: scale(0.98);
    box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.2);
}

.mobile-card-title {
    color: rgba(26, 25, 30, 0.80);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.3px;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.mobile-card-content {
    color: rgba(26, 25, 30, 0.60);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.2px;
}

/* Hide desktop view on mobile */
@media (max-width: 767px) {
    .desktop-orbital-view {
        display: none !important;
    }
}

/* Hide mobile view on md and above */
@media (min-width: 768px) {
    .mobile-cards-view {
        display: none !important;
    }
}
