/**
 * Copyright (c) 2025 Freelance Mentors. All rights reserved.
 * 
 * This software is proprietary and confidential. Unauthorized copying,
 * distribution, or use is strictly prohibited.
 * 
 * @copyright 2025 Freelance Mentors
 * @license   Proprietary - All Rights Reserved
 */
 /**
 * FM Niche Navigator Frontend Styles - CLEANED VERSION
 * 
 * Modern, responsive CSS for the complete user experience
 * Mobile-first approach with progressive enhancement
 * 
 * CLEANED: Removed duplicates, orphaned styles, and inconsistencies
 */

/* ==========================================================================
   CSS Variables for FM Brand Colors
   ========================================================================== */

/* Import Roboto font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Condensed:wght@400;900&display=swap');


:root {
    --fnn-primary-red: #DE3B44;
    --fnn-secondary-gold: #FFD166;
    --fnn-dark-charcoal: #221D23;
    --fnn-light-gray: #ECEBF3;
    --fnn-middle-gray: #A0ACAD;
    --fnn-white: #FFFFFF;
    --fnn-info-bg: #E1F5FE;
    --fnn-info-border: #29B6F6;
    --fnn-info-text: #0277BD;
    --fnn-border-radius: 4px;
    --fnn-box-shadow: 0 2px 4px rgba(34, 29, 35, 0.1);
    --fnn-transition: all 0.3s ease;
    --fnn-font-family: 'Roboto', sans-serif;
    
    /* Additional color variables to replace hardcoded colors */
    --fnn-success-bg: #f0fdf4;
    --fnn-success-border: #86efac;
    --fnn-success-text: #166534;
    --fnn-error-bg: #fdf2f2;
    --fnn-error-border: #fca5a5;
    --fnn-error-text: #991b1b;
    --fnn-warning-bg: #fffbeb;
    --fnn-warning-border: #fcd34d;
    --fnn-warning-text: #92400e;
    --fnn-neutral-text: #4a5568;
    --fnn-muted-text: #7f8c8d;
}

/* ==========================================================================
   Base Styles & CSS Reset
   ========================================================================== */

.fnn-assessment-container {
    font-family: var(--fnn-font-family);
    color: var(--fnn-dark-charcoal);
    font-size: 16px;
    line-height: 1.6;
    max-width: 700px;
    margin: 2rem auto;
    background: var(--fnn-white);
    border: 1px solid var(--fnn-light-gray);
    border-radius: var(--fnn-border-radius);
    padding: 2rem;
    box-shadow: var(--fnn-box-shadow);
    overflow: hidden;
    background-image: url('https://images.freelancementors.org/toolkits/interface-bg-topo-01.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.fnn-assessment-container * {
    box-sizing: border-box;
}

/* ==========================================================================
   Loading Overlay & Spinners
   ========================================================================== */

.fnn-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

/* Unified spinner styles - removed duplicates */
.fnn-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--fnn-light-gray);
    border-top: 4px solid var(--fnn-primary-red);
    border-radius: 50%;
    animation: fnn-spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Small spinner variant for context bars */
.fnn-loading-status .fnn-loading-spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin: 0;
}

.fnn-loading-message {
    font-size: 16px;
    color: var(--fnn-muted-text);
    text-align: center;
    max-width: 300px;
}

@keyframes fnn-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Progress Bar (FRP Style)
   ========================================================================== */

.fnn-progress-path {
    width: 100%;
    margin-bottom: 2.5rem;
}

.fnn-progress-bar {
    height: 8px;
    background-color: var(--fnn-light-gray);
    border-radius: var(--fnn-border-radius);
    overflow: hidden;
}

.fnn-progress-bar-fill {
    height: 100%;
    width: 0;
    background-color: var(--fnn-primary-red);
    border-radius: var(--fnn-border-radius);
    transition: width 0.4s ease-in-out;
}

/* Legacy progress bar support */
.fnn-progress-container {
    margin-bottom: 30px;
    padding: 0 5px;
}

