/* Modern ZOTAS analysis and results workspaces. */
.analysis-page,
.results-page {
    max-width: 1180px;
    padding-top: clamp(2.2rem, 5vw, 4.5rem);
    padding-bottom: clamp(2rem, 5vw, 4rem);
}

.analysis-intro,
.results-intro {
    max-width: 780px;
    margin-bottom: clamp(1.8rem, 4vw, 3rem);
}

.analysis-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.85rem;
    color: var(--app-accent, #38bdf8);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
    transition: color 0.8s ease-in-out;
}

.analysis-eyebrow-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12), 0 0 14px currentColor;
    animation: analysisPulse 2.2s ease-in-out infinite;
}

@keyframes analysisPulse {
    0%, 100% { opacity: 0.65; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.08); }
}

.analysis-lead,
.results-lead {
    max-width: 700px;
    margin: 0;
}

.analysis-workspace-card {
    position: relative;
    isolation: isolate;
    padding: clamp(1.1rem, 3vw, 2rem);
    border: 0;
    border-radius: 0;
    background-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    transition: color 0.8s ease-in-out;
}

.analysis-workspace-card::before,
.analysis-workspace-card::after {
    position: absolute;
    z-index: 0;
    inset: 0;
    content: "";
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
    will-change: opacity;
}

.analysis-workspace-card::before {
    background-color: rgba(6, 26, 36, 0.14);
    opacity: 1;
}

.analysis-workspace-card::after {
    background-color: rgba(255, 255, 255, 0.14);
    opacity: 0;
}

[data-theme="light"] .analysis-workspace-card::before {
    opacity: 0;
}

[data-theme="light"] .analysis-workspace-card::after {
    opacity: 1;
}

.analysis-workspace-card > * {
    position: relative;
    z-index: 1;
}

.analysis-file-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.85rem, 2.4vw, 1.35rem);
}

.analysis-file-card {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    border: 1px dashed rgba(125, 211, 252, 0.42);
    border-radius: 18px;
    background: rgba(2, 18, 29, 0.4);
    transition: border-color 0.8s ease-in-out,
                background 0.8s ease-in-out,
                transform 0.25s ease,
                box-shadow 0.8s ease-in-out;
}

[data-theme="light"] .analysis-file-card {
    border-color: rgba(2, 132, 199, 0.34);
    background: rgba(239, 248, 255, 0.8);
}

.analysis-file-card::after {
    position: absolute;
    right: -2.6rem;
    bottom: -3.8rem;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.16), transparent 68%);
    content: "";
    pointer-events: none;
}

.analysis-file-card:hover,
.analysis-file-card:focus-within {
    border-color: #38bdf8;
    background: rgba(6, 56, 78, 0.55);
    box-shadow: 0 12px 35px rgba(6, 182, 212, 0.13);
    transform: translateY(-2px);
}

[data-theme="light"] .analysis-file-card:hover,
[data-theme="light"] .analysis-file-card:focus-within {
    background: rgba(224, 244, 255, 0.96);
    border-color: #0284c7;
}

.analysis-file-card.file-uploaded {
    border-style: solid;
    border-color: rgba(34, 211, 238, 0.72);
    background: rgba(8, 63, 77, 0.66);
}

[data-theme="light"] .analysis-file-card.file-uploaded {
    background: rgba(219, 247, 251, 0.96);
    border-color: rgba(2, 132, 199, 0.62);
}

.analysis-file-card form {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 240px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.6rem;
    text-align: center;
}

.analysis-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    color: var(--text-primary, #fff);
    cursor: pointer;
}

.analysis-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 0.3rem;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 1.1rem;
    color: #67e8f9;
    background: rgba(6, 182, 212, 0.12);
    box-shadow: 0 8px 22px rgba(6, 182, 212, 0.14);
    font-size: 1.35rem;
    transition: transform 0.25s ease,
                background 0.8s ease-in-out,
                border-color 0.8s ease-in-out,
                box-shadow 0.8s ease-in-out,
                color 0.8s ease-in-out;
}

.analysis-file-card:hover .analysis-file-icon,
.analysis-file-card:focus-within .analysis-file-icon {
    background: rgba(6, 182, 212, 0.22);
    transform: translateY(-3px) scale(1.04);
}

