/* CSS Custom Properties for responsive max-widths */
:root {
    /* --container-max-width: min(800px, 90vw);
    --container-wide-max-width: min(1000px, 95vw);
    --container-narrow-max-width: min(600px, 85vw);
    --container-review-max-width: min(1400px, 95vw); */
    --container-padding: 20px;
    --card-padding: 20px 25px;
    --safe-area-inset: max(var(--container-padding), env(safe-area-inset-right, 20px));


    /* colors */
    --ce-grey-1: #FBFCFC;
    --ce-grey-2: #f8f9fb;
    --ce-grey-3: #F4F6F7;
    --ce-grey-4: #F1F2F5;
    --ce-grey-5: #EDEFF2;
    --ce-grey-10: #DFE1E7;
    --ce-grey-20: #C6CAD5;
    --ce-grey-30: #A9ADBF;
    --ce-grey-40: #8E90A6;
    --ce-grey-50: #73748B;
    --ce-grey-55: #6B6B81;
    --ce-grey-60: #595A6B;
    --ce-grey-70: #434351;
    --ce-grey-80: #2E2D35;
    --ce-grey-90: #1D1C21;
    --ce-grey-95: rgb(27, 26, 31);
    --ce-grey-96: rgb(25, 25, 29);
    --ce-grey-97: rgb(22, 21, 25);
    --ce-grey-98: rgb(20, 19, 23);
    --ce-grey-99: rgb(17, 16, 19);

    --ce-blue-1: #f9fcfd;
    --ce-blue-2: #f6fafd;
    --ce-blue-3: #f0f7fb;
    --ce-blue-4: #eaf3fa;
    --ce-blue-5: #e4f0f8;
    --ce-blue-10: #cee4f4;
    --ce-blue-20: #a8cfec;
    --ce-blue-30: #75b4e1;
    --ce-blue-40: #4698d3;
    --ce-blue-50: #187ac1;
    --ce-blue-55: #0b70ba;
    --ce-blue-60: #005da6;
    --ce-blue-70: #004483;
    --ce-blue-80: #002e5b;
    --ce-blue-90: #001d3b;

    --ce-red-2: #FEF5F5;
    --ce-red-5: #FCEAEA;
    --ce-red-10: #F9D9DA;
    --ce-red-20: #F4BBBD;
    --ce-red-55: #CE2C32;

    --red: #E05D61;

    --ce-green-3: #EAF9F2;
    --ce-green-5: #DBF4E9;
    --ce-green-10: #BDEAD7;
    --ce-green-20: #8AD9B8;
    --ce-green-30: #45C28F;
    --ce-green-40: #23A482;
    --ce-green-50: #018474;
    --ce-green-55: #007B6C;
    --ce-green-60: #00675B;
    --ce-green-70: #004E45;

    /* gradients */
    --blue-gradient: linear-gradient(180deg, var(--ce-blue-10) 0%, var(--ce-blue-30) 100%);
    /* --green-gradient: linear-gradient(110deg, var(--ce-green-40) 0%, var(--ce-green-55) 50%);
    --green-gradient-hover: linear-gradient(110deg, var(--ce-green-40) 0%, var(--ce-green-55) 150%); */

    /* Other colors */
    --text-color: var(--ce-grey-80);

    /* Other */
    --transition: all 0.3s ease;
    --border-radius-lg: 20px;
    --min_touch_target: 36px;
    --narrow-width: 480px;
    --video-width: 800px;
}
@media screen and (min-width: 768px){
    :root {
        --card-padding: 40px 50px;
    }
}

/* ///////////////////////////////////////////////// */
/* SHARED */
/* ///////////////////////////////////////////////// */

/* typography */
a {
    text-decoration: none;
    color: var(--ce-blue-55);
    font-weight: 500;
    transition: var(--transition);
}
small {
    font-size: 14px;
    font-weight: normal;
    color: var(--ce-grey-55);
}
ul, ol {
    margin: 0;
}
.product-name {
    font-size: 22px;
    line-height: 1.2;
}

h3 {
    color: var(--ce-grey-55);
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0.5rem;
    font-size: 1.3rem;
}

h4 {
    color: var(--ce-grey-55);
}

/* layout */
* {
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--blue-gradient);
    line-height: 1.3;
    text-align: center;
    box-sizing: border-box;
    overflow-x: hidden;
    max-width: 100vw;
    color: var(--text-color);
}
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: var(--card-padding);
    background: #fff;
    border-radius: var(--border-radius-lg);
    margin: 10px auto;
    max-width: 90dvw;
}
.card.mobile-no-card {
    border-radius: 0;
}

