* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:rgba(149, 149, 149, 0.759);
    padding: 20px;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Step Indicators */
.step-indicators {
    display: flex;
    background: #f8f9fa;
    padding: 20px;
    justify-content: center;
    gap: 40px;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid #dee2e6;
    background: white;
    color: #6c757d;
    transition: all 0.3s ease;
}

.step-indicator.active {
    background: #343a40;
    color: white;
    border-color: #343a40;
}

.step-indicator.completed {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

/* Form Content */
.step-content {
    display: none;
    padding: 40px;
}

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

.step-content h2 {
    margin-bottom: 30px;
    color: #343a40;
    text-align: center;
    font-size: 24px;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.option-card {
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background: #f8f9fa;
}

.option-card:hover {
    border-color: #667eea;
    background: #e3f2fd;
}

.option-card input[type="radio"] {
    display: none;
}

.option-card input[type="radio"]:checked + .option-text {
    color: #667eea;
    font-weight: bold;
}

.option-card:has(input[type="radio"]:checked) {
    border-color: #667eea;
    background: #e3f2fd;
}

.option-text {
    font-size: 16px;
    color: #495057;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}


/* Address Input Styling */
.address-note {
    margin-top: 5px;
    color: #6c757d;
    font-style: italic;
}

.address-note small {
    display: flex;
    align-items: center;
    gap: 5px;
}

.address-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid #e9ecef;
}

.address-details .form-group {
    margin-bottom: 15px;
}

.address-details input[readonly] {
    background-color: #e9ecef;
    color: #495057;
    cursor: default;
}

.manual-address {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid #ffeaa7;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half-width {
    flex: 1;
}

.address-options {
    text-align: center;
    margin: 20px 0;
}

/* Google Places Autocomplete Styling */
.pac-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    z-index: 10000;
}

.pac-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pac-item:hover {
    background-color: #f8f9fa;
}

.pac-item:last-child {
    border-bottom: none;
}

.pac-item-selected {
    background-color: #e3f2fd;
}

.pac-icon {
    margin-right: 10px;
}

.pac-item-query {
    color: #333;
    font-weight: 500;
}

.pac-matched {
    color: #667eea;
    font-weight: bold;
}

/* Address validation states */
.address-validated {
    border-color: #28a745 !important;
    background-color: #d4edda !important;
}

.address-invalid {
    border-color: #dc3545 !important;
    background-color: #f8d7da !important;
}

/* Loading state for address input */
.address-loading {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMTAiIGN5PSIxMCIgcj0iOCIgc3Ryb2tlPSIjY2NjIiBzdHJva2Utd2lkdGg9IjIiIGZpbGw9Im5vbmUiLz4KPHBhdGggZD0ibTEwIDJhOCA4IDAgMCAxIDggOCIgc3Ryb2tlPSIjNjY3ZWVhIiBzdHJva2Utd2lkdGg9IjIiIGZpbGw9Im5vbmUiPgogIDxhbmltYXRlVHJhbnNmb3JtIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIgYXR0cmlidXRlVHlwZT0iWE1MIiB0eXBlPSJyb3RhdGUiIGR1cj0iMXMiIGZyb209IjAgMTAgMTAiIHRvPSIzNjAgMTAgMTAiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIi8+CjwvcGF0aD4KPC9zdmc+');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px 20px;
}

/* Responsive updates */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group.half-width {
        flex: none;
    }
    
    .pac-container {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}



/* Phone Input Container */
.phone-input-container {
    display: flex;
    gap: 10px;
}

.country-code-select {
    flex: 0 0 auto;
    max-width: 98px;
    padding: 10px !important;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}

.country-code-select:focus {
    outline: none;
    border-color: #667eea;
}

.phone-input-container input[type="tel"] {
    flex: 1;
    margin: 0;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-link {
    background: none;
    color: #667eea;
    text-decoration: underline;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

/* OTP Section */
.otp-section {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* Loading Spinner */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: white;
    margin-top: 20px;
    font-size: 18px;
}

.oregon-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oregon-info strong {
    font-weight: 600;
}
.error-message.duplicate-error {
    background-color: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px 20px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease;
}

.error-message.duplicate-error::before {
    content: "";
    margin-right: 0;
    margin-bottom: 8px;
    font-size: 18px;
    align-self: flex-start;
}

/* Add some emphasis styling */
.duplicate-error strong {
    color: #d63031;
    font-weight: 600;
}

/* Make duplicate errors more prominent */
.duplicate-error {
    border-left: 5px solid #fdcb6e;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.error-message {
    background-color: #f8d7da;
    color: #c81325;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.error-message::before {
    content: "⚠️";
    margin-right: 8px;
    font-size: 16px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 15px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease;
    text-align: center;
}

.success-message::before {
    content: "✅";
    margin-right: 8px;
    font-size: 16px;
}

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


/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        margin: auto;
    }
    
    .step-indicators {
        gap: 20px;
    }
    
    .step-indicator {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .step-content {
        padding: 30px 20px;
    }
    
    .options-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    
    .button-group {
        flex-direction: row;
    }
    
    .phone-input-container {
        flex-direction: row;
        gap: 10px;
    }
    
    /* .country-code-select {
        min-width: 100%;
    } */
}
@media (max-width: 580px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
    .option-card{
        padding: 10px;
    }
}
@media (max-width: 540px) {
    .step-indicators{
        padding: 8px 20px;
    }
    .step-content{
        padding: 20px;
    }
    .step-content h2 {
        margin-bottom:15px ;
    }
    .options-grid {
        gap: 10px;
    }
    .button-group {
        margin-top: 15px;
    }


    .option-card{
        padding: 8px;
    }
}

.required {
    color: #dc3545;
    font-weight: bold;
}

/* Referral source dropdown styling */
select {
    width: 100%;
    padding: 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    color: #6c757d;
}

/* Selected state for dropdown */
select.selected {
    border-color: #28a745;
    background-color: #f8fff9;
}

/* Other referral detail input */
#otherReferralDetail {
    border-color: #ffc107;
    background-color: #fffbf0;
}

#otherReferralDetail:focus {
    border-color: #e0a800;
    background-color: #ffffff;
}

/* Validation states for select */
select:invalid {
    border-color: #dc3545;
}

select:valid {
    border-color: #28a745;
}

/* Enhanced form group spacing for new fields */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    select {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-group.half-width {
        flex: none;
    }
}

@media (max-width: 480px) {
    select {
        padding: 10px 12px;
        font-size: 14px;
    }
}