

/* Purchase Modal Styling */
.loan-modal {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-family: 'Poppins', sans-serif;
}

/* Modal Header */
.loan-modal .modal-header {
    background: linear-gradient(135deg, #2c3e50 0%, #112f5e 100%);
    color: white;
    padding: 2px;
    border-bottom: none;
    position: relative;
    z-index: 1;
}

.loan-modal .modal-title {
    font-weight: 400;
    font-size: 1.0rem;
    color: white;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

/* Progress Bar */
.progress-indicator {
    padding: 0 2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.progress-bar-container {
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1.5rem;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #112f5e 0%, #2ecc71 100%);
    border-radius: 10px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

/* Modal Body */
.loan-modal .modal-body {
    padding: 2.5rem;
    background: #fff;
    min-height: 400px;
    position: relative;
    overflow-y: auto;
    max-height: 70vh;
}

/* Step Transitions */
@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.modal-step {
    display: none;
    animation: slideInRight 0.4s ease-out forwards;
}

.modal-step.active {
    display: block;
}

.modal-step.slide-out-left {
    animation: slideOutLeft 0.4s ease-out forwards;
}

/* Option Cards */
.option-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #112f5e;
}

.option-card.selected {
    border-color: #112f5e;
    background-color: #f8f9fa;
}

.option-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #112f5e 0%, #112f5e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.5rem;
}

.option-card h5 {
    margin: 0.5rem 0;
    color: #2c3e50;
    font-weight: 600;
}

.option-card p {
    color: #6c757d;
    margin: 0;
    font-size: 0.9rem;
}

/* Form Controls */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    height: auto;
}

.form-control:focus, .form-select:focus {
    border-color: #112f5e;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: #112f5e;
    border: none;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-outline-primary {
    border: 2px solid #112f5e;
    color: #112f5e;
    background: transparent;
}

.btn-outline-primary:hover {
    background: rgba(52, 152, 219, 0.1);
    color: #112f5e;
}

/* Back Button */
.btn-back {
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

/* Price Input */
.price-input-container, .income-input-container {
    max-width: 400px;
    margin: 0 auto;
}

.dollar-sign-input .input-group {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dollar-sign-input .input-group:focus-within {
    border-color: #112f5e;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.dollar-sign-input .input-group-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    border: none;
    background: #f8f9fa;
    padding: 0.75rem 1rem;
}

.price-input, .income-input {
    font-size: 1.25rem !important;
    font-weight: 600;
    border: none !important;
    box-shadow: none !important;
    padding: 0.75rem 1rem !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .loan-modal .modal-body {
        padding: 1.5rem;
        max-height: 60vh;
    }
    
    .option-card {
        padding: 1rem;
    }
    
    .option-card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Success Step */
#step13 .modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 2rem;
}

#step13 .fa-chart-line {
    color: #2ecc71;
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

#step13 h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

#step13 p {
    color: #6c757d;
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* Loading State */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #112f5e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

/* Custom Radio Buttons */
.form-check-input[type="radio"] {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.2em;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    padding-left: 0.5rem;
    color: #2c3e50;
}

/* Custom Range Slider */
.range-slider {
    width: 100%;
    margin: 5px;
}

.range-slider .form-range {
    height: 6px;
    border-radius: 3px;
}

.range-slider .form-range::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    background: #112f5e;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.range-slider .range-value {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 1rem;
}

/* Form Controls */
.loan-modal .form-control {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.loan-modal .form-control:focus {
    border-color: #112f5e;
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Buttons */
.btn-next, .btn-back, .btn-submit {
    padding: 0.55rem 1.5rem;
    border-radius: 8px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-next, .btn-submit {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border: none;
    color: white;
}

.btn-next:hover, .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.btn-back {
    background: transparent;
    color: white;
    border: 1px solid #e0e0e0;
}

.btn-back:hover {
    background-color: #f8f9fa;
    border-color: #bdc3c7;
}

/* Step Navigation */
.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
}

/* Form Labels */
.loan-modal .form-label {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Radio Buttons */
.form-check-input:checked {
    background-color: #2ecc71;
    border-color: #2ecc71;
}

/* Success Step */
#step13 .modal-body {
    padding: 3rem 2rem;
    text-align: center;
}

#step13 .fa-check-circle {
    color: #2ecc71;
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .loan-modal .modal-body {
        padding: 1.5rem 1rem;
    }
    
    .loan-modal .modal-header {
        padding: 0px;
    }
    
    .progress-indicator {
        padding: 0 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-next, .btn-back {
        width: 100%;
    }
}

/* Animation for step transitions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-step {
    animation: fadeIn 0.3s ease-out;
}

/* Form Group Styling */
.form-group {
    margin-bottom: 1.5rem;
}

/* Input Group Styling */
.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    color: #7f8c8d;
}

/* Custom Checkbox Styling */
.form-check {
    margin-bottom: 0.75rem;
}

.form-check-label {
    color: #2c3e50;
    font-weight: 400;
}