.fnn-progress-fill {
    height: 100%;
    background: var(--fnn-primary-red);
    border-radius: 20px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ==========================================================================
   Panel System
   ========================================================================== */

/* Panel container - white background to hide topo pattern behind interface */
.fnn-panel-container {
    background: var(--fnn-white);
    border-radius: var(--fnn-border-radius);
    padding: 20px;
    margin-top: 0;
    box-shadow: var(--fnn-box-shadow);
}

.fnn-panel {
    display: none;
    animation: fnn-fade-in 0.5s ease-in-out;
}

.fnn-panel.active {
    display: block;
}

.fnn-panel--centered {
    text-align: center;
    padding: 3rem 1rem;
}

/* Introduction panel stays transparent to show the designed card structure */
.fnn-panel-introduction {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

/* Other panels get clean white background within the container */
.fnn-panel-inputs,
.fnn-panel-email-gate,
.fnn-panel-roll-counter,
.fnn-panel-loading,
.fnn-panel-results,
.fnn-panel-workspace {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
}

@keyframes fnn-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fnn-panel-header {
    margin-bottom: 25px;
    text-align: center;
}

.fnn-panel-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--fnn-primary-red);
    line-height: 1.3;
}

.fnn-panel-description {
    margin: 0;
    font-size: 14px;
    color: var(--fnn-middle-gray);
    max-width: 600px;
    margin: 0 auto;
    font-style: italic;
    line-height: 1.4;
}

@keyframes fnn-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.fnn-form-group {
    margin-bottom: 25px;
}

.fnn-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--fnn-dark-charcoal);
    font-size: 14px;
}

.fnn-label .required {
    color: var(--fnn-primary-red);
    margin-left: 3px;
}

.fnn-input,
.fnn-select,
.fnn-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--fnn-dark-charcoal);
    border-radius: var(--fnn-border-radius);
    font-size: 16px;
    transition: var(--fnn-transition);
    background: var(--fnn-white);
    color: var(--fnn-dark-charcoal);
}

.fnn-input:focus,
.fnn-select:focus,
.fnn-textarea:focus {
    outline: none;
    border-color: var(--fnn-primary-red);
    box-shadow: 0 0 0 2px rgba(222, 59, 68, 0.1);
}

.fnn-input:invalid,
.fnn-select:invalid,
.fnn-textarea:invalid {
    border-color: var(--fnn-primary-red);
}

.fnn-textarea {
    resize: vertical;
    min-height: 100px;
}

.fnn-help-text {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: var(--fnn-muted-text);
    font-style: italic;
}

/* Radio and Checkbox Groups */
.fnn-radio-group,
.fnn-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fnn-radio-label,
.fnn-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: normal;
    margin-bottom: 0;
}

.fnn-radio-label:hover,
.fnn-checkbox-label:hover {
    background: #e9ecef;
}

.fnn-radio-label input,
.fnn-checkbox-label input {
    margin-right: 10px;
    width: auto;
}

/* ==========================================================================
   Modal System (Unified - removed duplicates)
   ========================================================================== */

.fnn-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 999999 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.fnn-modal-content {
    background: var(--fnn-white);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fnn-modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid var(--fnn-light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fnn-modal-header h3 {
    margin: 0;
    color: var(--fnn-dark-charcoal);
    font-size: 20px;
    font-weight: 700;
    flex: 1;
    padding-right: 20px;
}

.fnn-modal-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
    color: var(--fnn-dark-charcoal);
    line-height: 1.6;
}

.fnn-modal-body p {
    margin: 0 0 15px 0;
}

.fnn-modal-body p:last-child {
    margin-bottom: 0;
}

.fnn-modal-actions {
    padding: 15px 25px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--fnn-light-gray);
}

.fnn-modal-actions .fnn-btn {
    min-width: 100px;
}

.fnn-modal.fnn-modal-visible {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.fnn-modal.fnn-modal-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.fnn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.fnn-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fnn-btn-primary {
    background: var(--fnn-primary-red);
    color: var(--fnn-white);
    border: 1px solid var(--fnn-primary-red);
    box-shadow: var(--fnn-box-shadow);
}

.fnn-btn-primary:hover:not(:disabled) {
    background: var(--fnn-white);
    color: var(--fnn-primary-red);
    border: 1px solid var(--fnn-primary-red);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(222, 59, 68, 0.3);
}

.fnn-btn-secondary {
    background: var(--fnn-white);
    color: var(--fnn-dark-charcoal);
    border: 1px solid var(--fnn-dark-charcoal);
    box-shadow: var(--fnn-box-shadow);
}

.fnn-btn-secondary:hover:not(:disabled) {
    background: var(--fnn-light-gray);
    color: var(--fnn-dark-charcoal);
    border: 1px solid var(--fnn-dark-charcoal);
    transform: translateY(-2px);
}

.fnn-btn-loading .fnn-btn-text {
    display: none;
}

.fnn-btn-loading .fnn-btn-loading {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.fnn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: fnn-spin 1s linear infinite;
}

/* ==========================================================================
   Form Actions
   ========================================================================== */

.fnn-form-actions {
    margin-top: 30px;
    text-align: center;
}

.fnn-form-actions .fnn-btn {
    min-width: 200px;
}

/* ==========================================================================
   Introduction Panel (FRP Design Language)
   ========================================================================== */

.fnn-panel-introduction {
    text-align: center;
    padding: 0;
    overflow: hidden;
}

/* Image container - full width within main container */
.fnn-intro-image {
    width: 100%;
    border-radius: var(--fnn-border-radius) var(--fnn-border-radius) 0 0;
    overflow: hidden;
    margin-bottom: 0;
}

.fnn-intro-hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0 !important;
}

