/* navigator/static/css/style.css */

*,
*::before,
*::after {
    box-sizing: border-box;
}
/* --- Variable Definitions --- */
:root {
    --primary-color: #197fe5;
    --secondary-color: #e2e8f0;
    --background-color: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-on-primary: #ffffff;
}
:root {
    /* ... existing variables ... */
    --success-color: #16a34a;
    --success-surface-color: #f0fdf4;
    --destructive-color: #dc2626;
    --destructive-surface-color: #fef2f2;
}

/* --- Base Styles --- */
body {
    font-family: 'Public Sans', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1280px; /* Corresponds to container mx-auto */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;  /* 16px */
    padding-right: 1rem; /* 16px */
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem; /* 24px */
        padding-right: 1.5rem; /* 24px */
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem; /* 32px */
        padding-right: 2rem; /* 32px */
    }
}


/* --- Header Block --- */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    background-color: rgba(248, 250, 252, 0.8); /* background-color with opacity */
    backdrop-filter: blur(4px);
}

.header__container {
    display: flex;
    height: 4rem; /* 64px */
    align-items: center;
    justify-content: space-between;
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 1rem; /* 16px */
}

.header__logo {
    height: 2rem; /* 32px */
    width: 2rem; /* 32px */
    color: var(--primary-color);
}

.header__title {
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
}

.header__nav {
    display: none; /* Hidden by default */
}

@media (min-width: 768px) {
    .header__nav {
        display: flex;
        align-items: center;
        gap: 2rem; /* 32px */
    }
}

