/**
 * Reflex Claim Forms - Styles
 * Multi-page wizard styling with SCS Brand Colors
 */

.reflex-claim-form-container {
    max-width: 1600px;
    margin: 2em auto;
    padding: 2em;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Page Indicator */
.page-indicator {
    display: flex;
    justify-content: space-between;
    margin: 2em 0;
    padding: 1em 0;
    border-bottom: 2px solid #C4A682; /* SCS Hakone Gold */
}

.page-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0.5em;
    opacity: 0.5;
}

.page-step.active {
    opacity: 1;
}

.page-step.completed {
    opacity: 0.8;
}

.page-step .step-number {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    font-weight: bold;
    margin-bottom: 0.25em;
}

.page-step.active .step-number {
    background: #424F33; /* SCS Everest Green */
    color: #fff;
}

.page-step.completed .step-number {
    background: #C4A682; /* SCS Hakone Gold */
    color: #424F33; /* SCS Everest Green text */
}

.page-step .step-label {
    display: block;
    font-size: 12px;
    color: #666;
}

/* Page Content */
.reflex-form-page {
    min-height: 400px;
    margin: 2em 0;
}

.reflex-form-page h3 {
    margin-top: 0;
    color: #424F33; /* SCS Everest Green */
    border-bottom: 2px solid #C4A682; /* SCS Hakone Gold */
    padding-bottom: 0.5em;
}

.page-content {
    margin: 1.5em 0;
    line-height: 1.6;
}

.page-description {
    margin: 1em 0;
    padding: 1em;
    background: #f9f7f4;
    border-left: 4px solid #C4A682; /* SCS Hakone Gold */
    font-size: 14px;
}

/* Claimant Field Group Containers */
.claimant-field-group {
    background: #f9f7f4;
    border: 1px solid #C4A682; /* SCS Hakone Gold */
    border-radius: 8px;
    padding: 1.5em;
    margin-bottom: 1.5em;
}

.claimant-field-group-header {
    margin: 0 0 1em 0;
    padding-bottom: 0.5em;
    color: #424F33; /* SCS Everest Green */
    border-bottom: 2px solid #C4A682; /* SCS Hakone Gold */
    font-size: 1.1em;
    font-weight: 600;
}

/* Claimant Info Layout - Horizontal */
.claimant-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5em;
}

.claimant-info .form-row {
    margin-bottom: 0;
}

.claimant-info .form-row.full-width {
    grid-column: 1 / -1;
}

/* City/State/ZIP special 3-column row */
.claimant-info .city-state-zip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5em;
    margin-bottom: 0;
}

.claimant-info .city-state-zip > div {
    display: flex;
    flex-direction: column;
}

.claimant-info .city-state-zip label {
    display: block;
    margin-bottom: 0.25em;
    font-weight: 500;
    color: #424F33; /* SCS Everest Green */
    font-size: 14px;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2em;
    padding-top: 1em;
    border-top: 2px solid #C4A682; /* SCS Hakone Gold */
}

.nav-btn {
    padding: 0.75em 2em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.3s;
}

.prev-btn {
    background: #ddd;
    color: #424F33; /* SCS Everest Green */
}

.prev-btn:hover {
    background: #ccc;
}

.next-btn, .submit-btn {
    background: #424F33; /* SCS Everest Green */
    color: #fff;
    margin-left: auto;
}

.next-btn:hover, .submit-btn:hover {
    background: #36402a;
}

.submit-btn {
    background: #C4A682; /* SCS Hakone Gold */
    color: #424F33; /* SCS Everest Green text */
}

.submit-btn:hover {
    background: #b49670;
}

/* Certification Section - Matching Owner Info Section Style */
.certification-section {
    background: #f9f7f4;
    border: 1px solid #C4A682; /* SCS Hakone Gold */
    border-radius: 8px;
    padding: 1.5em;
    margin-bottom: 1.5em;
}

.certification-section-title {
    margin: 0 0 1em 0;
    padding-bottom: 0.5em;
    color: #424F33; /* SCS Everest Green */
    border-bottom: 2px solid #C4A682; /* SCS Hakone Gold */
    font-size: 1.1em;
    font-weight: 600;
}

.certification-content {
    margin-bottom: 1em;
    line-height: 1.6;
}

.certification-checkbox {
    margin-top: 1em;
}

.certification-checkbox label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
}