@media (min-width: 768px) {
    .card {
        border-radius: var(--border-radius-lg);
    }
}

/* Other shared */
/* Base button styles */
button, .button {
    background: var(--ce-green-50);
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    border: none;
    border-radius: 200px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    transition: var(--transition);
    justify-content: center;
}
button .fa, .button .fa {
    font-size: 14px;
}
button:hover, .button:hover {
    background: var(--ce-green-60);
}
button.button-blue, .button.button-blue {
    background: var(--ce-blue-50);
}
button.button-blue:hover, .button.button-blue:hover {
    background: var(--ce-blue-60);
}
button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

button[type="submit"][style*="background-color: rgb(136, 136, 136)"]:hover {
    background-color: #666666 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* consent-clarity-logo */
.consent-clarity-logo {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--ce-grey-10);
    padding-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
    align-items: center;
    gap: 13px;
    max-width: 300px;
    margin: 0 auto;
}
.consent-clarity-logo img {
    width: 50px;
}
.consent-clarity-logo .logo-text {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 4px;
}

/* footer */
footer {
    background: #000;
    display: flex;
    flex-direction: column;
    padding: 12px;
    align-items: center;
    font-size: 14px;
    opacity:.8;
}
footer a.footer-logo {
    height: 36px;
    width: auto;
    display: flex;
    padding: 0 5px 5px 5px;
    justify-content: center;
    align-items: center;
}
footer a.footer-logo img {
    height: 100%;
}
.footer-small-print {
    display: flex;
    align-items: center;
    flex-direction: column;
    color: #fff; 
}
footer ul {
    display: flex;
    list-style-type: none;
    padding-left: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
footer li {
    padding: 0;
    display: flex;
    align-items: center;
    margin-right: 5px;
}
footer a,
footer a:link,
footer a:visited,
footer a:hover {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}
footer li a {
    height: var(--min_touch_target);
    padding-right: 5px;
    display: flex;
    align-items: center;
}
footer li:after {
    content: "";
    height: 12px;
    width: 1px;
    background: var(--ce-grey-30); 
}
footer li:last-of-type {
    margin-right: 0;
}
footer li:last-of-type a { 
    padding-right: 0;
}
footer li:last-of-type:after {
    height: 0;
    width: 0;
}
@media (min-width: 576px) {
    footer {
        background: #000;
        flex-direction: row;
        display: flex;
        justify-content: space-between;
        padding: 12px 12px 5px 12px;
    }  
    .footer-small-print {
        align-items: flex-end;
    }
}


/* ///////////////////////////////////////////////// */
/* STEP-SPECIFIC STYLES */
/* ///////////////////////////////////////////////// */

/* Welcome step specific styles */
@media (min-width: 576px) {
    .welcome-step .card {
        max-width: var(--narrow-width);
    }
}
.welcome-content.card {
    flex-direction: column;
    gap: 18px;
}
/* try mdhd */
a.try-mdh {
  text-decoration: none;
  padding: 8px 20px;
  cursor: pointer;
  gap: 18px;
  color: var(--text-color);
  flex-direction: row;
}
.try-mdh-logo img {
    height: 100%;
    width: auto;
    display: block;
}
.try-mdh-message {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: left;
}
.try-mdh .fa-arrow-right {
    background: var(--ce-grey-70);
    padding: 4px;
    color: #fff;
    border-radius: 200px;
    font-size: 14px;
}
a.try-mdh:hover {
    background: var(--ce-blue-2);
    color: var(--ce-blue-55);
}
a.try-mdh:hover .fa-arrow-right {
    background: var(--ce-blue-55);
}
@media (min-width: 576px) {
  a.try-mdh {
    margin-top: 10px;
  }
}


/* Analyzing step specific styles */
.wizard-step.analyzing-step.active {
    text-align: center;
    display: flex;
    flex-direction: column-reverse;
    padding: 20px 0;
    margin: 0 auto;
}
/* .analyzing-step .right-side .card max-width was intentionally removed */
.analyzing-step iframe {
    border-radius: 6px;
    margin-bottom: 20px;
}
.video-container h3 {
    margin-bottom: 15px;
}
@media (min-width: 1200px) {
    .wizard-step.analyzing-step.active {
        flex-direction: row;
        padding: 0;
    }
    .analyzing-step .left-side {
        width: 60%;
        padding: 40px;
    }
    .analyzing-step .right-side {
        width: 40%;
        background: #fff;
    }
}


/* Review */
.cta-header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 999;
}
.cta-header .button {
    border: 2px solid #fff;
}
/* Secondary CTA styling: inverse of primary (blue) */
.button-secondary {
    background: white;
    color: var(--text-color);
}
.button-secondary:hover {
    background: var(--ce-grey-3);
}
.section-content {
    padding: 0;
    display: flex;
    flex-direction: column;
}
@media (min-width: 768px) {
    .section-content {
        padding: 0 20px;
    }
}
.analysis-container {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}
.analysis-section {
    width: 100%;
}
.analysis-section h2 {
    color: white;
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    text-align: center;
    font-size: 1.75rem;
    width: 100%;
    display: inline-block;
}
@media (min-width: 768px) {
    .analysis-section, .analysis-container {
        padding: 0;
        margin: 0;
    }
}
.general-suggestions.card {
    flex-direction: column;
    text-align: left;
    max-width: 900px;
    margin-top:0;
}
@media (max-width: 767.999px) {
    .general-suggestions.card {
        border-radius:0;
        margin: 0 0 10px 0;
    }
}
.general-suggestions h3 {
    color: var(--ce-grey-55);
    margin-top: 20px;
    margin-bottom: 0;
    padding-bottom: 0;      
    text-align: center;
    font-size: 1.3rem;
}

