/* Scanner-Specific Styles */

/* Inherits variables from main.css: --color-primary, --color-accent, --color-light-grey, etc. */

/* Match strict site container width from main.css to ensure alignment */
.scan-card-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Allow the long title to wrap on smaller screens */
.scan-card-container h1,
.page-header .scan-card-container h1 {
    /* Font size inherited from .page-header h1 in main.css (2.25rem) */
    white-space: normal;
    word-break: break-word;
}

/* Center the sub-header paragraph */
.page-header .scan-card-container p {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
    margin-top: 1rem;
    font-size: 1.125rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: var(--color-white);
    color: var(--color-text);
    font-size: 1rem;
    min-width: 250px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(10, 42, 78, 0.2);
}

.input-group button {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.status-container {
    text-align: center;
    padding: 0;
    /* Removed padding to fix gap size */
    margin: 4rem 0;
    /* Standardized gap */
}

.spinner {
    border: 4px solid var(--color-light-grey);
    border-top: 4px solid var(--color-accent);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}

#report-content {
    margin: 4rem 0;
    /* Standardized gap */
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Inner constraints to keep body content readable while Header is wide */
.scan-card-container>.service-card,
.scan-card-container>.info-section,
.scan-card-container>.disclaimer,
.scan-card-container>#status-container,
.scan-card-container>#report-content {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Reduce gap above Scan Target box (Default .section has 4rem or 6rem padding) */
section.section {
    padding-top: 4rem;
}

/* Increase gap below Scan Target box */
.scan-card-container>.service-card {
    margin-bottom: 4rem;
}

/* Info Section Styling (Overrides/Specifics) */
.info-section {
    margin-top: 0;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

/* Ensure text fills the 800px container instead of 75ch limit */
.info-section p {
    max-width: 100%;
}

.info-section h2 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.info-section h3 {
    margin-top: 2rem;
    color: var(--color-primary);
    font-size: 1.25rem;
}

.disclaimer {
    margin-top: 3rem;
    /* Spacing handled by margin-top above */
    font-size: 0.875rem;
    color: #666;
    background-color: var(--color-light-grey);
    padding: 2rem;
    border-radius: 8px;
}

.disclaimer h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
}

.disclaimer ul {
    margin-bottom: 0;
}

/* CTA Card Specifics */
.cta-card {
    border: 2px solid var(--color-accent);
    background-color: rgba(0, 191, 165, 0.05);
    /* Light accent tint */
    text-align: center;
    /* Margin top handled by generic selector if needed, but explicit here is fine */
    margin-top: 3rem;
}

.cta-card h2,
.cta-card h3 {
    color: var(--color-primary);
    /* Changed to Primary Blue to match other page headers */
}

/* Generated Report Content Styling */
#report-content h3 {
    text-align: center;
}

#report-content h4 {
    font-size: 1.25rem;
    /* Matches 'What This Assessment Covers' */
    color: var(--color-primary);
    margin-top: 1rem;
    margin-bottom: 1rem;
}

#report-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    border: 1px solid #e0e0e0;
    /* Forces full frame around table */
}

#report-content th,
#report-content td {
    padding: 1rem;
    border: 1px solid #e0e0e0;
    /* Applied to all sides to override any default black column separators */
    text-align: left;
}

#report-content th {
    background-color: var(--color-light-grey);
    font-weight: 700;
    color: var(--color-primary);
}

/* Disabled Button State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #cccccc !important;
    border-color: #cccccc !important;
    color: #666666 !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Bold Status Messages (Progress, Error, Success) */
#status-container .service-card p {
    font-weight: 700;
}

/* Light Blue Background for Status and Results (Blue Tint, Lighter, Thicker Border) */
#status-container .service-card,
#report-content .service-card {
    background-color: rgba(0, 110, 255, 0.04);
    border: 2px solid rgba(0, 110, 255, 0.5);
    /* Thicker and darker border */
}

/* Input/Scan Box specific style - Thicker Grey Border */
.scan-card-container>.service-card:not(.cta-card) {
    border: 2px solid #cccccc;
    /* Darker and thicker than default #e0e0e0 */
}

/* Disable Hover Effect for Status and Report (Read-Only Content) */
#status-container .service-card:hover,
#report-content .service-card:hover {
    transform: none;
    box-shadow: none;
    /* or keep default shadow, but remove hover expansion */
}

/* Circular Progress Timer */
.circular-chart {
    display: block;
    margin: 10px auto;
    max-width: 100px;
    max-height: 100px;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 8;
}

.circle {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 8;
    stroke-linecap: round;
    /* Circumference for r=40 is ~251.327 */
    stroke-dasharray: 251.327;
    stroke-dashoffset: 251.327;
    /* Starts empty */
    transition: stroke-dashoffset 1s linear;
    /* Smooth fill */
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
    /* Start from the top */
}

.percentage {
    fill: var(--color-text);
    /* Matches standard dark paragraph text instead of primary blue */
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 24px;
    text-anchor: middle;
    alignment-baseline: central;
    dominant-baseline: central;
    /* Centers text vertically */
}

/* Turnstile Responsive Alignment */
.turnstile-container {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

@media (min-width: 768px) {
    .turnstile-container {
        justify-content: flex-start;
    }
}