.certification-checkbox input[type="checkbox"] {
    margin-right: 0.5em;
    margin-top: 0.25em;
    flex-shrink: 0;
}

/* Signatures Section - Matching Owner Info Section Style */
.signatures-section {
    background: #f9f7f4;
    border: 1px solid #C4A682; /* SCS Hakone Gold */
    border-radius: 8px;
    padding: 1.5em;
    margin-bottom: 1.5em;
}

.signature-field {
    margin-top: 1.5em;
}

.signature-field:first-of-type {
    margin-top: 1em;
}

.signature-label {
    margin: 0 0 0.5em 0;
    color: #424F33; /* SCS Everest Green */
    font-size: 1em;
    font-weight: 600;
}

.signature-instructions {
    margin-bottom: 0.75em;
    line-height: 1.6;
    font-size: 14px;
    color: #666;
}

.signature-input {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.signature-input:focus {
    border-color: #424F33;
    outline: none;
    box-shadow: 0 0 0 1px #424F33;
}

.signature-required {
    margin: 0.5em 0 0 0;
    font-size: 12px;
    color: #dc3232;
    font-weight: 500;
}

.checkbox-label {
    display: block;
    margin: 1em 0;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5em;
}

/* File Upload */
.file-upload-area {
    padding: 2em;
    border: 2px dashed #ddd;
    border-radius: 8px;
    text-align: center;
    margin: 1.5em 0;
}

.upload-btn {
    padding: 0.75em 1.5em;
    background: #424F33; /* SCS Everest Green */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.upload-btn:hover {
    background: #36402a;
}

.upload-hint {
    margin-top: 1em;
    color: #666;
    font-size: 14px;
}

.uploaded-files {
    margin-top: 1.5em;
    padding: 1em;
    background: #f0f8f0;
    border-left: 4px solid #46b450;
}

.uploaded-files ul {
    list-style: none;
    padding: 0;
}

.uploaded-files li {
    color: #46b450;
    margin: 0.5em 0;
}

/* Form Field Validation */
.form-input.error {
    border-color: #dc3232;
    box-shadow: 0 0 0 1px #dc3232;
}

/* Required field indicator - red asterisk */
.required {
    color: #dc2626;
    font-weight: bold;
    margin-left: 2px;
}

/* Required field error styling */
.field-error {
    border: 2px solid #dc2626 !important;
    background-color: #fef2f2 !important;
}

.error-message {
    color: #dc2626;
    font-size: 11px;
    display: block;
    margin-top: 2px;
    font-weight: 500;
}

.reflex-form-header {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 2px solid #C4A682; /* SCS Hakone Gold */
}

.reflex-form-header h2 {
    margin: 0 0 0.5em 0;
    color: #424F33; /* SCS Everest Green */
}

.reflex-form-header .description {
    color: #666;
    font-size: 14px;
}

.reflex-form-loading {
    text-align: center;
    padding: 2em;
    color: #666;
}

.reflex-form-error {
    padding: 1em;
    background: #fff0f0;
    border-left: 4px solid #dc3232;
    margin: 1em 0;
}

.reflex-form-section {
    margin-bottom: 2em;
    padding: 1.5em;
    background: #f9f9f9;
    border-radius: 6px;
}

.reflex-form-section h3 {
    margin-top: 0;
    margin-bottom: 1em;
    color: #23282d;
}

.form-row {
    margin-bottom: 1em;
}

.form-row label {
    display: block;
    margin-bottom: 0.25em;
    font-weight: 500;
    color: #424F33; /* SCS Everest Green */
    font-size: 14px;
}

.field-help-text {
    font-size: 12px;
    color: #666;
    margin: 0.25em 0 0.5em 0;
    line-height: 1.4;
}

.form-input {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.transaction-section {
    background: #f9f7f4;
    border: 1px solid #C4A682; /* SCS Hakone Gold */
    border-radius: 6px;
}

.transaction-section h4 {
    color: #424F33; /* SCS Everest Green */
    border-bottom: 2px solid #C4A682; /* SCS Hakone Gold */
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}

.transaction-list {
    margin-bottom: 1.5em;
    overflow-x: auto;
    width: 100%;
}

.transaction-row-header,
.transaction-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75em;
    margin-bottom: 1em;
    align-items: center;
    padding: 0.6em;
    min-width: max-content;
}

.transaction-row-header {
    font-weight: 600;
    padding: 0.75em 0.5em;
    background: #424F33; /* SCS Everest Green */
    color: #fff;
    border-radius: 4px;
    margin-bottom: 1em;
}

.transaction-row-header .column-header {
    white-space: normal;
    font-size: 13px;
    line-height: 1.3;
    word-wrap: break-word;
    hyphens: auto;
}

.transaction-row {
    padding: 0.5em;
    background: #fff;
    border-radius: 4px;
}

.column-header {
    padding: 0.4em;
    min-width: 0;
}

.transaction-cell {
    padding: 0.4em;
    position: relative;
    min-width: 0;
}

.transaction-field {
    width: 100%;
    padding: 1em !important;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.transaction-field.currency-field {
    padding-left: 1.5em;
}

.currency-field::before {
    content: '$';
    position: absolute;
    left: 0.75em;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.transaction-field:focus {
    border-color: #0073aa;
    outline: none;
}

.transaction-field[readonly] {
    background: #f0f0f0;
    cursor: not-allowed;
}

.add-transaction-btn {
    padding: 0.75em 1.5em;
    background: #424F33; /* SCS Everest Green */
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.add-transaction-btn:hover {
    background: #36402a;
}

.delete-row-btn {
    padding: 0.25em 0.5em;
    background: #dc3232;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.delete-row-btn:hover {
    background: #a00;
}

.reflex-form-submit {
    text-align: right;
    margin-top: 2em;
    padding-top: 1em;
    border-top: 2px solid #ddd;
}

.reflex-submit-btn {
    padding: 0.75em 2em;
    background: #46b450;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.reflex-submit-btn:hover {
    background: #2ea52e;
}

.success-message {
    padding: 2em;
    text-align: center;
    background: #f0f8f0;
    border: 2px solid #46b450;
    border-radius: 8px;
}

.success-message h3 {
    color: #46b450;
    margin-top: 0;
}

@media (max-width: 768px) {
    .reflex-claim-form-container {
        padding: 1em;
    }

    .transaction-row-header,
    .transaction-row {
        grid-template-columns: 1fr;
        gap: 0.25em;
    }

    .column-header {
        display: none;
    }

    .transaction-cell::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.25em;
    }
}

/* File Upload Styling */
.file-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2em;
    text-align: center;
    background: #f9f9f9;
    margin: 1em 0;
    transition: all 0.3s ease;
}

.file-upload-area.dragging {
    border-color: #424F33;
    background: #e8f5e9;
}

.upload-btn {
    background: #424F33;
    color: white;
    border: none;
    padding: 0.75em 2em;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.upload-btn:hover {
    background: #2d3623;
}

.drag-drop-text {
    margin: 1em 0 0 0;
    color: #666;
    font-size: 0.9em;
}

.upload-hint {
    color: #666;
    font-size: 0.9em;
    margin: 0.5em 0 1em 0;
}

.uploaded-files-list {
    margin-top: 1.5em;
}

.uploaded-file-item {
    display: flex;
    align-items: center;
    padding: 0.75em;
    margin-bottom: 0.5em;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.uploaded-file-item:hover {
    background: #f5f5f5;
}

.file-icon {
    font-size: 1.5em;
    margin-right: 0.5em;
}

.file-name {
    flex: 1;
    font-size: 0.95em;
}

.uploading-text {
    color: #1976d2;
    font-size: 0.85em;
    margin-right: 0.5em;
    font-style: italic;
}

.remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1.2em;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 0;
}

.remove-file:hover {
    background: #c82333;
}


/* Documentation Page Custom Content Styling */
.documentation-custom-content {
    margin-bottom: 1.5em;
    line-height: 1.6;
}

.documentation-custom-content p {
    margin-bottom: 0.75em;
}

.documentation-custom-content strong {
    font-weight: 600;
    color: #2d3623;
}

.documentation-custom-content em {
    font-style: italic;
}

.documentation-custom-content ul,
.documentation-custom-content ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.documentation-custom-content li {
    margin-bottom: 0.5em;
}

.documentation-custom-content h4,
.documentation-custom-content h5,
.documentation-custom-content h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: #424F33;
}

.documentation-custom-content .upload-hint {
    color: #666;
    font-size: 0.9em;
    margin: 0.5em 0 1em 0;
}

/* Ensure custom content doesn't break layout */
.documentation-custom-content * {
    max-width: 100%;
}

/* Navigation Buttons */
.reflex-form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid #ddd;
}

.reflex-prev-btn,
.reflex-next-btn,
.reflex-submit-btn {
    background: #424F33;
    color: white;
    border: none;
    padding: 0.75em 2em;
    font-size: 1em;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    font-weight: 500;
}

.reflex-prev-btn:hover,
.reflex-next-btn:hover,
.reflex-submit-btn:hover {
    background: #2d3623;
}

.reflex-prev-btn {
    background: #6c757d;
}

.reflex-prev-btn:hover {
    background: #5a6268;
}

.reflex-submit-btn {
    background: #28a745;
}

.reflex-submit-btn:hover {
    background: #218838;
}

.reflex-prev-btn:disabled,
.reflex-next-btn:disabled,
.reflex-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Transaction table styles to ensure horizontal layout */
.transaction-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: 600px;
    display: table !important;
}

