/* Ontario CorpMate Government Forms - Shared Styles */

/* Government Form Container */
.gov-form-container {
    max-width: 8.5in;
    margin: 0 auto;
    background: white;
    padding: 0.25in 0.5in 0.5in 0.5in;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11pt;
    line-height: 1.4;
}

/* Header Layout */
.gov-form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    padding-bottom: 5px;
}

.ontario-branding {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ontario-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    vertical-align: middle; /* Ensures inline alignment */
}

.ontario-text {
    font-size: 24pt;
    font-weight: bold;
}

.ministry-text {
    font-size: 10pt;
    line-height: 1.2;
}

.form-title-section {
    text-align: right;
}

.form-title-main {
    font-size: 16pt !important;
    font-weight: bold !important;
    margin-bottom: 5px !important;
}

.form-title-sub {
    font-size: 11pt !important;
    font-style: italic !important;
}

/* Section Headers */
.gov-section-header {
    background: #d9d9d9;
    color: #000;
    padding: 5px 10px;
    font-size: 11pt;
    font-weight: bold;
    margin-bottom: 15px;
    border: 1px solid #999;
}

/* Instructions */
.gov-instructions {
    background: #f5f5f5;
    padding: 10px;
    margin-bottom: 20px;
    border-left: 3px solid #333;
    font-size: 10pt;
}

/* Section Styling */
.gov-section {
    margin-bottom: 15px;
}

.section-content {
    padding: 0 10px;
}

.section-description {
    margin-bottom: 15px;
    font-size: 10pt;
    line-height: 1.3;
}

/* Clean form field styling using MudBlazor defaults */
.form-field {
    margin-bottom: 16px;
}

.form-field .mud-input-label {
    font-weight: 600;
    color: #424242;
}

/* Ensure consistent field styling regardless of validation state */
.form-field .mud-input-control fieldset {
    border-color: rgba(0,0,0,0.23) !important;
}

.form-field.mud-input-error .mud-input-control fieldset {
    border-color: rgba(0,0,0,0.23) !important;
}

.form-field .mud-input-control:hover fieldset {
    border-color: rgba(0,0,0,0.87) !important;
}

.form-field .mud-input-control.mud-input-focused fieldset {
    border-color: var(--mud-palette-primary) !important;
    border-width: 2px !important;
}

/* Keep validation error text visible but don't change field borders */
.form-field .mud-input-helper-text {
    color: #f44336;
    font-size: 0.75rem;
}

/* Required Field Indicators */
.required-label::after {
    content: " *";
    color: red;
}

/* Form Layout */
.gov-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.gov-form-col {
    flex: 1;
}

.gov-form-col-auto {
    flex: 0 0 auto;
}

/* Remove Material Design elevations and borders — scoped to CorpMate Ontario forms only.
   Previously this rule was unscoped and globally killed borders on every MudPaper in the app
   (including LienLynx dropzones), because `.mud-paper { border: none !important }` has equal
   specificity to MudBlazor's `.border-2 !important` / `.border-dotted !important` utilities
   but loads later in source order, so it wins the cascade. */
.gov-form-container .mud-paper {
    box-shadow: none !important;
    border: none !important;
}

/* Help Icons */
.help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #0066cc;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 10px;
    margin-left: 5px;
    cursor: help;
}

/* Checkbox and Radio Button Styling */
.gov-checkbox-group,
.gov-radio-group {
    display: flex;
    gap: 20px;
    margin: 5px 0;
}

.gov-checkbox-item,
.gov-radio-item {
    display: flex;
    align-items: center;
}

/* Enlarge checkbox/radio inputs by 20% — scoped to CorpMate Ontario forms only.
   Previously this rule was unscoped and globally enlarged every MudCheckBox/MudRadio
   in the entire app (LienLynx, AccuCite, Admin, etc.) by 20%. */
.gov-form-container .mud-checkbox .mud-checkbox-input,
.gov-form-container .mud-radio .mud-radio-input {
    transform: scale(1.2);
    margin-right: 5px;
}

/* General form styling overrides */
.required-field {
    margin-bottom: 15px;
}

.form-grid {
    gap: 15px;
}

.field-label {
    margin-bottom: 3px;
    font-weight: bold;
    font-size: 10pt;
    color: #000;
}

/* Dropdown popup styling for better visibility - ONLY for Ontario forms */
.corpmate-ontario-forms .mud-popover-provider .mud-list,
.ontario-form-container .mud-popover-provider .mud-list {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.corpmate-ontario-forms .mud-popover-provider .mud-list-item,
.ontario-form-container .mud-popover-provider .mud-list-item {
    background-color: transparent;
}

.corpmate-ontario-forms .mud-popover-provider .mud-list-item:hover,
.ontario-form-container .mud-popover-provider .mud-list-item:hover {
    background-color: #e9ecef !important;
}

/* Alternative styling for select dropdowns - ONLY for Ontario forms */
.corpmate-ontario-forms .mud-select .mud-list,
.ontario-form-container .mud-select .mud-list {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.corpmate-ontario-forms .mud-select .mud-list-item:hover,
.ontario-form-container .mud-select .mud-list-item:hover {
    background-color: #e9ecef !important;
}

/* Simple form section styling for other Ontario forms */
.form-header {
    background-color: #f5f5f5;
    border: 2px solid #000;
    padding: 16px;
    margin-bottom: 16px;
}

.form-section {
    border: 1px solid #ccc;
    margin-bottom: 12px;
    padding: 0;
}

.section-header {
    background-color: #e0e0e0;
    padding: 8px 16px;
    font-weight: 600;
    border-bottom: 1px solid #ccc;
}

.form-number-circle {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #000;
    color: #fff;
    text-align: center;
    line-height: 24px;
    margin-right: 8px;
    font-weight: bold;
}

.subsection-header {
    background-color: #f0f0f0;
    padding: 6px 12px;
    margin: 8px 0;
    font-weight: 500;
}

/* Reference and Docket Section Alignment */
.reference-docket-section {
    margin-bottom: 15px;
}

.reference-docket-container {
    padding: 0 10px; /* Match section-content exactly */
}

.reference-docket-grid {
    width: 100%;
    /* Remove custom spacing - let MudBlazor handle it naturally */
}