/* Client-specific overrides to remove overlay styling and inner scroll */

.main {
    min-height: unset !important;
    height: auto !important;
    overflow: visible !important;
}

/* Ensure the account block layout doesn't create scrolling issues */
.account-block {
    min-height: unset !important;
    height: auto !important;
    overflow: visible !important;
}

/* Ensure the body and html don't have overflow issues */
body, html {
    overflow-x: hidden;
    overflow-y: auto;
}

/* ============================================
   MudAutocomplete Custom Styling
   Unified styles for location and alternatives autocomplete
   ============================================ */

/* Container - remove default MudBlazor spacing */
.mud-autocomplete-custom {
    width: 100%;
}

.mud-autocomplete-custom .mud-input-control,
.mud-autocomplete-custom .mud-input-root {
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
}

/* Input field - match form__input styling */
.mud-autocomplete-custom input.mud-input-slot {
    padding: 14px 16px !important;
    width: 100% !important;
    background: #f4f5fd !important;
    color: #353535 !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease-in-out !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    height: auto !important;
    min-height: auto !important;
}

/* Focus state */
.mud-autocomplete-custom input.mud-input-slot:focus {
    outline: none !important;
    border-color: #000150 !important;
    box-shadow: 0 2px 6px rgba(0, 1, 80, 0.1) !important;
    background: #f4f5fd !important;
}

/* Placeholder */
.mud-autocomplete-custom input.mud-input-slot::placeholder {
    color: #64748B !important;
    font-weight: 400 !important;
}

/* Remove MudBlazor underlines and borders */
.mud-autocomplete-custom .mud-input-underline:before,
.mud-autocomplete-custom .mud-input-underline:after {
    display: none !important;
}

.mud-autocomplete-custom fieldset {
    display: none !important;
}

/* Hide the dropdown arrow icon */
.mud-autocomplete-custom .mud-input-adornment,
.mud-autocomplete-custom .mud-input-adornment-end {
    display: none !important;
}

/* Hide clear button when using Clearable */
.mud-autocomplete-custom .mud-icon-button {
    display: none !important;
}

/* Ensure all wrapper divs don't interfere */
.mud-autocomplete-custom .mud-input-control > div,
.mud-autocomplete-custom .mud-input-control .mud-input-slot {
    background: transparent !important;
}

/* Dropdown styling */
.mud-autocomplete-custom .mud-popover {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    margin-top: 4px !important;
}

.mud-autocomplete-custom .mud-list-item {
    padding: 12px 16px !important;
    font-size: 14px !important;
}

.mud-autocomplete-custom .mud-list-item:hover {
    background-color: #f4f5fd !important;
}

/* Disable spell check and highlighting in markdown editor */
.EasyMDEContainer textarea,
.CodeMirror,
.CodeMirror-code,
.CodeMirror pre {
    -webkit-text-decoration-skip: none !important;
    text-decoration-skip-ink: none !important;
    -webkit-text-decoration-color: transparent !important;
    text-decoration-color: transparent !important;
    background-image: none !important;
}

.EasyMDEContainer textarea {
    spellcheck: false;
}

/* Remove any pink/red highlighting or underlines */
.CodeMirror-line mark,
.CodeMirror-line span[style*="background"],
.cm-spell-error {
    background: transparent !important;
    text-decoration: none !important;
    background-color: transparent !important;
}

/* ============================================
   Company Wizard Modal - GLOBAL STYLES
   ============================================ */

/* Prevent body scroll when wizard is open */
body.wizard-open {
    overflow: hidden !important;
}

/* Wizard Overlay */
#company-wizard-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    padding: 20px;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Wizard Modal Container */
#company-wizard-modal {
    background: white !important;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 1000000 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* All descendant elements of the wizard modal */
#company-wizard-modal * {
    visibility: visible !important;
}

/* Progress Bar */
#company-wizard-modal .wizard-progress {
    height: 4px;
    background: #E5E7EB;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

#company-wizard-modal .wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #E91E8C 0%, #FF4D8F 100%);
    transition: width 0.3s ease;
}

/* Close Button */
#company-wizard-modal .wizard-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    z-index: 100;
}

#company-wizard-modal .wizard-close:hover {
    color: #6B7280;
    background-color: #F3F4F6;
}

/* Wizard Content */
#company-wizard-modal .wizard-content {
    padding: 40px;
}

#company-wizard-modal .wizard-header {
    margin-bottom: 32px;
}

#company-wizard-modal .wizard-title {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

#company-wizard-modal .wizard-subtitle {
    font-size: 15px;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

/* Form Styles */
#company-wizard-modal .form-group {
    margin-bottom: 20px;
}

#company-wizard-modal .form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

/* Input with inner icon button */
#company-wizard-modal .input-with-icon {
    position: relative;
}

#company-wizard-modal .input-with-icon .form-input {
    padding-right: 45px;
}

#company-wizard-modal .input-icon-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6B7280;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#company-wizard-modal .input-icon-btn:hover:not(:disabled) {
    color: #E91E8C;
    background: #F3F4F6;
}