.transaction-table thead {
    display: table-header-group !important;
}

.transaction-table tbody {
    display: table-row-group !important;
}

.transaction-table tfoot {
    display: table-footer-group !important;
}

.transaction-table tr {
    display: table-row !important;
}

.transaction-table th,
.transaction-table td {
    display: table-cell !important;
    vertical-align: middle;
    padding: 0.5em;
    border: 1px solid #ddd;
}

.transaction-table th {
    background: #424F33;
    color: white;
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}

.transaction-table td {
    background: white;
}

.transaction-table input,
.transaction-table select {
    width: 100%;
    padding: 1em !important;
    border: 2px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
}

.transaction-table .delete-row-btn {
    padding: 0.25em 0.75em;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
}

.transaction-table .delete-row-btn:hover {
    background: #c82333;
}

/* Responsive table container */
.transaction-list {
    overflow-x: auto;
    margin-bottom: 1em;
}

/* Ensure proper column widths */
.transaction-table td:has(input[type="date"]) {
    min-width: 140px;
}

.transaction-table td:has(input[type="number"]) {
    min-width: 120px;
}

.transaction-table .transaction-actions {
    width: 50px;
    text-align: center;
}

/* Transaction Validation Styles */

/* Field error highlighting */
.transaction-field.field-error {
    border: 2px solid #dc2626 !important;
    background-color: #fef2f2 !important;
}

