/* Mortgage Broker V2 Styling */

/* RTL Support */
body {
    direction: rtl;
    text-align: right;
}

/* Main Container */
.questionnaire-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Progress Bar Container */
.progress-container {
    margin-bottom: 30px;
}

.progress {
    background-color: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Radio Options */
.radio-option {
    transition: all 0.2s ease;
}

.radio-option:hover {
    border-color: #ff8b00 !important;
    background-color: #fff5e6 !important;
}

.radio-option input[type="radio"] {
    margin-left: 10px;
}

/* Form Controls */
.form-control {
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.form-control:focus {
    border-color: #ff8b00;
    box-shadow: 0 0 0 0.2rem rgba(255, 139, 0, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
}

/* Remove number input spinners completely */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Text inputs with numeric keyboard on mobile */
input[inputmode="numeric"],
input[inputmode="decimal"] {
    -webkit-appearance: none;
    appearance: none;
}

/* Buttons */
.btn {
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #ff8b00;
    border: none;
}

.btn-primary:hover {
    background-color: #e67d00;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 139, 0, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    border: none;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    border: none;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

/* Broker Item Container */
.item-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 2px 2px 3px #999;
    transition: all 0.3s ease;
}

.item-container:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Broker Logo */
.item-container .logo {
    max-width: 200px;
    max-height: 120px;
    height: auto;
    object-fit: contain;
}

/* Featured Badge */
.badge-recommended {
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
}

/* Broker Description */
.item-container h3 {
    color: #333;
    font-weight: bold;
    margin-bottom: 10px;
}

.item-container h5 {
    color: #ff8b00;
    font-weight: 600;
    margin-bottom: 15px;
}

.item-container p {
    color: #666;
    line-height: 1.6;
}

/* Educational Content */
main h3 {
    color: #333;
    font-weight: bold;
    margin-top: 30px;
    margin-bottom: 15px;
}

main p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Search Sub Header */
.search-sub-header {
    color: #ff8b00;
    font-weight: 600;
    margin-bottom: 30px;
}

/* Thank You Page */
.thank-you-container {
    text-align: center;
    padding: 50px 20px;
}

.thank-you-container h1 {
    color: #ff8b00;
    font-size: 48px;
    margin-top: 30px;
}

.thank-you-container p {
    font-size: 20px;
    margin-top: 20px;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .questionnaire-container {
        padding: 15px !important;
        margin: 20px auto !important;
    }

    .form-step h4 {
        font-size: 18px;
    }

    .radio-option {
        padding: 12px !important;
        font-size: 16px;
    }

    .btn {
        font-size: 16px !important;
        padding: 12px !important;
    }

    .item-container {
        padding: 15px;
    }

    .item-container .logo {
        max-width: 180px !important;
        max-height: 180px !important;
    }

    .badge-recommended {
        font-size: 12px;
        padding: 3px 8px !important;
    }

    .progress {
        height: 20px !important;
    }

    .progress-bar {
        font-size: 14px;
    }
}

/* Tablet Responsive */
@media (min-width: 768px) and (max-width: 1023px) {
    .item-container .logo {
        max-width: 150px;
        max-height: 100px;
    }
}

/* Form Validation */
.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.radio-option input:focus {
    outline: 2px solid #ff8b00;
    outline-offset: 2px;
}

/* Bank Item Specific Styles */
.mortgage-bank-item .logo {
    object-fit: contain;
}

.mortgage-bank-item .btn {
    transition: all 0.2s ease;
}

.mortgage-bank-item .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(1, 87, 255, 0.3);
}

/* Desktop Bank Item */
.desktop-item-container .button-row {
    vertical-align: middle;
}

/* Mobile Bank Item */
.mobile-item-container {
    padding: 15px;
}

.mobile-item-container .logo {
    object-fit: contain;
}

/* Bank Section Header */
.search-sub-header {
    font-size: 28px;
    font-weight: 600;
}

/* Print Styles */
@media print {
    .btn,
    .progress-container {
        display: none;
    }
}
