/* Finance Application Form Styles - Black and Yellow Theme (#f3c023) */

/* Form container */
.finance-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    position: relative;
}

/* Form title */
.finance-form-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    color: #000;
}

/* Progress bar */
.finance-form-progress {
    margin-bottom: 30px;
}

.finance-form-progress-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.finance-form-progress-indicator {
    height: 100%;
    background-color: #f3c023; /* Yellow theme color */
    transition: width 0.3s ease;
}

.finance-form-progress-text {
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* Step container */
.finance-form-step-container {
    position: relative;
    min-height: 200px;
}

.finance-form-step-container.loading:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

.finance-form-step-container.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f3c023; /* Yellow theme color */
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 2;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Step */
.finance-form-step {
    background-color: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.finance-form-step-title {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #000;
}

.finance-form-step-description {
    margin-bottom: 20px;
    color: #333;
}

/* Field container */
.finance-form-field-container {
    margin-bottom: 20px;
    position: relative;
}

.finance-form-field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #000;
}

.finance-form-field-label .required {
    color: #f3c023; /* Yellow theme color */
    margin-left: 4px;
}

/* Years and Months container - NEW */
.finance-form-years-months-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.finance-form-years-field,
.finance-form-months-field {
    flex: 1;
    margin-bottom: 0;
}

.finance-form-field-sublabel {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: #666;
    font-size: 14px;
}

/* Input fields */
.finance-form-field-container input[type="text"],
.finance-form-field-container input[type="email"],
.finance-form-field-container input[type="tel"],
.finance-form-field-container input[type="number"],
.finance-form-field-container select,
.finance-form-field-container textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.finance-form-field-container input:focus,
.finance-form-field-container select:focus,
.finance-form-field-container textarea:focus {
    outline: none;
    border-color: #f3c023; /* Yellow theme color */
    box-shadow: 0 0 0 2px rgba(243, 192, 35, 0.2);
    background-color: #fff;
}

/* Input with prefix (currency) */
.finance-form-field-container .input-prefix {
    position: relative;
}

.finance-form-field-container .input-prefix input {
    padding-left: 30px;
}

.finance-form-field-container .input-prefix:before {
    content: '£';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

/* Radio options - Two column layout with no radio buttons */
.finance-form-radio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.finance-form-radio-option {
    flex: 0 0 calc(50% - 5px);
    margin-bottom: 10px;
    position: relative;
}

.finance-form-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.finance-form-radio-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
}

.finance-form-radio-option label:hover {
    background-color: #f9f9f9;
}

.finance-form-radio-option input[type="radio"]:checked + label {
    background-color: #f3c023; /* Yellow background */
    border-color: #f3c023; /* Yellow theme color */
    color: #000; /* Black text */
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    position: relative;
}

/* Remove checkmark from selected radio option */
.finance-form-radio-option input[type="radio"]:checked + label:after {
    content: none; /* Remove the checkmark */
}

/* Checkbox styling */
.finance-form-field-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.finance-form-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    position: relative;
}

.finance-form-checkbox-label:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.finance-form-field-container input[type="checkbox"]:checked + .finance-form-checkbox-label:before {
    background-color: #f3c023;
    border-color: #f3c023;
}

.finance-form-field-container input[type="checkbox"]:checked + .finance-form-checkbox-label:after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 1px;
    color: #fff;
    font-size: 14px;
}

/* Error messages */
.finance-form-field-error {
    color: #e53935;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
}

.finance-form-error-message {
    background-color: #ffebee;
    color: #e53935;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #e53935;
}

.finance-form-success-message {
    background-color: #fffbeb;
    color: #000;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #f3c023; /* Yellow theme color */
    font-size: 16px;
    text-align: center;
    position: relative;
}

/* Navigation buttons */
.finance-form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.finance-form-prev-btn,
.finance-form-next-btn,
.finance-form-submit-btn,
.finance-form-new-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 50px; /* Rounded buttons as per design */
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.finance-form-prev-btn {
    background-color: #f5f5f5;
    color: #000;
}

.finance-form-prev-btn:hover {
    background-color: #e0e0e0;
}

.finance-form-next-btn,
.finance-form-submit-btn,
.finance-form-new-btn {
    background-color: #000; /* Black background */
    color: #f3c023; /* Yellow text */
}