.analysis-file-step {
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    color: #38bdf8;
    font-family: var(--font-hero, 'Space Grotesk', sans-serif);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.analysis-file-step small {
    color: var(--text-muted, rgba(148, 163, 184, 0.9));
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.analysis-file-label strong {
    color: var(--text-primary, #fff);
    font-family: var(--font-hero, 'Space Grotesk', sans-serif);
    font-size: clamp(1rem, 1.6vw, 1.2rem);
}

[data-theme="light"] .analysis-file-label strong { color: #0f172a; }

.analysis-file-hint {
    color: var(--text-muted, rgba(148, 163, 184, 0.85));
    font-size: 0.78rem;
}

.fileInput {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.analysis-file-name {
    min-height: 1.15rem;
    max-width: 100%;
    margin: 0.75rem 0 0;
    overflow: hidden;
    color: #67e8f9;
    font-size: 0.75rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.8s ease-in-out;
}

[data-theme="light"] .analysis-file-name { color: #0284c7; }

.analysis-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1.3rem;
    margin-top: 1.45rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    transition: border-color 0.8s ease-in-out;
}

[data-theme="light"] .analysis-controls { border-top-color: rgba(15, 23, 42, 0.1); }

.analysis-control-label {
    margin-bottom: 0.7rem;
    color: var(--text-secondary, rgba(226, 232, 240, 0.88));
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    transition: color 0.8s ease-in-out;
}

[data-theme="light"] .analysis-control-label { color: #334155; }

.analysis-radio-group { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.analysis-radio-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 180px;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    color: var(--text-primary, #fff);
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    transition: border-color 0.8s ease-in-out,
                background 0.8s ease-in-out,
                color 0.8s ease-in-out,
                box-shadow 0.8s ease-in-out,
                transform 0.22s ease;
}

[data-theme="light"] .analysis-radio-label { border-color: rgba(15, 23, 42, 0.14); color: #0f172a; background: rgba(255, 255, 255, 0.72); }
.analysis-radio-label:hover { border-color: rgba(56, 189, 248, 0.6); transform: translateY(-1px); }
.analysis-radio-label:has(.analysis-radio-input:checked) { border-color: rgba(56, 189, 248, 0.8); background: rgba(6, 182, 212, 0.14); box-shadow: 0 5px 18px rgba(6, 182, 212, 0.1); }
.analysis-radio-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.analysis-radio-mark { display: inline-flex; width: 1.05rem; height: 1.05rem; flex: 0 0 auto; align-items: center; justify-content: center; border: 1px solid rgba(148, 163, 184, 0.55); border-radius: 50%; transition: border-color 0.8s ease-in-out, background 0.8s ease-in-out, box-shadow 0.8s ease-in-out; }
.analysis-radio-input:checked + .analysis-radio-mark { border-color: #38bdf8; background: #38bdf8; box-shadow: inset 0 0 0 3px rgba(2, 18, 29, 0.7), 0 0 0 4px rgba(56, 189, 248, 0.12); }
.analysis-radio-label strong { display: block; font-size: 0.82rem; }
.analysis-radio-label small { display: block; margin-top: 0.1rem; color: var(--text-muted, rgba(148, 163, 184, 0.85)); font-size: 0.69rem; }

.analysis-submit { display: flex; min-width: 190px; flex-direction: column; align-items: stretch; gap: 0.55rem; }
.analysis-submit .btn-modern { justify-content: center; white-space: nowrap; }
.analysis-loading-message { display: none; margin: 0; color: var(--text-secondary, rgba(226, 232, 240, 0.88)); font-size: 0.76rem; text-align: center; transition: color 0.8s ease-in-out; }
.analysis-loading-widgets { display: none; align-items: center; gap: 0.6rem; }
.analysis-loading-bar-container { height: 0.35rem; flex: 1; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, 0.2); }
#loading-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #06b6d4, #2563eb); transition: width 0.2s ease; }
.analysis-spinner { width: 1rem; height: 1rem; border: 2px solid rgba(148, 163, 184, 0.3); border-top-color: #38bdf8; border-radius: 50%; animation: analysisSpin 0.8s linear infinite; }
@keyframes analysisSpin { to { transform: rotate(360deg); } }
.analysis-note { display: flex; align-items: center; justify-content: center; gap: 0.45rem; margin: 1.3rem 0 0; color: var(--text-muted, rgba(148, 163, 184, 0.82)); font-size: 0.74rem; text-align: center; transition: color 0.8s ease-in-out; }
.analysis-note i {
    color: var(--app-accent, var(--zotas-accent, #38bdf8));
    transition: color 0.8s ease-in-out;
}

/* Results presentation */
.results-main { min-height: 18rem; }
.result-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 1.5rem); }
.results-image-card { overflow: hidden; border: 1px solid rgba(56, 189, 248, 0.22); border-radius: 20px; background: rgba(6, 26, 36, 0.68); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2); }
[data-theme="light"] .results-image-card { border-color: rgba(2, 132, 199, 0.16); background: rgba(255, 255, 255, 0.84); box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07); }
.results-card-heading { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.1rem 0.9rem; }
.results-card-index { color: #38bdf8; font-family: var(--font-hero, 'Space Grotesk', sans-serif); font-size: 1.25rem; font-weight: 800; }
.results-card-heading h2 { margin: 0; color: var(--text-primary, #fff); font-family: var(--font-hero, 'Space Grotesk', sans-serif); font-size: 1rem; }
[data-theme="light"] .results-card-heading h2 { color: #0f172a; }
.results-card-heading p { overflow: hidden; margin: 0.18rem 0 0; color: var(--text-muted, rgba(148, 163, 184, 0.85)); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.results-image-container { display: flex; min-height: 230px; align-items: center; justify-content: center; padding: 0.65rem; background: rgba(2, 18, 29, 0.6); }
[data-theme="light"] .results-image-container { background: rgba(226, 241, 249, 0.66); }
.results-image-container img { display: block; max-width: 100%; max-height: 450px; height: auto; border-radius: 10px; object-fit: contain; }
.results-table-section { margin-top: clamp(1.6rem, 4vw, 2.6rem); padding: clamp(1rem, 2.3vw, 1.5rem); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 20px; background: rgba(6, 26, 36, 0.58); }
[data-theme="light"] .results-table-section { border-color: rgba(2, 132, 199, 0.15); background: rgba(255, 255, 255, 0.8); }
.results-table-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.results-table-heading .analysis-eyebrow { margin-bottom: 0.25rem; }
.results-table-heading h2 { margin: 0; color: var(--text-primary, #fff); font-family: var(--font-hero, 'Space Grotesk', sans-serif); font-size: 1.25rem; }
[data-theme="light"] .results-table-heading h2 { color: #0f172a; }
.results-table-heading .btn-modern { padding: 0.62rem 0.9rem; font-size: 0.75rem; }
.table-container { overflow-x: auto; border: 1px solid rgba(148, 163, 184, 0.15); border-radius: 12px; }
.results-table { width: 100%; min-width: 940px; border-collapse: collapse; color: var(--text-secondary, rgba(226, 232, 240, 0.88)); font-size: 0.77rem; }
.results-table th { padding: 0.85rem 0.75rem; color: #67e8f9; background: rgba(6, 182, 212, 0.1); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; text-align: left; white-space: nowrap; }
[data-theme="light"] .results-table th { color: #0369a1; background: rgba(2, 132, 199, 0.08); }
.results-table td { padding: 0.78rem 0.75rem; border-top: 1px solid rgba(148, 163, 184, 0.11); white-space: nowrap; }
[data-theme="light"] .results-table td { color: #334155; border-top-color: rgba(15, 23, 42, 0.08); }
.results-table tbody tr:hover { background: rgba(56, 189, 248, 0.06); }
.results-empty { display: flex; min-height: 300px; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; border: 1px dashed rgba(56, 189, 248, 0.3); border-radius: 20px; background: rgba(6, 26, 36, 0.48); text-align: center; }
[data-theme="light"] .results-empty { border-color: rgba(2, 132, 199, 0.24); background: rgba(255, 255, 255, 0.7); }
.results-empty-icon { display: inline-flex; width: 3.6rem; height: 3.6rem; align-items: center; justify-content: center; margin-bottom: 1rem; border-radius: 50%; color: #38bdf8; background: rgba(6, 182, 212, 0.14); font-size: 1.35rem; }
.results-empty h2 { margin: 0; color: var(--text-primary, #fff); font-family: var(--font-hero, 'Space Grotesk', sans-serif); font-size: 1.3rem; }
[data-theme="light"] .results-empty h2 { color: #0f172a; }
.results-empty p { max-width: 430px; margin: 0.65rem 0 1.25rem; color: var(--text-muted, rgba(148, 163, 184, 0.85)); font-size: 0.86rem; }

@media (max-width: 760px) {
    .analysis-page, .results-page { padding-right: 1rem; padding-left: 1rem; }
    .analysis-file-grid, .result-images { grid-template-columns: 1fr; }
    .analysis-file-card, .analysis-file-card form { min-height: 210px; }
    .analysis-controls { grid-template-columns: 1fr; align-items: stretch; }
    .analysis-submit { min-width: 0; }
    .results-table-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 460px) {
    .analysis-file-card form { padding: 1.25rem 0.9rem; }
    .analysis-radio-group { flex-direction: column; }
    .analysis-radio-label { min-width: 0; }
    .results-card-heading { padding-right: 0.8rem; padding-left: 0.8rem; }
}