#company-wizard-modal .input-icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#company-wizard-modal .form-input,
#company-wizard-modal .form-select,
#company-wizard-modal .form-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#company-wizard-modal .form-input:focus,
#company-wizard-modal .form-select:focus,
#company-wizard-modal .form-textarea:focus {
    outline: none;
    border-color: #E91E8C;
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1);
}

/* Buttons */
#company-wizard-modal .btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

#company-wizard-modal .btn-primary {
    background: linear-gradient(135deg, #E91E8C 0%, #FF4D8F 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(233, 30, 140, 0.3);
}

#company-wizard-modal .btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(233, 30, 140, 0.4);
    transform: translateY(-1px);
}

#company-wizard-modal .btn-secondary {
    background: white;
    border: 1px solid #D1D5DB;
    color: #374151;
}

#company-wizard-modal .btn-secondary:hover:not(:disabled) {
    background: #F9FAFB;
    border-color: #9CA3AF;
}

/* Plan Cards */
#company-wizard-modal .plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

#company-wizard-modal .plan-card {
    position: relative;
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#company-wizard-modal .plan-card:hover {
    border-color: #E91E8C;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(233, 30, 140, 0.15);
}

#company-wizard-modal .plan-card.selected {
    border-color: #E91E8C;
    background: linear-gradient(135deg, #FFF5F8 0%, #FFFFFF 100%);
    box-shadow: 0 8px 20px rgba(233, 30, 140, 0.2);
}

/* Footer */
#company-wizard-modal .wizard-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

/* Spinner */
#company-wizard-modal .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Input Group (INN fetch button) */
#company-wizard-modal .input-group {
    display: flex;
    gap: 8px;
}

#company-wizard-modal .input-group .form-input {
    flex: 1;
}

#company-wizard-modal .btn-fetch {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#company-wizard-modal .btn-fetch:hover:not(:disabled) {
    background: #E5E7EB;
    border-color: #9CA3AF;
}

#company-wizard-modal .btn-fetch:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Hints */
#company-wizard-modal .form-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #9CA3AF;
}

#company-wizard-modal .error-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #DC2626;
}

/* Required Field Indicator */
#company-wizard-modal .form-group.required .form-label::after {
    content: " *";
    color: #E91E8C;
}

/* Textarea */
#company-wizard-modal .form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Plan Card Details */
#company-wizard-modal .plan-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #F3F4F6;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    margin-bottom: 12px;
}

#company-wizard-modal .plan-badge-premium {
    background: linear-gradient(135deg, #E91E8C 0%, #FF4D8F 100%);
    color: white;
}

#company-wizard-modal .plan-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
}

#company-wizard-modal .plan-price {
    margin-bottom: 20px;
}

#company-wizard-modal .price-amount {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
}

#company-wizard-modal .price-period {
    font-size: 14px;
    color: #6B7280;
}

#company-wizard-modal .plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

#company-wizard-modal .plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    font-size: 14px;
    color: #374151;
    border-top: 1px solid #F3F4F6;
}

#company-wizard-modal .plan-features li:first-child {
    border-top: none;
}

#company-wizard-modal .icon-check {
    width: 20px;
    height: 20px;
    color: #10B981;
    flex-shrink: 0;
}

#company-wizard-modal .plan-selected-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #E91E8C 0%, #FF4D8F 100%);
    color: white;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

/* Success Screen */
#company-wizard-modal .wizard-header-center {
    text-align: center;
}

#company-wizard-modal .success-icon {
    margin: 0 auto 20px;
    width: 64px;
    height: 64px;
}

#company-wizard-modal .success-info {
    margin-top: 24px;
}

#company-wizard-modal .info-card {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
}

#company-wizard-modal .info-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 16px 0;
}

#company-wizard-modal .next-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

#company-wizard-modal .next-steps li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

#company-wizard-modal .next-steps li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #E91E8C;
    font-weight: 600;
}

/* Button variations */
#company-wizard-modal .btn-full {
    width: 100%;
    justify-content: center;
}

#company-wizard-modal .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* MudBlazor Autocomplete Override for Wizard Modal */
#company-wizard-modal .mud-autocomplete-custom input.mud-input-slot {
    padding: 10px 14px !important;
    font-size: 14px !important;
    background: white !important;
    border: 1px solid #D1D5DB !important;
    border-radius: 8px !important;
}

#company-wizard-modal .mud-autocomplete-custom input.mud-input-slot:focus {
    border-color: #E91E8C !important;
    box-shadow: 0 0 0 3px rgba(233, 30, 140, 0.1) !important;
    background: white !important;
}

/* Wizard Body */
#company-wizard-modal .wizard-body {
    margin-bottom: 32px;
}

/* EditForm validation styles */
#company-wizard-modal .validation-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #DC2626;
}

#company-wizard-modal .invalid {
    border-color: #DC2626 !important;
}

#company-wizard-modal .valid {
    border-color: #10B981 !important;
}

/* Responsive */
@media (max-width: 768px) {
    #company-wizard-modal .wizard-content {
        padding: 24px;
    }
    #company-wizard-modal .plan-cards {
        grid-template-columns: 1fr;
    }
    #company-wizard-modal .wizard-footer {
        flex-direction: column-reverse;
    }
    #company-wizard-modal .wizard-footer .btn {
        width: 100%;
        justify-content: center;
    }
}