.error-message {
    color: #dc2626;
    font-size: 11px;
    display: block;
    margin-top: 2px;
    font-weight: 500;
}

/* Tab required indicators (red text for tabs with required fields) */
.tab-button[style*="color: #dc2626"] {
    font-weight: 600;
}

/* Floating Check button */
.validate-transactions-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 14px;
}

.validate-transactions-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.validate-transactions-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Validation popup modal */
.validation-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.validation-popup {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.validation-popup-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fef2f2;
}

.validation-popup-header.success {
    background: #f0fdf4;
}

.validation-popup-title {
    font-size: 20px;
    font-weight: 700;
    color: #dc2626;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.validation-popup-title.success {
    color: #16a34a;
}

.validation-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.validation-popup-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.validation-popup-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.validation-summary {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    border-radius: 4px;
    font-size: 14px;
    color: #991b1b;
}

.validation-summary.success {
    background: #f0fdf4;
    border-left-color: #16a34a;
    color: #166534;
}

.validation-tab-group {
    margin-bottom: 24px;
}

.validation-tab-header {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.validation-error-item {
    padding: 12px;
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.validation-error-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.validation-error-row {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
}

.validation-error-field {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

.validation-error-message {
    font-size: 13px;
    color: #dc2626;
    margin-top: 4px;
}

.validation-popup-footer {
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    background: #f9fafb;
}

.validation-popup-button {
    padding: 10px 20px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.validation-popup-button:hover {
    background: #1d4ed8;
}

/* Success icon and error icon styling */
.validation-icon {
    font-size: 24px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .validate-transactions-btn {
        bottom: 60px;
        right: 15px;
        padding: 10px 20px;
        font-size: 13px;
    }

    .validation-popup {
        max-width: 95%;
        max-height: 90vh;
    }

    .validation-popup-header {
        padding: 16px 20px;
    }

    .validation-popup-title {
        font-size: 18px;
    }

    .validation-popup-content {
        padding: 20px;
    }
}

