/* ============================================
   PHASE 5 CULTURE COMPLETE FIX
   CENTERED LAYOUT + READABLE TEXT
   ============================================ */

/* ===================================
   MAIN CONTAINER - CENTERED CONTENT
   =================================== */

/* Card container for culture section */
.card {
    max-width: 1200px !important;
    margin: 0 auto 24px auto !important;
    padding: 24px !important;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.card-title {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: #003d73 !important;
    margin: 0 0 20px 0 !important;
}

/* ===================================
   CULTURE STATE TRACKER - CENTERED
   =================================== */

.state-diagram {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important; /* CENTER ALL STATES */
    align-items: center !important;
    gap: 16px !important;
    padding: 32px !important;
    background-color: #f5f5f5 !important;
    border-radius: 8px !important;
    margin: 0 auto 24px auto !important;
    max-width: 100% !important;
}

/* State boxes: COMPACT + LEFT-ALIGNED */
.state-node {
    background-color: white !important;
    border: 3px solid #ddd !important;
    border-radius: 8px !important;
    padding: 14px !important;
    width: 200px !important; /* INCREASED from 160px */
    min-width: 200px !important;
    max-width: 200px !important;
    height: 100px !important; /* INCREASED from 80px */
    min-height: 100px !important;
    max-height: 100px !important;
    text-align: left !important; /* LEFT ALIGNED */
    transition: all 0.3s !important;
    cursor: pointer !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important; /* LEFT ALIGN CONTENT */
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    overflow: hidden !important; /* Prevent text overflow */
}

.state-node:hover {
    border-color: #0066cc !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}

.state-node.active {
    border-color: #4caf50 !important;
    border-width: 4px !important;
    background-color: #4caf50 !important; /* GREEN BACKGROUND */
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.4) !important;
    transform: scale(1.05) !important;
}

/* WHITE TEXT on active state */
.state-node.active .state-name {
    color: white !important;
}

.state-node.active .state-desc {
    color: white !important;
}

.state-node.state-failure {
    border-color: #f44336 !important;
}

.state-node.state-failure.active {
    background-color: #f44336 !important; /* RED BACKGROUND */
    border-width: 4px !important;
}

/* WHITE TEXT on failure active state */
.state-node.state-failure.active .state-name {
    color: white !important;
}

.state-node.state-failure.active .state-desc {
    color: white !important;
}

/* State badge - LEFT-ALIGNED */
.state-number {
    display: inline-block !important;
    background-color: #0066cc !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
    text-align: center !important; /* Badge text centered within badge */
    align-self: flex-start !important; /* Badge aligned to left */
}

.state-node.active .state-number {
    background-color: white !important; /* WHITE BADGE on green background */
    color: #4caf50 !important; /* GREEN TEXT */
}

.state-node.state-failure .state-number {
    background-color: #f44336 !important;
}

.state-node.state-failure.active .state-number {
    background-color: white !important; /* WHITE BADGE on red background */
    color: #f44336 !important; /* RED TEXT */
}

/* State title - BOLD & CENTERED */
.state-name {
    font-size: 13px !important; /* Increased for larger box */
    font-weight: 700 !important;
    color: #003d73 !important;
    margin-bottom: 4px !important;
    line-height: 1.3 !important;
    text-align: center !important; /* EXPLICIT CENTER */
    width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

/* State description - CLEAR & CENTERED */
.state-desc {
    font-size: 11px !important; /* Increased for larger box */
    color: #555 !important;
    line-height: 1.4 !important;
    font-weight: 500 !important;
    text-align: center !important; /* EXPLICIT CENTER */
    width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: normal !important; /* Allow wrapping in larger box */
}

/* Arrows - VISIBLE */
.state-arrow {
    font-size: 28px !important;
    color: #666 !important;
    font-weight: 700 !important;
    width: 30px !important;
    height: 100px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.state-arrow-branch {
    width: 100% !important;
    text-align: center !important;
    font-size: 28px !important;
    color: #f44336 !important;
    font-weight: 700 !important;
    margin: 8px 0 !important;
}

/* Active indicator */
.state-node.active::before {
    content: '▶' !important;
    display: block !important;
    font-size: 14px !important;
    color: #4caf50 !important;
    margin-bottom: 4px !important;
}

/* ===================================
   SELECTOR LIST - LEFT ALIGNED + UNIFORM
   =================================== */

.radio-group {
    max-width: 800px !important;
    margin: 0 !important; /* LEFT ALIGNED - NOT CENTERED */
    margin-bottom: 24px !important;
}

.radio-option {
    min-height: 110px !important; /* Increased from 90px */
    padding: 20px !important; /* Increased from 18px */
    align-items: flex-start !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    background-color: white !important;
    display: flex !important;
    gap: 16px !important; /* Increased from 14px */
    margin-bottom: 14px !important; /* Increased from 12px */
    transition: all 0.2s !important;
    width: 100% !important; /* UNIFORM WIDTH */
    box-sizing: border-box !important;
}

.radio-option:hover {
    background-color: #f8f9fa !important;
    border-color: #0066cc !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
}

.radio-option input[type="radio"] {
    width: 22px !important;
    height: 22px !important;
    margin-top: 3px !important;
    flex-shrink: 0 !important;
    cursor: pointer !important;
}

.radio-option label {
    flex: 1 !important;
    cursor: pointer !important;
    line-height: 1.6 !important;
}

/* Title - BOLD & DARK */
.radio-option label strong {
    display: block !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #003d73 !important;
    margin-bottom: 6px !important;
}

/* Description - CLEAR & READABLE */
.radio-option label {
    flex: 1 !important;
    cursor: pointer !important;
    line-height: 1.6 !important;
    font-size: 15px !important;
    color: #444 !important;
    font-weight: 400 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.radio-option.selected {
    background-color: #0066cc !important; /* SOLID BLUE BACKGROUND */
    border-color: #0066cc !important;
    border-left-width: 5px !important;
    padding-left: 15px !important;
    box-shadow: 0 2px 12px rgba(0, 102, 204, 0.3) !important;
}

/* WHITE TEXT on selected radio option for readability */
.radio-option.selected label strong {
    color: white !important; /* White title text */
}

.radio-option.selected label {
    color: white !important; /* White description text */
}

/* V1.0.9.4: Clean styling for unselected radio buttons */
/* Removed yellow warning - back to clean white design */
.radio-option:not(.selected) {
    background-color: white !important;
    border: 2px solid #ddd !important;
}

.radio-option:not(.selected) label strong {
    color: #003d73 !important; /* Dark blue title */
    font-weight: 700 !important;
}

.radio-option:not(.selected) label {
    color: #444 !important; /* Dark gray description */
    font-weight: 400 !important;
}

/* Hover state for unselected */
.radio-option:not(.selected):hover {
    background-color: #f8f9fa !important;
    border-color: #0066cc !important;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15) !important;
    cursor: pointer !important;
}

/* ===================================
   STATE DETAILS - CENTERED + READABLE
   =================================== */

.state-guidance {
    max-width: 900px !important;
    margin: 0 auto 24px auto !important;
    background-color: #f8f9fa !important;
    padding: 24px !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
}

.state-guidance h3,
.state-guidance h4 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #003d73 !important;
    margin: 0 0 16px 0 !important;
}

.guidance-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.guidance-list li {
    padding: 10px 0 10px 28px !important;
    position: relative !important;
    font-size: 15px !important;
    color: #333 !important;
    line-height: 1.6 !important;
}

.guidance-list li::before {
    content: '✓' !important;
    position: absolute !important;
    left: 0 !important;
    color: #4caf50 !important;
    font-weight: 700 !important;
    font-size: 18px !important;
}

/* Timeline */
.reassessment-timeline {
    max-width: 900px !important;
    margin: 0 auto !important;
    background-color: white !important;
    padding: 24px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
}

.reassessment-timeline h4 {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #003d73 !important;
    margin: 0 0 20px 0 !important;
}

.timeline-item {
    margin-bottom: 20px !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.timeline-item:last-child {
    border-bottom: none !important;
}

.timeline-item strong {
    display: block !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0066cc !important;
    margin-bottom: 8px !important;
}

.timeline-item ul,
.timeline-item p {
    margin: 0 !important;
    padding-left: 20px !important;
    font-size: 14px !important;
    color: #555 !important;
    line-height: 1.6 !important;
}

.timeline-item li {
    margin: 6px 0 !important;
}

/* ===================================
   RESPONSIVE - MOBILE
   =================================== */

@media (max-width: 768px) {
    .state-diagram {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 16px !important;
    }
    
    /* FIX #3: Full-width state nodes on mobile */
    .state-node {
        width: 100% !important;
        min-width: unset !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .state-arrow {
        transform: rotate(90deg) !important;
        width: 100% !important;
        height: 30px !important;
    }
    
    .radio-group {
        max-width: 100% !important;
    }
    
    /* V1.0.9.3: MOBILE - Force LEFT-ALIGNMENT for English text in radio buttons */
    .radio-option {
        text-align: left !important;
        direction: ltr !important;
    }
    
    .radio-option label {
        text-align: left !important;
        direction: ltr !important;
        align-items: flex-start !important;
    }
    
    .radio-option label strong {
        text-align: left !important;
        width: 100% !important;
    }
}