.suggestion-section {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin: 0;
}
.suggestions-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
}
@media (max-width: 767.999px) {
    .suggestions-grid {
        padding: 0 10px;
    }
}

.section-header h3 {
    padding-bottom: 0;
    position: absolute;
    left: 56px; /* leave space for chevron */
    right: 100px; /* leave space for status bubble */
    top: 0;
    bottom: 0;
    margin: auto;
    background: transparent !important;
    border: none !important;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    height: fit-content;
    min-height: 1.2em;
    max-width: calc(100% - 156px); /* prevent overlap */
    pointer-events: none; /* allow clicks to pass through */
}
.suggestion-content {
    padding: 0 20px 20px 20px;
    background: white;
}
@media (max-width:767.999px){
    .section-header h3 {
        font-size: 18px;
        font-weight: 500;
        justify-content: flex-start;
    }
}
@media (min-width:768px){
    .suggestion-content {
        padding: 20px;
    }
}
















































/* ///////////////////////////////////////////////// */
/* OLD CSS */
/* ///////////////////////////////////////////////// */

.upload-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: fit-content;
}

.upload-button:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Disabled state for upload button */
.upload-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Original and suggested text containers with proper styling */
.original-text, .suggested-text {
    background: #f9f9f9;
    padding: 15px;
    margin: 0;
    border-radius: 6px;
    text-align: left;
}

.original-text, .suggested-text {
    border: 1px solid #ced4da;
}

.original-text {
    border-left: 3px solid #6c757d; /* Gray vertical line */
}

.suggested-text {
    border-left: 3px solid #007bff; /* Blue vertical line */
}

/* Ensure consistent spacing after the labels in both sections */
.original-text strong, .suggested-text strong {
    display: block;
    margin-bottom: 1rem;
    color: #495057;
}

.general-suggestions .note-line {
    display: block;
}
.general-suggestions .note-line + .note-line {
    margin-top: 8px;
}

/* Properly style the document analysis and suggested improvements items */
.suggestion-item {
    padding: 1rem;
    border-radius: 6px;
    text-align: left;
    margin-bottom: 1rem;
    background: white;
    border-left: 3px solid #007bff; /* Blue vertical line */
}

/* General suggestions bulleted list with proper styling */
.general-suggestions ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Creates two equal-width columns */
    gap: 10px; 
}

