/* ============================================
   CYBER RESILIENCE CHECK - VANILLA JS VERSION
   The Beach Geek Branding
   ============================================ */

.cyber-resilience-main-container{
	background: linear-gradient(0deg,#fed384 0%,#5ac3b9 39%)!important;
}

.cyber-resilience-main-container img.wp-image-472 {
    margin-top: -150px;
    width: 100%;
}

.cyber-resilience-main-container img.wp-image-474 {
    width: 50%;
    height: auto;
    float: right;
	margin-top: 50px;
}

.cyber-resilience-main-container span.span-bottom{
    padding: 0 !IMPORTANT;
    display: block;
    margin-bottom: -10px;
}

/* High-specificity parent class to prevent conflicts */
.cyber-resilience-check-container {
    /* Reset and Base Styles */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-size: 0.9rem;
    }

    /* The Beach Geek Colour Scheme */
    --primary: #4ECDC4;
    --primary-dark: #1A1A2E;
    --secondary: #FF6B6B;
    --accent-yellow: #FFD93D;
    --accent-purple: #9B59B6;
    --accent-cyan: #00BCD4;
    --success: #4CAF50;
    --warning: #FFA500;
    --danger-now: #bb0000;
    --danger: #FF4444;
    --light-bg: #F0F9F8;
    --white: #FFFFFF;
    --text-dark: #1A1A2E;
    --text-light: #666666;
    --border-color: #E0E0E0;

    html, body {
        height: 100%;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
        color: var(--text-dark);
    }

    body {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    #cyber-resilience-root {
        flex: 1;
        display: flex;
        flex-direction: column;
        background: linear-gradient(0deg,#fed384 0%,#5ac3b9 39%)!important;
    }

    /* ============================================
       MAIN CONTAINER
       ============================================ */

    .main-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
/*         background: linear-gradient(135deg, #4ECDC4 0%
0%
, #95E1D3 100%); */
/* 		background: linear-gradient(0deg,#fed384 0%,#5ac3b9 39%)!important; */
    }

    .content-card {
        background: var(--white) !important;
        border-radius: 1rem;
        padding: 2rem;
        max-width: 800px;
        width: 100%;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    /* ============================================
       WELCOME PAGE
       ============================================ */

    .welcome-header {
        text-align: center;
        margin-bottom: 2rem;
    }
	
	span.small {
		font-size: .65rem !important;
	}

    .welcome-header h1 {
        font-size: 2.5rem !important;
        color: var(--text-dark);
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }

    .shield-icon {
        width: 60px;
        height: 60px;
        object-fit: contain;
    }

    .welcome-header p {
        color: var(--text-light) !important;
        font-size: 0.9rem !important;
    }

    .welcome-content {
        margin-bottom: 2rem;
    }

    .welcome-section {
        margin-bottom: 1.5rem;
    }

    .welcome-section h2 {
        color: var(--text-dark);
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }

    .welcome-section p {
        color: var(--text-light);
        line-height: 1.6;
        margin-bottom: 0.5rem;
        font-size: 1rem;
    }

    .features-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
        margin: 1.5rem 0;
    }

    .feature-card {
        text-align: center;
        padding: 1.5rem;
        background: var(--light-bg);
        border-radius: 0.75rem;
    }

    .feature-card .lucide {
        width: 2rem;
        height: 2rem;
        color: var(--primary);
        margin-bottom: 0.5rem;
    }

    .feature-card h3 {
        color: var(--text-dark);
        margin-bottom: 0.5rem;
    }

    .feature-card p {
        color: var(--text-light);
        font-size: 0.9rem;
        line-height: 1.5;
        font-size: 0.8rem;
    }

    .benefits-list {
        background: #F0F7FF;
        border-left: 4px solid var(--primary);
        padding: 1.5rem;
        border-radius: 0.5rem;
        margin: 1.5rem 0;
    }

    .benefits-list h3 {
        color: var(--text-dark);
        margin-bottom: 1rem;
    }

    .benefits-list ul {
        list-style: none;
    }

    .benefits-list li {
        color: var(--text-light);
        padding: 0.35rem 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 1rem;
    }

    .benefits-list li:before {
        content: "✓";
        color: var(--success);
        font-weight: bold;
    }

    .privacy-notice {
        background: #4ecdc43b;
        padding: 1rem;
        border-radius: 0.5rem;
        font-size: 0.9rem;
        color: var(--text-light);
        margin: 1.5rem 0;
    }

    /* ============================================
       FORM STYLES
       ============================================ */

    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 600;
        color: var(--text-dark);
    }

    .form-group input {
        width: 100%;
        padding: 0.75rem;
        border: 2px solid var(--border-color);
        border-radius: 0.5rem;
        font-size: 1rem;
        transition: border-color 0.3s;
    }

    .form-group input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
    }

    .form-group input.error {
        border-color: var(--danger);
    }

    .form-error {
        color: var(--danger);
        font-size: 0.85rem;
        margin-top: 0.25rem;
        display: none;
    }

    .form-error.show {
        display: block;
    }

    /* ============================================
       BUTTON STYLES
       ============================================ */

    .button {
        padding: 0.75rem 2rem !important;
        border: none !important;
        border-radius: 0.5rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.3s !important;
        text-decoration: none !important;
        display: inline-block !important;
        text-align: center !important;
    }

    .button-primary {
        background-color: var(--primary) !important;
        color: var(--primary-dark) !important;
        width: 100%;
    }

    .button-primary:hover {
        background-color: #39b3aa !important; /* Slightly darker primary */
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3) !important;
    }

    .button-primary:disabled {
        background-color: #CCCCCC;
        cursor: not-allowed;
        transform: none;
    }

    .button-secondary {
        background-color: var(--border-color) !important;
        color: var(--text-dark) !important;
    }

    .button-secondary:hover {
        background-color: #D0D0D0 !important;
        transform: translateY(-2px) !important;
    }

    .button-group {
        display: flex;
        gap: 1rem;
        margin-top: 2rem;
    }

    .button-group .button {
        flex: 1;
    }

    /* ============================================
       QUIZ STYLES
       ============================================ */

    .quiz-container {
        width: 100%;
    }

    .quiz-header {
        text-align: center;
        margin-bottom: 2rem;
    }

    .quiz-title {
        font-size: 2rem;
        color: var(--text-dark);
        margin-bottom: 0.5rem;
    }

    .quiz-welcome {
        color: var(--primary);
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .progress-bar {
        width: 100%;
        height: 8px;
        background-color: var(--border-color);
        border-radius: 4px;
        overflow: hidden;
        margin-bottom: 2rem;
    }

    .progress-fill {
        height: 100%;
        background-color: var(--primary);
        transition: width 0.3s ease;
    }

    .question-card {
        background: var(--light-bg);
        padding: 1.5rem;
        border-radius: 0.75rem;
        margin-bottom: 2rem;
    }

    .question-category {
        display: inline-block;
        background-color: var(--primary);
        color: var(--white);
        padding: 0.25rem 0.75rem;
        border-radius: 0.25rem;
        font-size: 0.8rem;
        font-weight: 600;
        margin-bottom: 1rem;
    }
    
    .question-card span.question-category {
        display: none;
    }

    .question-text {
        font-size: 1.3rem !important;
        color: var(--text-dark);
        margin-bottom: 1.5rem;
        font-weight: 500;
    }

    .options-list {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .option {
        display: flex;
        align-items: center;
        padding: 1rem;
        border: 2px solid var(--border-color);
        border-radius: 0.5rem;
        cursor: pointer;
        transition: all 0.3s;
        background: var(--white);
    }

    .option:hover {
        border-color: var(--primary);
        background-color: rgba(78, 205, 196, 0.05);
    }

    .option.selected {
        border-color: var(--primary);
        background-color: rgba(78, 205, 196, 0.1);
    }

    .option-label {
        flex: 1;
        cursor: pointer;
        color: var(--text-dark);
    }

    .question-counter {
        text-align: center;
        color: var(--text-light);
        font-size: 0.9rem;
        margin-top: 1.5rem;
    }

    /* ============================================
       RESULTS PAGE
       ============================================ */

    .results-container {
        text-align: center;
    }
    
    .section-result-card {
        text-align: left;
        padding-bottom: 30px;
    }
    
    .section-result-card h2 {
        color: var(--primary) !important;
    }
    
    .section-interpreting h2 {
        color: var(--primary) !important;
    }
    
    .section-interpreting {
        text-align: left;
        padding-bottom: 30px;
        padding-top: 30px;
    }
    
    .section-deep-report h2 {
        color: var(--primary) !important;
    }
    
    .section-deep-report {
        text-align: left;
        padding-bottom: 30px;
    }
    
    .section-deep-report h3 {
        color: #000;
        color: #293c4b;
        font-size: 0.9rem !important;
        padding-top: 20px;
    }
    
    .section-deep-report h4 {
        font-size: 1.1rem !important;
        color: #293c4b;
        padding-top: 30px;
    }
    
    .section-deep-report ul {
        margin-left: 20px;
        list-style: disc;
    }
    
    h3.timer-warning {
        color: #ff0000;
        margin: 20px 0 30px;
        font-size: 1rem !important;
        text-align: center;
    }
    
    h3.timer-warning.discount {
        border: 1px solid #ff0000;
        border-radius: 10px;
        background-color: #f3eace;
        padding: 20px;
    }
    
    .cyber-resilience-check-container h2.section-title {
        color: var(--primary) !important;
    }

    .results-header {
        margin-bottom: 2rem;
    }

    .results-title {
        font-size: 2rem !important;
        color: var(--text-dark);
        margin-bottom: 0.5rem;
    }

    .results-subtitle {
        color: var(--primary) !important;
        font-size: 1rem !important;
        margin-bottom: 1rem;
    }

    .results-description {
        color: var(--text-light);
        margin-bottom: 2rem;
        font-size: 0.9rem;
    }

    .thermometer-wrapper {
        display: flex;
        justify-content: center;
        margin: 2rem 0;
    }

    .thermometer-container {
        position: relative;
        width: 60px;
        height: 250px;
        margin: 0 auto;
    }

    .thermometer-bg {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 90px;
        height: 100%;
        background-color: var(--border-color);
        border-top-right-radius: 35px;
        border-top-left-radius: 35px;
        border-bottom-right-radius: 10px;
        border-bottom-left-radius: 10px;
        overflow: hidden;
    }

    .thermometer-fill {
        position: absolute;
        bottom: 0;
        width: 100%;
        background: linear-gradient(to top, var(--danger) 0%, var(--warning) 50%, var(--success) 100%);
        transition: height 0.5s ease-in-out;
    }

    .thermometer-bulb {
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
        background-color: var(--white);
        border: 5px solid var(--border-color);
        border-radius: 50%;
        z-index: 10;
    }

    .thermometer-bulb-fill {
        position: absolute;
        top: 0px;
        left: 0px;
        width: 40px;
        height: 40px;
        background: linear-gradient(to top, var(--danger) 0%, var(--warning) 50%, var(--success) 100%);
        border-radius: 50%;
    }

    .score-badge {
        display: inline-block;
        padding: 0.5rem 1.5rem;
        border-radius: 0.5rem;
        font-size: 1.5rem;
        font-weight: bold;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .score-badge.at-risk-act-now {
        background-color: rgba(187, 0, 0, 0.1);
        color: var(--danger-now);
    }

    .score-badge.at-risk {
        background-color: rgba(255, 68, 68, 0.1);
        color: var(--danger);
    }

    .score-badge.vulnerable {
        background-color: rgba(255, 165, 0, 0.1);
        color: var(--warning);
    }

    .score-badge.on-track {
        background-color: rgba(76, 175, 80, 0.1);
        color: var(--success);
    }

    .category-breakdown {
        margin-top: 2rem;
        text-align: left;
    }

    .category-breakdown h2 {
        font-size: 1.5rem;
        color: var(--text-dark);
        margin-bottom: 1rem;
    }

    .category-item {
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        margin-bottom: 0.5rem;
        overflow: hidden;
    }

    .category-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1rem !important;
        cursor: pointer !important;
        background-color: var(--light-bg) !important;
        transition: background-color 0.3s !important;
    }

    .category-header:hover {
        background-color: #E8F4F3;
    }

    .category-info {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .category-name {
        font-weight: 600;
        color: var(--text-dark);
    }

    .category-percentage {
        font-size: 0.9rem;
        color: var(--text-light);
    }

    .category-progress-bar {
        width: 100px;
        height: 8px;
        background-color: var(--border-color);
        border-radius: 4px;
        overflow: hidden;
    }

    .category-progress-fill {
        height: 100%;
        transition: width 0.5s;
    }
    
    .category-progress-fill.at-risk-act-now {
        background-color: var(--danger-now);
    }

    .category-progress-fill.at-risk {
        background-color: var(--danger);
    }

    .category-progress-fill.vulnerable {
        background-color: var(--warning);
    }

    .category-progress-fill.on-track {
        background-color: var(--success);
    }

    .category-details {
        padding: 1rem;
        border-top: 1px solid var(--border-color);
        background-color: var(--white);
        text-align: left;
    }

    .category-details p {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        color: var(--text-light);
    }

    .recommendations-list {
        list-style: disc; /* Change to disc for bullet points */
        padding-left: 1.5rem;
        margin-top: 1rem;
    }

    .recommendations-list li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
        color: var(--text-dark);
        display: list-item; /* Ensure it renders as a list item */
    }

    .recommendations-list li:before {
        content: none; /* Remove custom bullet */
    }
    
    /* --- Dynamic Bar Visual Styles --- */

    .dynamic-bar-visual-wrapper {
        margin: 0.5rem auto 30px;
        width: 100%;
    }
    
    .dynamic-bar-container {
        height: 12px;
        background-color: #e9ecef; /* Light gray background */
        border-radius: 6px;
        overflow: hidden;
        margin-bottom: 0.5rem;
    }
    
    .dynamic-bar-fill {
        height: 100%;
        transition: width 0.6s ease-in-out;
        border-radius: 6px;
        /* Base color, will be overridden by status classes */
        background-color: #6c757d; 
    }
    
    .score-tip-detail {
        font-size: 0.9rem;
        color: #495057;
        text-align: right;
        margin: 0;
        display: none;
    }
    
    /* --- Status-Specific Colors (for the bar fill) --- */
    
    /* Exposed (0% - 39%) - Red/Critical */
    .dynamic-bar-fill.at-risk-exposed,
    .dynamic-bar-fill.exposed {
        background-color: #dc3545; /* Red */
    }
    
    /* Vulnerable (40% - 69%) - Yellow/Warning */
    .dynamic-bar-fill.vulnerable {
        background-color: #ffc107; /* Yellow */
    }
    
    /* On Track (70% - 100%) - Green/Success */
    .dynamic-bar-fill.on-track {
        background-color: #28a745; /* Green */
    }
    
    /* Ensure the full width is capped if the score is very high (to prevent visual issues) */
    .dynamic-bar-fill[style*="width: 100%"] {
        width: 100% !important;
    }

    /* ============================================
       FOOTER STYLES
       ============================================ */

    .footer {
        text-align: center;
        padding: 1rem;
        background-color: var(--primary-dark);
        color: var(--white);
        font-size: 0.8rem;
        margin-top: auto;
    }

    .footer a {
        color: var(--primary);
        text-decoration: none;
    }

    .footer a:hover {
        text-decoration: underline;
    }
	
	.align-left{
		text-align: left !important;
	}
	
	.result-score-msg{
		display: none !important;
	}

    /* ============================================
       RESPONSIVE STYLES
       ============================================ */

    @media (max-width: 768px) {


        .main-container {
            padding: 1rem;
        }

        .content-card {
            padding: 1.5rem;
        }

        .welcome-header h1 {
            font-size: 1.65rem ! IMPORTANT;
            /* DISPLAY: BLOCK; */
            flex-direction: column;
        }
        
        .cyber-resilience-check-container h2 {
            font-size: 1.3rem !important;
        }
        
        .cyber-resilience-check-container h3 {
            font-size: 1.3rem !important;
        }
        
        .quiz-title {
            font-size: 1.65rem ! IMPORTANT;
        }

        .welcome-header p {
            font-size: 1rem;
        }

        .button {
            padding: 0.75rem 1rem;
        }

        .button-group {
            flex-direction: column;
        }

        .results-title {
            font-size: 1.65rem ! IMPORTANT;
        }
    }

    /* Utility Class for Hiding */
    .hidden {
        display: none !important;
    }
}

span.span-result{
    font-size: 1.5rem !important;
    margin-bottom: 10px;
}

span.span-result{
    color: #dc3545; /* Red */
}

span.span-result.vulnerable{
    color: #ffc107; /* Yellow */
}

span.span-result.on-track{
    color: #28a745; 
}


/* Added to address font-size overrides from themes */
.cyber-resilience-check-container h2 {
    font-size: 1.5rem !important;
            margin-bottom: 10px;

}

.cyber-resilience-check-container h3 {
    font-size: 1.25rem !important;
            margin-bottom: 10px;

}

.cyber-resilience-check-container h4 {
    font-size: 1.1rem !important;
    color: var(--text-dark);
            margin-bottom: 10px;

}

.cyber-resilience-check-container h5 {
    font-size: 1rem !important;
            margin-bottom: 10px;

}

h3.result-label {
    font-size: 1rem !important;
    margin-bottom: 10px;
    color: #293c4b !important;
    margin-top: 20px;
}

input[type="radio"] {
    margin-right: 15px;
}

.risk-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.legend-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

.legend-color.on-track {
    background-color: #4CAF50;
}

.legend-color.vulnerable {
    background-color: #FFA500;
}

.legend-color.at-risk-act-now {
    background-color: #bb0000;
}

.legend-color.at-risk {
    background-color: #FF4444;
}

.thermometer-bulb-fill.on-track {
    background: #4CAF50;
}

.thermometer-bulb-fill.vulnerable {
    background: #FFA500;
}

.thermometer-bulb-fill.at-risk-act-now {
    background: #bb0000;
}

.thermometer-bulb-fill.at-risk {
    background: #FF4444;
}

.thermometer-fill.on-track {
    background: #4CAF50;
}

.thermometer-fill.vulnerable {
    background: #FFA500;
}

.thermometer-fill.at-risk {
    background: #FF4444;
}

.category-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--white);
    text-align: center;
    line-height: 24px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 5px;
}

.spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    /* Instead of just top, make it a 75% circle for better visual balance */
    border-top-color: #ffffff;
    border-right-color: transparent; 
    border-radius: 50%;
    /* Add 'backface-visibility' to force GPU rendering */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


.spinner {
    transform: translateZ(0);
}

.page-template-page-cyber-resilience-check-step2 .results-actions {
    margin-top: 40px !important;
    text-align: center;
    display: flex;
    justify-content: space-between;
    gap: 25px;
    align-items: center;
}

.page-template-page-cyber-resilience-check-step2 .results-actions .button {
    width: 100%;
}

.page-template-page-cyber-resilience-check-step2 .section-divider h2 {
    margin-top: 20px;
    color: var(--primary);
}

.page-template-page-cyber-resilience-check-step2 .button-primary{
    justify-self: center !important;
    gap: 10px !important;
    display: flex !important;
    align-items: center !important;
}

.score-display span.small {
    font-size: .65rem;
}


/* ============================================
CONTINUE-POPUP STYLES
============================================ */

#continue-popup {

    /* The Beach Geek Colour Scheme */
    --primary: #4ECDC4;
    --primary-dark: #1A1A2E;
    --secondary: #FF6B6B;
    --accent-yellow: #FFD93D;
    --accent-purple: #9B59B6;
    --accent-cyan: #00BCD4;
    --success: #4CAF50;
    --warning: #FFA500;
    --danger-now: #bb0000;
    --danger: #FF4444;
    --light-bg: #F0F9F8;
    --white: #FFFFFF;
    --text-dark: #1A1A2E;
    --text-light: #666666;
    --border-color: #E0E0E0;

    h2 {
        font-size: 29px !important;
        color: #000 !important;
    }
    
    
    .button {
        padding: 0.75rem 2rem !important;
        border: none !important;
        border-radius: 0.5rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        transition: all 0.3s !important;
        text-decoration: none !important;
        display: inline-block !important;
        text-align: center !important;
    }
    
    .button-primary {
        background-color: var(--primary) !important;
        color: var(--primary-dark) !important;
        /*width: 100%;*/
    }
    
    .button-primary:hover {
        background-color: #39b3aa !important; /* Slightly darker primary */
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3) !important;
    }
    
    .button-primary:disabled {
        background-color: #CCCCCC;
        cursor: not-allowed;
        transform: none;
    }
    
    .button-secondary {
        background-color: var(--border-color) !important;
        color: var(--text-dark) !important;
    }
    
    .button-secondary:hover {
        background-color: #D0D0D0 !important;
        transform: translateY(-2px) !important;
    }
    
    .button-group {
        display: flex;
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .button-group .button {
        flex: 1;
    }

}
