/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
#sessionId{
    line-break: anywhere;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ffffff;
    color: #333;
    line-height: 1.5;
}

/* Header */
.main-header {
    background-color: #0940D0;
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
}

.header-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
}

.header-subtitle {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
    opacity: 0.9;
}

.header-description {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Section Styling */
.section-block {
    margin-bottom: 40px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.required {
    color: #d32f2f;
}

/* Document Pills Grid */
.document-types-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.document-pill {
    flex: 0 0 calc(20% - 12px);
    /* 5 columns roughly */
    min-width: 180px;
    position: relative;
    cursor: pointer;
}

.document-pill input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.document-pill span.pill-name,
.document-pill span.pill-price {
    display: block;
}

.document-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 16px;
    background: white;
    transition: all 0.2s ease;
}

.pill-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.pill-price {
    font-size: 14px;
    font-weight: 600;
    color: #0940D0;
}

/* No specific style for name, just parent */

/* Hack to style parent based on child checked - using :has if supported or adjacent logic if structure allows 
   Since input is inside label, we can use :has or just style the label on click via JS, 
   BUT standard CSS solution for "input inside label" styling parent is :has() which is modern. 
   Fallback: adjacent sibling approach requires input to be before label content.
   Structure used: label > input, span, span. 
   We will rely on :has() selector or focus-within.
*/

.document-pill:has(input:checked) {
    border-color: #0940D0;
    background-color: #f0f5ff;
    box-shadow: 0 0 0 1px #0940D0;
}

/* Fallback for older browsers if needed, though :has covers most modern. 
   If strict compatibility is needed, we'd move input outside or use JS class. 
   Given modern requirement, :has is acceptable. */

/* Info Notice */
.info-notice {
    background-color: #f8f9fa;
    color: #666;
    padding: 20px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 40px;
    text-align: center;
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 60px;
    align-items: start;
}

/* Form Styling */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
}

.form-group input:focus,
.textarea-wrapper textarea:focus {
    outline: none;
    border-color: #0940D0;
}

.form-group input::placeholder,
.textarea-wrapper textarea::placeholder {
    color: #ccc;
}

/* Textarea */
.textarea-wrapper {
    position: relative;
}

.textarea-wrapper textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    color: #666;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* Summary Box */
.summary-box {
    background-color: #f4f6f9;
    padding: 20px;
    border-radius: 6px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.total-row {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    font-weight: 700;
    font-size: 16px;
}

.total-value {
    color: #0940D0;
    font-size: 24px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background-color: #0940D0;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.submit-btn:hover {
    background-color: #0732a0;
}

.submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Payment Security */
.payment-security {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.security-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background-color: #0940D0;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
}

/* Illustration */
.illustration-column {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}

.main-illustration {
    max-width: 100%;
    height: auto;
}

/* Error Messages */
.error-message {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

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

input.error,
textarea.error {
    border-color: #d32f2f;
}

/* Responsive */
@media screen and (max-width: 1024px) {
    .document-pill {
        flex: 0 0 calc(33.33% - 10px);
    }
}

@media screen and (max-width: 768px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .illustration-column {
        order: -1;
        /* Move illustration above form or keep below? Screenshot implies form left, illustration right. Mobile usually stacks. Let's keep illustration below or hide it? */
        /* Actually often illustration goes top on mobile, but let's see. */
        display: none;
        /* Hide illustrative image on mobile to save space */
    }

    .document-pill {
        flex: 0 0 calc(50% - 8px);
    }

    .header-title {
        font-size: 28px;
    }

    .header-subtitle {
        font-size: 18px;
    }
}

@media screen and (max-width: 480px) {
    .document-pill {
        flex: 0 0 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}