.header__nav-link {
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.header__nav-link:hover {
    color: var(--primary-color);
}

.header__cta {
    display: none;
}

@media (min-width: 768px) {
    .header__cta {
        display: inline-flex;
    }
}

.header__mobile-menu-button {
    display: block;
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .header__mobile-menu-button {
        display: none;
    }
}

/* --- Button Component --- */
.button {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem; /* 6px */
    padding: 0 1rem; /* 16px */
    font-weight: 700;
    border: none;
    transition: all 0.2s ease-in-out;
    height: 3rem;
    text-decoration: none;
}

.button--primary {
    background-color: var(--primary-color);
    color: var(--text-on-primary);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.button--primary:hover {
    background-color: #2563eb; /* A darker blue */
}

.button--header {
    height: 2.5rem; /* 40px */
    font-size: 0.875rem; /* 14px */
}

.button--hero {
    height: 3rem; /* 48px */
    padding: 0 1.5rem; /* 24px */
    font-size: 1rem; /* 16px */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.button--hero:hover {
    transform: scale(1.05);
}


/* --- Main Content --- */
.main-content {
    flex-grow: 1;
}

/* --- Hero Section Block --- */
.hero {
    padding-top: 5rem;    /* 80px */
    padding-bottom: 5rem; /* 80px */
}

@media (min-width: 768px) {
    .hero {
        padding-top: 8rem;    /* 128px */
        padding-bottom: 8rem; /* 128px */
    }
}

.hero__content {
    max-width: 56rem; /* 896px */
    margin: 0 auto;
    text-align: center;
}

.hero__title {
    font-size: 2.25rem; /* 36px */
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

@media (min-width: 640px) {
    .hero__title {
        font-size: 3rem; /* 48px */
    }
}
@media (min-width: 768px) {
    .hero__title {
        font-size: 3.75rem; /* 60px */
    }
}

.hero__subtitle {
    margin-top: 1rem; /* 16px */
    max-width: 42rem; /* 672px */
    margin-left: auto;
    margin-right: auto;
    font-size: 1.125rem; /* 18px */
    color: var(--text-secondary);
}

@media (min-width: 640px) {
    .hero__subtitle {
        font-size: 1.25rem; /* 20px */
    }
}

.hero__cta-container {
    margin-top: 2rem; /* 32px */
    display: flex;
    justify-content: center;
}

/* --- How-It-Works Section Block --- */
.how-it-works {
    padding-top: 5rem;    /* 80px */
    padding-bottom: 5rem; /* 80px */
    background-color: white;
    border-radius: 1rem; /* 16px */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
    .how-it-works {
        padding-top: 6rem;    /* 96px */
        padding-bottom: 6rem; /* 96px */
    }
}

.how-it-works__container {
    max-width: 64rem; /* 1024px */
    margin: 0 auto;
}

.how-it-works__title {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.025em;
}

@media (min-width: 640px) {
    .how-it-works__title {
        font-size: 2.25rem; /* 36px */
    }
}

.how-it-works__steps-container {
    margin-top: 3rem; /* 48px */
    position: relative;
}

.how-it-works__timeline {
    display: none;
}

@media (min-width: 768px) {
    .how-it-works__timeline {
        display: block;
        position: absolute;
        left: 50%;
        top: 1rem;
        bottom: 1rem;
        width: 1px;
        background-color: var(--secondary-color);
    }
}

.how-it-works__steps-grid {
    display: grid;
    gap: 3rem; /* 48px */
}

@media (min-width: 768px) {
    .how-it-works__steps-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem; /* 32px */
    }
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3rem; /* 48px */
    width: 3rem; /* 48px */
    border-radius: 9999px; /* full circle */
    background-color: var(--primary-color);
    color: var(--text-on-primary);
    margin-bottom: 1rem; /* 16px */
    z-index: 10;
    border: 8px solid var(--background-color);
}

.step__number {
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
}

.step__title {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    color: var(--text-primary);
}

.step__description {
    margin-top: 0.25rem; /* 4px */
    font-size: 0.875rem; /* 14px */
    color: var(--text-secondary);
}


/* --- Footer Block --- */
.footer {
    padding-top: 2rem; /* 32px */
    padding-bottom: 2rem; /* 32px */
    margin-top: 6rem; /* 96px */
}

.footer__text {
    text-align: center;
    font-size: 0.75rem; /* 12px */
    color: var(--text-secondary);
}

/* --- Quiz Page --- */
.quiz-container {
    max-width: 42rem; /* 672px */
    margin: 3rem auto;
}

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

.quiz-header__title {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
}

@media (min-width: 640px) {
    .quiz-header__title {
        font-size: 2.25rem; /* 36px */
    }
}

.quiz-header__subtitle {
    margin-top: 0.75rem; /* 12px */
    font-size: 1.125rem; /* 18px */
    color: var(--text-secondary);
}

.quiz-card {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.5rem; /* 8px */
    padding: 1.5rem; /* 24px */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

@media (min-width: 640px) {
    .quiz-card {
        padding: 2rem; /* 32px */
    }
}

.quiz-question__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.quiz-question__title {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
}

.quiz-question__text {
    font-size: 1rem; /* 16px */
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.quiz-question__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .quiz-question__actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

.button-quiz {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem; /* 8px */
    border: 1px solid var(--secondary-color);
    background-color: white;
    padding: 0.75rem 1rem; /* 12px 16px */
    font-size: 1rem; /* 16px */
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.button-quiz:hover {
    background-color: #f0f9ff; /* A light blue */
    border-color: var(--primary-color);
}


/* --- Result Page --- */
.result-container {
    max-width: 42rem; /* 672px */
    margin: 4rem auto;
    text-align: center;
}

.result-container__title {
    font-size: 2rem;
    font-weight: 700;
    color: #16a34a; /* Green for success */
}

.result-container__title--danger {
    color: #dc2626; /* Red for danger/ineligible */
}

.result-container__text {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.result-container__reason {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #fef2f2; /* Light red background */
    color: #991b1b; /* Darker red text */
    border: 1px solid #fecaca; /* Red border */
    border-radius: 0.5rem;
    font-weight: 500;
}

.result-container__cta {
    margin-top: 2rem;
}

.button--secondary {
    background-color: var(--secondary-color);
    color: var(--text-primary);
}

.button--secondary:hover {
    background-color: #d1d5db; /* A darker gray */
}

/* --- Form Wizard --- */
.form-wizard {
    max-width: 48rem; /* 768px */
    margin: 3rem auto;
}

.form-wizard__header {
    text-align: center;
    margin-bottom: 3rem;
}

.form-wizard__title {
    font-size: 2.25rem; /* 36px */
    font-weight: 800;
}

.form-wizard__subtitle {
    margin-top: 1rem;
    font-size: 1.125rem; /* 18px */
    color: var(--text-secondary);
}

.form-wizard__form {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem; /* 12px */
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

.form-wizard__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--secondary-color);
}


/* --- Progress Bar --- */
.progress-bar {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.progress-bar__step {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--secondary-color);
    border-radius: 9999px; /* pill shape */
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.progress-bar__step--active {
    color: var(--text-on-primary);
    background-color: var(--primary-color);
    font-weight: 700;
}

.progress-bar__step--complete {
    color: var(--primary-color);
    background-color: #dbeafe; /* Lighter primary color */
    border-color: var(--primary-color);
}


/* --- Form Elements --- */
.form-section {
    margin-bottom: 2rem;
}

.form-section__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-section__description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem; /* 14px */
    font-weight: 600;
}

.form-input,
textarea,
select,
input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"] {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem; /* 6px */
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-input:focus,
textarea:focus,
select:focus,
input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(25, 127, 229, 0.25);
}

.form-input--prefix-wrapper {
    position: relative;
    display: flex
;
    align-items: center;
}

.form-input--prefix-wrapper span {
    position: absolute;
    inset-y: 0;
    display: flex;           /* Add this line */
    align-items: center;
    left: 0;
    padding-left: 0.75rem;
    color: var(--text-secondary);
}

.form-input--prefix-wrapper input {
    padding-left: 2rem; /* Make space for the prefix */
}

/* --- Preview Page --- */
.preview-page {
    margin: 3rem 0;
}

.preview-page__header {
    text-align: center;
    margin-bottom: 3rem;
}

.preview-page__title {
    font-size: 2.25rem;
    font-weight: 800;
}

.preview-page__subtitle {
    margin-top: 1rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.preview-page__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .preview-page__layout {
        grid-template-columns: 2fr 1fr;
    }
}

/* --- Letter Preview Card --- */
.letter-preview {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
}

.letter-preview__header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--secondary-color);
}

.letter-preview__title {
    font-size: 1.125rem;
    font-weight: 600;
}

.letter-preview__body {
    padding: 1rem;
}

@media (min-width: 640px) {
    .letter-preview__body {
        padding: 1.5rem;
    }
}

.letter-preview__textarea {
    width: 100%;
    border: 1px solid #d1d5db;
    background-color: #f9fafb; /* Lighter grey */
    padding: 1rem;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    border-radius: 0.5rem;
    resize: vertical;
}

.letter-preview__textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(25, 127, 229, 0.25);
    outline: none;
}

/* --- Actions Sidebar --- */
.preview-page__sidebar {
    position: sticky;
    top: 6rem; /* Align below sticky header */
}

.actions-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.action-card {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
}

.action-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.action-card__text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.action-card__buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-card__buttons .button {
    width: 100%;
}

.action-card--note {
    background-color: #fefce8; /* Light yellow */
    border-color: #facc15; /* Yellow */
}

/* --- Document Preview Component --- */
.document-preview {
    background-color: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 2rem 2.5rem;
    border-radius: 0.25rem;
}

@media (max-width: 640px) {
    .document-preview {
        padding: 1rem 1.25rem;
    }
}

.document-preview__header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 1rem;
}

.document-preview__logo {
    max-width: 17rem; /* Control logo size */
    height: auto;
    margin: 0 auto 1rem auto;
    display: block;
}

.document-preview__title {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.document-preview__subtitle {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Fixing the "unstyled" textarea --- */
.letter-preview__textarea {
    /* Change font to look like a document, not code */
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1rem;
    line-height: 1.7;

    /* Make it blend in with the background */
    border: none;
    background-color: transparent;
    box-shadow: none;
    resize: none; /* Disable resizing to maintain document look */
    padding: 0;
}

.letter-preview__textarea:focus {
    /* Remove the default focus ring inside the document */
    outline: none;
    box-shadow: none;
}

.document-preview__footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #d1d5db;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Remove the old card styles now that we have the document view */
.letter-preview {
    background-color: transparent;
    border: none;
    box-shadow: none;
}

.letter-preview__header,
.letter-preview__body {
    padding: 0;
    border: none;
}

.progress-bar__step {
    /* ... existing styles ... */
    cursor: pointer; /* Default cursor for clickable items */
}

.progress-bar__step--active {
    color: var(--text-on-primary);
    background-color: var(--primary-color);
    font-weight: 700;
    border-color: var(--primary-color);
}

.progress-bar__step--complete {
    color: var(--primary-color);
    background-color: #dbeafe; /* Lighter primary color */
    border-color: var(--primary-color);
    text-decoration: none; /* Remove underline from links */
}
.progress-bar__step--complete:hover {
    background-color: #bfdbfe; /* Slightly darker on hover */
}

.progress-bar__step--disabled {
    color: var(--text-secondary);
    background-color: #e2e8f0; /* Grey for disabled */
    cursor: not-allowed;
    border-color: transparent;
}

.document-preview__text {
font-family: Georgia, 'Times New Roman', Times, serif;
font-size: 1rem;
line-height: 1.7;
color: var(--text-primary);
white-space: pre-wrap; 
word-wrap: break-word;
}

/* --- Finalize Page --- */
.finalize-page {
    max-width: 42rem;
    margin: 3rem auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.finalize-page__header {
    text-align: center;
}

.finalize-page__title {
    font-size: 2.25rem;
    font-weight: 800;
}

.finalize-page__subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.action-card__text--small {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* --- Signature Pad --- */
.signature-pad {
    border: 2px dashed var(--secondary-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.signature-pad__canvas {
    width: 100%;
    height: 200px;
    cursor: crosshair;
    display: block;
    border-radius: 0.5rem;
}

.signature-pad__actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* --- Waiting Period Page --- */
.waiting-page {
    max-width: 48rem;
    margin: 3rem auto;
}

.waiting-page__header {
    text-align: center;
    margin-bottom: 3rem;
}

.waiting-page__title {
    font-size: 2.25rem;
    font-weight: 800;
}

.waiting-page__subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.waiting-page__card {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.waiting-page__card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.waiting-page__card-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.waiting-page__card-text--important {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fefce8;
    border-left: 4px solid #facc15;
    color: var(--text-primary);
}

.waiting-page__list {
    list-style-position: inside;
    margin: 1rem 0;
    color: var(--text-secondary);
}

.waiting-page__list li {
    margin-bottom: 0.5rem;
}

.waiting-page__footer {
    text-align: center;
    margin-top: 3rem;
}

.waiting-page__footer-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;}


/* --- Info Page --- */
.info-page {
    max-width: 48rem;
    margin: 3rem auto;
}

.info-page__header {
    text-align: center;
    margin-bottom: 3rem;
}

.info-page__title {
    font-size: 2.25rem;
    font-weight: 800;
}

.info-page__subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.info-page__card {
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.info-page__card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.info-page__card-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.info-page__card-text--important {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fefce8;
    border-left: 4px solid #facc15;
    color: var(--text-primary);
}

.info-page__actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .info-page__actions {
        flex-direction: row;
        justify-content: center;
    }
}

.form-field__warning {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background-color: #fefce8; /* Light yellow */
    color: #a16207; /* Dark yellow text */
    border: 1px solid #facc15; /* Yellow border */
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* --- Page Wrapper --- */
.page-wrapper {
    width: 100%;
}

.page-wrapper--centered {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}


/* --- Result Card --- */
.result-card {
    width: 100%;
    max-width: 32rem; /* 512px */
    background-color: white;
    border: 1px solid var(--secondary-color);
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .result-card {
        padding: 3rem;
    }
}

.result-card__icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 4rem; /* 64px */
    width: 4rem; /* 64px */
    border-radius: 9999px; /* full circle */
    margin-bottom: 1.5rem;
}

.result-card__icon-wrapper--success {
    background-color: var(--success-surface-color);
    color: var(--success-color);
}

.result-card__icon-wrapper--destructive {
    background-color: var(--destructive-surface-color);
    color: var(--destructive-color);
}

.result-card__title {
    font-size: 1.875rem; /* 30px */
    font-weight: 700;
    margin-bottom: 1rem;
}

.result-card__subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.result-card__details-box {
    text-align: left;
    background-color: #f8fafc; /* light grey */
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--secondary-color);
}

.result-card__details-box--success {
    background-color: var(--success-surface-color);
    border-color: var(--success-color);
}

.result-card__details-text {
    color: var(--text-secondary);
    font-size: 0.875rem; /* 14px */
    line-height: 1.5;
}

.result-card__details-text strong {
    color: var(--text-primary);
}

.result-card__action .button {
    width: 100%;
    max-width: 20rem; /* 320px */
}

/* --- Document Preview Component --- */

.document-preview__address-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem; /* Space between the two blocks */
    margin-bottom: 2rem;
}

.document-preview__address-block {
    flex: 1; /* Each block will take up equal space */
}

/* This is just for semantic clarity, no specific styles needed for --to or --from */
.document-preview__address-block--to { }
.document-preview__address-block--from { }

.document-preview__main-content {
    padding-top: 1rem;
    border-top: 1px solid var(--secondary-color);
}

/* Update the existing text style for better readability */
.document-preview__text {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 0.9rem; /* Slightly smaller for document feel */
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}
.document-preview__text strong {
    font-weight: 700;
}

/* --- Page Layout --- */
.worksheet-container {
    max-width: 56rem; /* 896px, equivalent to max-w-4xl */
    margin: 0 auto;
    padding: 3rem 1rem; /* py-12 px-4 */
    font-family: 'Inter', sans-serif;
    color: #1f2937; /* text-gray-800 */
    background-color: #f9fafb; /* bg-gray-50 */
}

.worksheet-header {
    text-align: center;
    margin-bottom: 3rem; /* mb-12 */
}

.worksheet-header__title {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700; /* font-bold */
    color: #111827; /* text-gray-900 */
    margin-bottom: 0.5rem; /* mb-2 */
}

.worksheet-header__subtitle {
    font-size: 1.125rem; /* text-lg */
    color: #4b5563; /* text-gray-600 */
}

.worksheet-form-card {
    background-color: #ffffff;
    padding: 2rem; /* p-8 */
    border-radius: 1rem; /* rounded-2xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
}

/* --- Form Structure --- */
.worksheet-form__section {
    margin-bottom: 2.5rem; /* space-y-10 on form */
}

.worksheet-form__section-title {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 600; /* font-semibold */
    color: #111827; /* text-gray-900 */
    margin-bottom: 1.5rem; /* mb-6 */
    border-bottom: 1px solid #e5e7eb; /* border-b */
    padding-bottom: 1rem; /* pb-4 */
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem; /* gap-6 */
}

@media (min-width: 768px) { /* md:grid-cols-2 */
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-fieldset {
    border: 1px solid #e5e7eb; /* border-gray-200 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 1rem; /* p-4 */
}

.form-fieldset__legend {
    font-size: 1rem; /* text-base */
    font-weight: 500; /* font-medium */
    color: #111827; /* text-gray-900 */
    padding: 0 0.5rem; /* px-2 */
}

/* --- Readonly Info Display --- */
.readonly-group {
    padding: 1rem; /* p-4 */
    background-color: #f9fafb; /* bg-gray-50 */
    border-radius: 0.5rem; /* rounded-lg */
    border: 1px solid #e5e7eb; /* border-gray-200 */
    margin-bottom: 1rem;
}

.readonly-group__label {
    display: block;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    color: #6b7280; /* text-gray-500 */
    margin-bottom: 0.25rem; /* mb-1 */
}

.readonly-group__text {
    font-size: 1rem; /* text-base */
    font-weight: 500; /* font-medium */
    color: #111827; /* text-gray-900 */
    line-height: 1.5;
}


/* --- Form Elements --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    color: #374151; /* text-gray-700 */
    margin-bottom: 0.25rem; /* mb-1 */
}

.form-help-text {
    font-size: 0.875rem; /* text-sm */
    color: #6b7280; /* text-gray-500 */
    margin-bottom: 0.5rem; /* mb-2 */
}

/* Base styles for textareas and selects */
.worksheet-form textarea,
.worksheet-form select {
    width: 100%;
    padding: 0.75rem 1rem; /* p-3 / p-4 equivalent */
    background-color: #f9fafb; /* bg-gray-50 */
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.5rem; /* rounded-lg */
    transition: all 0.2s ease-in-out;
}

.worksheet-form textarea:focus,
.worksheet-form select:focus {
    outline: none;
    border-color: #4f46e5; /* focus:border-indigo-500 */
    box-shadow: 0 0 0 2px #c7d2fe; /* focus:ring-2 focus:ring-indigo-500/50 */
}

.worksheet-form__footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1.5rem; /* pt-6 */
    border-top: 1px solid #e5e7eb; /* border-t */
    margin-top: 2.5rem; /* mt-10 */
}

/* ==========================================================================
   Next Steps Page (New Design)
   ========================================================================== */

/* --- First, remove the old styles --- */
/* You can now safely delete these entire blocks from your CSS file:
.waiting-page { ... }
.waiting-page__header { ... }
.waiting-page__title { ... }
.waiting-page__subtitle { ... }
.waiting-page__card { ... }
.waiting-page__card-title { ... }
.waiting-page__card-text { ... }
.waiting-page__card-text--important { ... }
.waiting-page__list { ... }
.waiting-page__footer { ... }
.waiting-page__footer-text { ... }
*/


/* --- Container and Header --- */
.next-steps-container {
    max-width: 56rem; /* 896px */
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.next-steps-header {
    text-align: center;
    margin-bottom: 3rem; /* mb-12 */
}

.next-steps-header__title {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700; /* font-bold */
    color: #334155; /* text-gray-800 */
    margin-bottom: 1rem; /* mb-4 */
}

.next-steps-header__subtitle {
    font-size: 1.125rem; /* text-lg */
    color: #475569; /* text-gray-600 */
}

/* --- Content Area --- */
.next-steps-content {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* space-y-8 */
}

/* --- Step Card Component --- */
.step-card {
    background-color: #ffffff;
    padding: 2rem; /* p-8 */
    border-radius: 1rem; /* rounded-2xl */
    border: 1px solid #e2e8f0; /* border-gray-200 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
}

.step-card__inner {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem; /* space-x-6 */
}

.step-card__icon-wrapper {
    flex-shrink: 0;
    height: 3rem; /* h-12 */
    width: 3rem; /* w-12 */
    border-radius: 9999px; /* rounded-full */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #dbeafe; /* bg-blue-100 */
    color: #2563eb; /* text-blue-600 */
}

.step-card__content {
    flex-grow: 1;
}

.step-card__title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600; /* font-semibold */
    color: #334155; /* text-gray-800 */
    margin-bottom: 0.75rem; /* mb-3 */
}

.step-card__text {
    color: #475569; /* text-gray-600 */
    margin-bottom: 1.5rem; /* mb-4 and mb-6 */
    line-height: 1.6;
}

.step-card__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* space-y-3 */
}

.step-card__list-item {
    display: flex;
    align-items: flex-start;
}

.step-card__list-item .material-icons {
    color: #94a3b8; /* text-gray-400 */
    margin-right: 0.75rem; /* mr-3 */
    margin-top: 0.25rem; /* mt-1 */
}

.step-card__list-item span {
    color: #475569; /* text-gray-600 */
}

.step-card__list-strong {
    font-weight: 500; /* font-medium */
    color: #374151; /* text-gray-700 */
}

.step-card__link {
    color: #2563eb; /* text-blue-600 */
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}

.step-card__link:hover {
    color: #1d4ed8; /* darker blue */
}

/* Ensure the button in the last card matches the design */
.step-card .button--primary {
    background-color: #2563eb; /* bg-blue-600 */
    padding: 0.75rem 1.5rem; /* py-3 px-6 */
    font-weight: 500; /* font-medium */
    transition: background-color 0.3s ease-in-out;
}

.step-card .button--primary:hover {
    background-color: #1d4ed8; /* hover:bg-blue-700 */
}