/* Text container with primary color background */
.fnn-intro-text-banner {
    background-color: var(--fnn-primary-red);
    text-align: center;
    margin-bottom: 0;
    padding: 0px;
}

.fnn-intro-text-banner .fnn-panel__title {
    color: var(--fnn-white);
    font-family: 'Roboto Condensed', var(--fnn-font-family);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.2;
}

/* Content in a clean content card */
.fnn-content-card {
    background-color: var(--fnn-white);
    border: 1px solid var(--fnn-light-gray);
    border-radius: 0 0 var(--fnn-border-radius) var(--fnn-border-radius);
    padding: 20px;
    margin-bottom: 20px;
}

/* Typography within content card */
.fnn-panel__headline {
    text-align: center;
    font-family: var(--fnn-font-family);
    font-size: 18px;
    font-weight: 500;
    color: var(--fnn-dark-charcoal);
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.fnn-panel__subtext {
    text-align: center;
    font-family: var(--fnn-font-family);
    font-size: 14px;
    font-weight: 400;
    color: var(--fnn-dark-charcoal);
    margin-bottom: 2rem;
}

.fnn-panel__subtext p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.fnn-panel__subtext p:last-child {
    margin-bottom: 0;
}

/* Actions outside content card, in main container */
.fnn-panel__actions {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    text-align: center;
}

/* FRP-style button modifications */
.fnn-btn--primary {
    background-color: var(--fnn-primary-red);
    color: var(--fnn-white);
    border: 1px solid var(--fnn-primary-red);
    font-family: inherit;
    font-size: 16px;
    padding: 12px 20px;
    border-radius: var(--fnn-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.fnn-btn--primary:hover {
    background-color: var(--fnn-white);
    color: var(--fnn-primary-red);
    border-color: var(--fnn-primary-red);
}

.fnn-btn--primary i {
    font-size: 16px;
}

/* Legacy button support */
.fnn-begin-btn {
    font-size: 18px;
    padding: 15px 30px;
    min-width: 250px;
}

/* ==========================================================================
   Email Gate Panel
   ========================================================================== */

.fnn-email-gate-content {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.fnn-value-proposition {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border-left: 4px solid var(--fnn-secondary-gold);
}

.fnn-value-proposition h3 {
    margin: 0 0 15px 0;
    color: var(--fnn-dark-charcoal);
    font-size: 20px;
}

.fnn-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fnn-benefits-list li {
    padding: 8px 0;
    color: var(--fnn-dark-charcoal);
    position: relative;
    padding-left: 25px;
}

.fnn-benefits-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--fnn-success-text);
    font-weight: bold;
}

/* ==========================================================================
   Roll Counter Panel
   ========================================================================== */

.fnn-roll-counter-content {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.fnn-usage-display {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.fnn-usage-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--fnn-dark-charcoal);
}

/* ==========================================================================
   Loading Panels (Unified - removed duplicates)
   ========================================================================== */

.fnn-panel-loading {
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fnn-context-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.fnn-loading-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fnn-loading-text {
    font-size: 16px;
    color: var(--fnn-dark-charcoal);
    font-weight: 500;
}

.fnn-loading-content {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.fnn-cpt-content {
    color: var(--fnn-dark-charcoal);
    line-height: 1.7;
}

.fnn-cpt-content h3 {
    color: var(--fnn-dark-charcoal);
    margin: 0 0 15px 0;
}

.fnn-cpt-content p {
    margin-bottom: 15px;
}

.fnn-cpt-content p:last-child {
    margin-bottom: 0;
}

.fnn-results-btn {
    background: var(--fnn-primary-red);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.fnn-results-btn:hover {
    background: var(--fnn-primary-red);
    opacity: 0.9;
}

/* ==========================================================================
   Results Panels
   ========================================================================== */

.fnn-context-header {
    text-align: center;
    margin-bottom: 25px;
}

.fnn-context-header h3 {
    margin: 0;
    font-size: 24px;
    color: var(--fnn-dark-charcoal);
}

.fnn-results-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.fnn-panel-actions {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.fnn-action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Workspace System (Cleaned and Organized)
   ========================================================================== */

.fnn-workspace-container {
    position: relative;
}

.fnn-workspace-content {
    position: relative;
    min-height: 400px;
}

.fnn-workspace-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--fnn-middle-gray);
}

.fnn-current-results {
    margin-bottom: 2rem;
}

.fnn-current-results h3 {
    color: var(--fnn-dark-charcoal);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.fnn-results-hierarchy {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.fnn-hierarchy-section {
    background: var(--fnn-white);
    border: 2px solid var(--fnn-light-gray);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--fnn-box-shadow);
    transition: var(--fnn-transition);
}

.fnn-hierarchy-section:hover {
    border-color: var(--fnn-primary-red);
    box-shadow: 0 4px 12px rgba(222, 59, 68, 0.15);
}

.fnn-hierarchy-header {
    background: linear-gradient(135deg, var(--fnn-light-gray) 0%, #f8f9fa 100%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(34, 29, 35, 0.1);
}

.fnn-hierarchy-header h4 {
    margin: 0;
    color: var(--fnn-dark-charcoal);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fnn-hierarchy-icon {
    font-size: 1.2rem;
}

.fnn-hierarchy-content {
    padding: 1.5rem;
}

.fnn-placeholder {
    color: var(--fnn-middle-gray);
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background: rgba(236, 235, 243, 0.3);
    border-radius: 8px;
    border: 2px dashed rgba(160, 172, 173, 0.3);
}

.fnn-workspace-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--fnn-light-gray);
}

/* Workspace Items (Used by JavaScript populateWorkspace) */
.fnn-workspace-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(160, 172, 173, 0.2);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--fnn-transition);
}

.fnn-workspace-item:last-child {
    margin-bottom: 0;
}

.fnn-workspace-item:hover {
    background: rgba(255, 255, 255, 1);
    border-color: var(--fnn-primary-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(222, 59, 68, 0.15);
}

.fnn-workspace-item h5 {
    color: var(--fnn-primary-red);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.fnn-workspace-item h6 {
    color: var(--fnn-dark-charcoal);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.fnn-workspace-item p {
    color: var(--fnn-dark-charcoal);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.fnn-workspace-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
}

.fnn-workspace-meta span {
    background: rgba(222, 59, 68, 0.1);
    color: var(--fnn-primary-red);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.fnn-workspace-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.fnn-tag {
    background: var(--fnn-secondary-gold);
    color: var(--fnn-dark-charcoal);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Workspace actions for save buttons */
.fnn-workspace-actions {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--fnn-light-gray);
}

.fnn-save-combination-btn {
    background: var(--fnn-primary-red);
    color: var(--fnn-white);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--fnn-border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--fnn-transition);
    font-family: var(--fnn-font-family);
}

.fnn-save-combination-btn:hover {
    background: #c73137;
    transform: translateY(-1px);
    box-shadow: var(--fnn-box-shadow);
}

.fnn-save-combination-btn:active {
    transform: translateY(0);
}

.fnn-btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
}

/* ==========================================================================
   Result Cards (Used by JavaScript)
   ========================================================================== */

.fnn-result-card {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.fnn-result-card:hover {
    border-color: var(--fnn-primary-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(222, 59, 68, 0.1);
}

.fnn-result-card.selected {
    border-color: var(--fnn-success-text);
    background: var(--fnn-success-bg);
}

.fnn-card-header {
    margin-bottom: 15px;
}

.fnn-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--fnn-dark-charcoal);
    line-height: 1.3;
}

.fnn-card-preview {
    color: var(--fnn-muted-text);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.fnn-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.fnn-card-btn {
    padding: 8px 16px;
    border: 1px solid #e9ecef;
    background: #ffffff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fnn-card-btn:hover {
    background: #f8f9fa;
}

.fnn-card-btn.primary {
    background: var(--fnn-primary-red);
    color: #ffffff;
    border-color: var(--fnn-primary-red);
}

.fnn-card-btn.primary:hover {
    background: var(--fnn-white);
    color: var(--fnn-primary-red);
}

/* ==========================================================================
   Details Modal System (Used by JavaScript)
   ========================================================================== */

.fnn-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.fnn-details-modal.fnn-modal-visible {
    opacity: 1;
    display: flex !important;
}

.fnn-details-modal .fnn-modal-content {
    position: relative;
    background: var(--fnn-white);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    max-height: 90vh;
    width: 95%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fnn-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.fnn-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--fnn-middle-gray);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--fnn-transition);
}

.fnn-modal-close:hover {
    background: var(--fnn-light-gray);
    color: var(--fnn-dark-charcoal);
}

.fnn-modal-footer {
    padding: 15px 25px 20px;
    border-top: 1px solid var(--fnn-light-gray);
    text-align: right;
}

.fnn-detail-section {
    margin-bottom: 25px;
}

.fnn-detail-section:last-child {
    margin-bottom: 0;
}

.fnn-detail-section h4 {
    margin: 0 0 10px 0;
    color: var(--fnn-dark-charcoal);
    font-size: 18px;
    font-weight: 600;
}

.fnn-detail-section p {
    margin: 0;
    color: var(--fnn-neutral-text);
    line-height: 1.6;
}

.fnn-detail-section ul {
    margin: 0;
    padding-left: 20px;
    color: var(--fnn-neutral-text);
}

.fnn-detail-section li {
    margin-bottom: 5px;
}

.fnn-detail-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--fnn-border-radius);
}

.fnn-metric {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fnn-metric strong {
    color: var(--fnn-dark-charcoal);
    font-size: 14px;
}

.fnn-metric span {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
}

.fnn-metric-low {
    background: #fee2e2;
    color: #991b1b;
}

.fnn-metric-medium {
    background: #fef3c7;
    color: #92400e;
}

.fnn-metric-high {
    background: #d1fae5;
    color: #065f46;
}

.fnn-metric-critical {
    background: #fee2e2;
    color: #991b1b;
}

.fnn-metric-significant {
    background: #fed7aa;
    color: #9a3412;
}

.fnn-metric-moderate {
    background: #fef3c7;
    color: #92400e;
}

.fnn-metric-minor {
    background: #d1fae5;
    color: #065f46;
}

.fnn-metric-recurring {
    background: #fee2e2;
    color: #991b1b;
}

.fnn-metric-regular {
    background: #fed7aa;
    color: #9a3412;
}

.fnn-metric-occasional {
    background: #fef3c7;
    color: #92400e;
}

.fnn-metric-one-time {
    background: #d1fae5;
    color: #065f46;
}

.fnn-metric-unknown {
    background: #e5e7eb;
    color: #6b7280;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.fnn-text-center {
    text-align: center;
}

.fnn-text-left {
    text-align: left;
}

.fnn-text-right {
    text-align: right;
}

.fnn-hidden {
    display: none !important;
}

.fnn-visible {
    display: block !important;
}

.fnn-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Alert & Error States (Using CSS Variables)
   ========================================================================== */

.fnn-error {
    background: var(--fnn-error-bg);
    border: 1px solid var(--fnn-error-border);
    color: var(--fnn-error-text);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.fnn-success {
    background: var(--fnn-success-bg);
    border: 1px solid var(--fnn-success-border);
    color: var(--fnn-success-text);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.fnn-warning {
    background: var(--fnn-warning-bg);
    border: 1px solid var(--fnn-warning-border);
    color: var(--fnn-warning-text);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

/* ==========================================================================
   Responsive Design (Consolidated)
   ========================================================================== */

@media (max-width: 768px) {
    /* Assessment container mobile styles (FRP) */
    .fnn-assessment-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    /* Panel container mobile styles */
    .fnn-panel-container {
        padding: 15px;
        margin-top: 0;
    }
    
    /* Introduction panel mobile styles */
    .fnn-intro-image {
        margin: -15px -15px 0 -15px;
        border-radius: 0;
    }
    
    .fnn-intro-text-banner {
        margin: 0 -15px;
        padding: 0px;
    }
    
    .fnn-panel__headline {
        font-size: 16px;
    }
    
    .fnn-panel__title {
        font-size: 20px;
    }
    
    .fnn-begin-btn {
        font-size: 16px;
        padding: 12px 24px;
        min-width: 200px;
    }
    
    .fnn-modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .fnn-modal-header,
    .fnn-modal-body,
    .fnn-modal-actions {
        padding: 15px 20px;
    }
    
    .fnn-modal-header h3 {
        font-size: 18px;
    }
    
    .fnn-workspace-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .fnn-modal-content {
        width: 98%;
        max-height: 95vh;
        margin: 2vh auto;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .fnn-assessment-container {
        box-shadow: none;
        padding: 0;
    }
    
    .fnn-btn,
    .fnn-form-actions,
    .fnn-panel-actions {
        display: none;
    }
    
    .fnn-panel {
        box-shadow: none;
        border: 1px solid #e9ecef;
        break-inside: avoid;
    }
}