.finance-form-next-btn:hover,
.finance-form-submit-btn:hover,
.finance-form-new-btn:hover {
    background-color: #f3c023; /* Yellow background on hover */
    color: #000; /* Black text on hover */
}

.finance-form-submit-btn:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Previous button with arrow */
.finance-form-prev-btn:before {
    content: '←';
    margin-right: 8px;
}

/* Next/Continue button with arrow */
.finance-form-next-btn:after,
.finance-form-submit-btn:after {
    content: '→';
    margin-left: 8px;
}

/* Start New Application button - UPDATED */
.finance-form-reset-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #000;
    color: #f3c023;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    margin-left: 20px;
    margin-bottom: 20px;
    text-decoration: none;
    text-align: center;
    position: relative;
    /* Remove absolute positioning to keep inside container */
}

.finance-form-reset-btn:hover {
    background-color: #f3c023;
    color: #000;
}

/* Info box styling */
.finance-form-info-box {
    background-color: #e8f4fd;
    border: 1px solid #b3e0ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
}

.finance-form-info-box:before {
    content: 'ℹ️';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
}

/* Remove all validation success indicators */
.finance-form-validation-success {
    display: none !important;
}

/* Dynamic content styles */
.finance-form-dynamic-divider {
    margin: 30px 0;
    border-top: 2px dashed #ddd;
    position: relative;
    text-align: center;
}

.finance-form-dynamic-divider:before {
    content: 'Previous Address Information';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    padding: 0 15px;
    font-weight: 500;
    color: #000;
}

.finance-form-dynamic-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.finance-form-section-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 15px;
    color: #000;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.finance-form-section-description {
    margin-bottom: 15px;
    color: #666;
    font-style: italic;
}

/* Date of birth fields */
.finance-form-dob-container {
    display: flex;
    gap: 10px;
}

.finance-form-dob-container .finance-form-field-container {
    flex: 1;
    position: relative;
}

/* Trustpilot and secure indicators */
.finance-form-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
}

.finance-form-secure {
    display: flex;
    align-items: center;
    margin-right: 15px;
    font-size: 14px;
    color: #000;
}

.finance-form-secure:before {
    content: '🔒';
    margin-right: 5px;
}

.finance-form-trustpilot {
    display: flex;
    align-items: center;
}

.finance-form-trustpilot-stars {
    color: #00b67a;
    letter-spacing: -2px;
}

/* Terms and privacy section */
.finance-form-terms {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 14px;
    color: #666;
}

.finance-form-terms a {
    color: #f3c023; /* Yellow theme color */
    text-decoration: none;
}

.finance-form-terms a:hover {
    text-decoration: underline;
}

.finance-form-privacy {
    text-align: center;
    margin-top: 20px;
}

.finance-form-privacy a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.finance-form-privacy a:hover {
    color: #f3c023; /* Yellow theme color */
}

/* Contact preferences */
.finance-form-contact-preferences {
    margin-bottom: 20px;
}

.finance-form-contact-preferences h4 {
    margin-bottom: 10px;
    font-weight: 500;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .finance-form-container {
        padding: 15px;
    }
    
    .finance-form-step {
        padding: 15px;
    }
    
    .finance-form-navigation {
        flex-direction: column-reverse;
        gap: 10px;
    }
    
    .finance-form-prev-btn,
    .finance-form-next-btn,
    .finance-form-submit-btn,
    .finance-form-reset-btn {
        width: 100%;
        padding: 12px;
    }
    
    .finance-form-dob-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .finance-form-radio-option {
        flex: 0 0 100%;
    }
    
    /* Responsive years and months container */
    .finance-form-years-months-container {
        flex-direction: column;
        gap: 15px;
    }
}

/* Mobile optimization for success screen buttons */
@media screen and (max-width: 768px) {
  /* Container for buttons to add proper spacing */
  .finance-form-success-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto;
    max-width: 85%;
  }
  
  /* Style for both buttons */
  .finance-form-reset-btn,
  .finance-form-view-stock-btn {
    width: 100%;
    margin: 10px 0;
    padding: 14px 20px;
    border-radius: 30px;
    font-size: 16px;
    text-align: center;
    box-sizing: border-box;
  }
}

/* Extra small devices (phones, 500px and down) */
@media screen and (max-width: 500px) {
  .finance-form-success-buttons {
    max-width: 90%;
  }
  
  .finance-form-reset-btn,
  .finance-form-view-stock-btn {
    padding: 12px 15px;
    font-size: 15px;
  }
}