.general-suggestions li {
    position: relative;
    text-align: center;
    padding: 0;
    margin: 0;
    line-height: 1.2;
    background: var(--ce-grey-4);
    padding: 4px 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.text-section, .suggestion-section {
    background: white;
}

.text-section h3 {
    color: #495057;
    margin-bottom: 0;
    font-size: 1.1em;
}

.explanation {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ced4da;
    text-align: center;
}

.explanation strong {
    display: block;
    margin-bottom: 10px;
    color: #495057;
}

/* Accept/Reject buttons container */
.suggestion-actions {
    margin-top: 20px;
    display: flex;
    justify-content: right;
    gap: 10px;
}

/* Accept/Reject buttons */
.reject-change {
    background: var(--red);
    color: white;
}
.reject-change:hover {
    background: var(--ce-red-60);
}

.actions {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.error-message {
    background: #f8f9fa;
    border: 1px solid #dc3545;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.error-message h2 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-message p {
    color: black;
}

.error-details {
    color: #666;
    font-family: monospace;
    margin-top: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.text-section p, 
.suggestion-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.text-section ul, 
.text-section ol,
.suggestion-content ul,
.suggestion-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.text-section li,
.suggestion-content li {
    margin-bottom: 0.5rem;
}

.text-section h1, .text-section h2, .text-section h3,
.suggestion-content h1, .suggestion-content h2, .suggestion-content h3 {
    margin: 1.5rem 0 1rem;
    color: #444;
}

.text-section h1,
.suggestion-content h1 {
    font-size: 1.8em;
}

.text-section h2,
.suggestion-content h2 {
    font-size: 1.5em;
}

.text-section h3,
.suggestion-content h3 {
    font-size: 1.2em;
}

.text-section strong,
.suggestion-content strong {
    color: #444;
}

.text-section em,
.suggestion-content em {
    color: #495057;
}

.text-section blockquote,
.suggestion-content blockquote {
    margin: 1rem 0;
    padding: 1rem;
    border-left: 4px solid #e9ecef;
    background: #f9f9f9;
    font-style: italic;
    color: #495057;
}

.document-content {
    text-align: left;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.document-content h1,
.document-content h2,
.document-content h3,
.document-content h4,
.document-content h5,
.document-content h6 {
    color: #444;
    margin: 1.5rem 0 1rem;
    line-height: 1.2;
}

.document-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.document-content ul,
.document-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.document-content li {
    margin-bottom: 0.5rem;
}

.document-content table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
}

.document-content th,
.document-content td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.document-content th {
    background: #f9f9f9;
}

.text-content {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.text-content p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

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

.original-text .text-content,
.suggested-text .text-content {
    padding: 0;
    background: none;
    border-radius: 0;
    border-left: none;
}

/* Content wrapper for everything except analysis */

/* Keep section headers centered */
.analysis-section h2,
.general-suggestions h3 {
    text-align: center;
}

.completion-message {
    text-align: center;
    padding: 2rem;
    background: white;
}

.completion-message h2 {
    margin-bottom: 1.5rem;
}

.completion-message p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #333;
}

/* Progress Tracking Styles */
.progress-container {
    width: 100%;
    max-width: var(--container-narrow-max-width);
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
    box-sizing: border-box;
}

/* Analysis complete styling within progress container */
.progress-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.progress-container #continueButtonInProgress {
    margin: 0 auto;
    display: block;
}

/* Section title display */
.section-analysis-display {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #444;
    font-size: 1em;
}

.analyzing-label {
    font-style: normal;
    color: #444;
}

.section-title {
    font-style: italic;
    color: #444;
}

/* Single progress bar */
.progress-bar {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    position: relative;
    background: linear-gradient(to right, #4a90e2, #63b8ff);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #4a90e2, #63b8ff);
    border-radius: 6px;
    width: 0;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px rgba(0, 80, 201, 0.8);
    position: relative;
}

/* Progress animations */
@keyframes shimmer {
    0% {
        transform: translateX(-150%);
    }
    100% {
        transform: translateX(150%);
    }
}

/* Add the shimmer effect to progress bar */
.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2.2s infinite ease-in-out;
    z-index: 1;
}

/* Timing information styles */
.timing-info {
    padding: 15px;
    background: #f9f9f9;
}

.timing-info h3 {
    margin-top: 0;
    color: #333;
}

.timing-info p {
    margin: 0;
    color: #666;
    line-height: 1.4;
}

/* Animation container styling */
#loadingAnimation {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px; /* Add space below the loading animation */
}

/* Message styling */
.message {
    text-align: center;
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 600px;
    color: #666;
    font-size: 1.1rem;
}

/* Explanation section */
.explanation {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.explanation strong {
    display: block;
    margin-bottom: 10px;
    color: #495057;
}

/* Side-by-side comparison at wider widths */
.comparison {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Strong styling for suggestion items */
.suggestion-item strong {
    font-size: 1.1em;
}

/* Diff highlighting styles */
.diff-removed {
    background-color: rgba(220, 53, 69, 0.15); /* Light red tint based on reject button */
    border-radius: 2px;
    display: inline;
}

.diff-added {
    background-color: rgba(40, 167, 69, 0.15); /* Light green tint based on accept button */
    border-radius: 2px;
    display: inline;
}

/* Ensure text content maintains proper line wrapping and spacing */
.text-content {
    word-break: break-word;
    font-family: inherit;
    line-height: 1.5;
    padding: 0;
    margin: 0;
}

/* Preserve span elements' inline behavior */
.text-content span {
    display: inline;
    white-space: pre-wrap;
}

/* Suggestion edit actions */
.suggestion-edit-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

/* Edit, Save and Revert buttons styling */
.edit-button, .save-button, .revert-button {
    background-color: #f9f9f9;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.9em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
    min-width: 90px;
    justify-content: center;
}

.edit-button {
    color: #212529;
    order: 2;
}

.edit-button i, .save-button i, .revert-button i {
    margin-right: 5px;
}

.save-button {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.revert-button {
    color: #6c757d;
    order: 1;
}

.edit-button:hover, .save-button:hover, .revert-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Suggestion editor textarea */
.suggestion-editor {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
    line-height: 1.5;
    color: #212529;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.suggestion-editor:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Upload container styling */
.upload-buttons-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: var(--container-narrow-max-width);
    box-sizing: border-box;
    flex-wrap: wrap;
}

/* File name display */
.file-name-display {
    flex: 1;
    min-width: 0; /* Allow flex item to shrink below content size */
    text-align: left;
    color: #555;
    font-size: 0.9em;
    margin-right: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure both containers have the same width */
.upload-buttons-container,
.progress-container {
    width: 100%;
    max-width: var(--container-narrow-max-width);
    margin: 20px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
    box-sizing: border-box;
}

/* Progress section styling */
#progressSection {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Container styles shared between upload and progress */
.upload-buttons-container,
.progress-container {
    width: 100%;
    max-width: var(--container-narrow-max-width);
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); */
    box-sizing: border-box;
}

/* Remove old loading animation styles */

/* CSS for video container and analysis complete container */
.video-container {
    display: none;
}

.analysis-complete-container {
    display: none;
    margin: 0px;
    width: 100%;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.analysis-complete-text {
    color: #444;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.analysis-complete-container .upload-buttons-container {
    background: white;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* Wizard steps - with transitions */
.wizard-step {
    display: none;
    width: 100%;
    margin: 20px auto;
    position: relative;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.wizard-step.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

.wizard-step.welcome-step {
    margin-top: 25vh;
}

.wizard-step.analyzing-step {
    flex: 1;
    margin-bottom: 0;
}

.wizard-step.review-step {
    margin-top: 0vh;
    margin-bottom: 0;
    padding-top:60px;
}
@media (min-widtH:768px){
    .wizard-step.review-step {
        padding-top: 80px;
    }
}

/* Try MyDataHelps button */
.try-mydatahelps {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: #007bff;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.try-mydatahelps:hover {
    background: #ebebeb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #0056b3;
}


/* Review step specific styles */
.review-step {
    text-align: left;
}

.step-title {
    position: relative;
    text-align: left;
    color: white;
    font-size: 2em;
    font-weight: bold;
    margin: -10px 0 20px 0; /* Base for >1199px screens */
    z-index: 1;
    display: none; /* Hidden by default, shown by JS */
}

.analyzing-step {
    text-align: center;
}

/* Section Header Layout - Ensure horizontal alignment */
.section-header {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 15px;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-sizing: border-box;
    min-height: 56px; /* Ensure enough height for wrapping */
}

.section-header:hover {
    background-color: var(--ce-blue-2);
}

.section-header:hover .toggle-icon {
    color: #000;
}

.header-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    max-width: 80%;
    min-width: 0;
}


.toggle-icon {
    margin-right: 15px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
    font-size: 16px;
}

.status-bubble {
    margin-left: 15px;
    flex-shrink: 0;
    min-width: 80px;
    text-align: center;
    border-radius: 200px;
    padding: 4px 8px;
}

/* Rotate 90 degrees clockwise when expanded */
.suggestion-section:not(.collapsed) .toggle-icon {
    transform: rotate(90deg);
}

/* Default is collapsed, no transform needed */
.suggestion-section.collapsed .toggle-icon {
    transform: rotate(0deg);
}

/* Remove hover effect from title */
.section-header:hover h3 {
    color: #444; /* Keep the same color on hover */
}

.status-pending {
    background-color: var(--ce-blue-4);
    color: var(--ce-blue-55);
}

.status-accepted {
    background-color:  var(--ce-green-3);
    color: var(--ce-green-55);
}

.status-rejected {
    background-color:  var(--ce-red-2);
    color: var(--ce-red-55);
}

/* Completion message styles */
.completion-message {
    background-color: #f1f8e9;
    border: 1px solid #81c784;
    border-radius: 5px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.completion-message h2 {
    color: #2e7d32;
    margin-top: 0;
}

.completion-message p {
    color: #333;
    font-size: 1.1rem;
}

/* Floating Download Button for Review Step */
/* Apply this class to the specific download button in the review step (e.g., <button class="action-button review-download-button-floating">Download consent</button>) */
.fa-download {
    margin-right: 5px;
}

.review-download-button-floating { display: inline-flex; }


/* Hover styling not needed for deprecated floating button */

.review-download-button-docked {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    left: auto !important;
    z-index: auto !important;
    margin: 30px auto 70px auto !important; 
    width: auto; 
    min-width: 280px; 
    max-width: 90%;
    padding: 15px 30px !important; 
    font-size: 1.4em !important; 
    font-weight: bold !important;
    border-radius: 200px !important;
    border: 2px solid #fff;
    color: white !important;
    text-align: center;
    text-decoration: none;
}

.review-download-button-docked:hover {
    color: white !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Diff highlighting styles */
.review-download-button-floating .button-content,
.review-download-button-docked .button-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.smog-score {
    font-size: 0.75em;
    font-weight: normal;
    margin-bottom: 4px;
}

.review-download-button-docked .smog-score {
    color: white;
}

.download-text {
    font-size: 1em;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.smog-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px auto;
}

.smog-card {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    width: 130px;
    max-width: 100%;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.smog-card.best-true {
    background: var(--ce-green-3);
    border: 1px solid var(--ce-green-20);
    color: var(--ce-green-40);
}

.smog-card.best-false {
    background: var(--ce-red-2);
    border: 1px solid var(--ce-red-20);
    color: var(--red);
}

.smog-card h4 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.smog-card p {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
}

/* Responsive breakpoints */
@media screen and (min-width: 1200px) {
    :root {
        --container-max-width: 1000px;
        --container-wide-max-width: 1200px;
        --container-narrow-max-width: 800px;
        --container-review-max-width: 1400px;
        --container-padding: 30px;
    }
}

@media screen and (min-width: 1200px) {
    .step-title {
        margin-top: 0px !important;
    }

    .try-mydatahelps {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .comparison {
        flex-direction: row;
        align-items: stretch;
        margin-bottom: 20px;
    }
    
    .explanation {
        margin: 20px auto;
    }

    .original-text, .suggested-text {
        flex: 1;
        margin: 0;
        display: flex;
        flex-direction: column;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
    
    .original-text {
        margin-right: 10px;
    }
    
    .suggested-text {
        margin-left: 10px;
    }
    
    .text-content {
        flex: 1;
        overflow-y: auto;
        padding: 10px;
    }
}

@media screen and (max-width: 768px) {
    .upload-buttons-container,
    .progress-container {
        padding: 15px;
        margin: 15px auto;
    }

    .file-name-display {
        flex: 1 1 100%; /* Stack on small screens */
        margin-right: 0;
        margin-bottom: 10px;
    }

    .browse-button,
    .upload-button {
        flex: 1; /* Allow buttons to grow */
        min-width: auto;
    }

    .welcome-content {
        flex-direction: column;
        gap: 20px;
    }

    .welcome-image {
        max-width: 100%;
    }

    .welcome-text {
        padding-right: 0;
        text-align: center;
    }

    .welcome-text h1, .welcome-text form {
        text-align: center !important;
    }
}

@media screen and (max-width: 600px) {
    h1, .step-title {
        font-size: 1.5em !important;
        margin-top: 5px !important;
    }

    .step-title {
        text-align: center;
    }

    .try-mydatahelps {
        padding: 8px 12px;
        font-size: 0.9em;
        position: unset;
    }
}

@media screen and (max-height: 1049px) {
    .wizard-step.welcome-step {
        margin-top: 3vh;
    }
    .wizard-step.analyzing-step {
        margin-top: 0vh;
    }
}