/* --- Global Form Styles --- */
#svf-form-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 35px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

/* --- Field Layout --- */
.svf-field {
    margin-bottom: 20px;
}

/* --- Labels --- */
#svf-form-wrapper label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50; /* Darker, softer black */
}

/* --- Inputs, Textarea, Select --- */
#svf-form-wrapper input[type="text"],
#svf-form-wrapper input[type="tel"],
#svf-form-wrapper textarea,
#svf-form-wrapper select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    box-sizing: border-box; /* Important for padding and width */
    font-size: 16px;
    color: #34495e;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#svf-form-wrapper input[type="text"]:focus,
#svf-form-wrapper input[type="tel"]:focus,
#svf-form-wrapper textarea:focus,
#svf-form-wrapper select:focus {
    border-color: #3498db; /* A nice blue */
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}

#svf-form-wrapper textarea {
    min-height: 120px;
    resize: vertical;
}

/* --- Button Styles --- */
#svf-form-wrapper button,
#svf-otp-content button {
    width: 100%;
    padding: 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

#svf-form-wrapper button:hover,
#svf-otp-content button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

#svf-form-wrapper button:disabled,
#svf-otp-content button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: translateY(0);
}

/* --- Message Area --- */
.svf-message, .svf-otp-message {
    padding: 15px;
    margin-top: 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

/* --- OTP Modal Styles --- */
#svf-otp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* This class will be toggled by JS to show/hide the modal */
#svf-otp-modal.svf-is-visible {
    opacity: 1;
    visibility: visible;
}

#svf-otp-content {
    background: white;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 90%;
    max-width: 400px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

#svf-otp-modal.svf-is-visible #svf-otp-content {
    transform: scale(1);
}

#svf-otp-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 24px;
}

#svf-otp-content p {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 16px;
}

#svf-otp-content input[type="text"] {
    padding: 12px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 8px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 25px;
}

#svf-otp-content input[type="text"]:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    outline: none;
}


/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
    #svf-form-wrapper {
        margin: 20px;
        padding: 25px;
    }

    #svf-otp-content {
        padding: 25px;
    }

    #svf-otp-content h3 {
        font-size: 20px;
    }

    #svf-otp-content p {
        font-size: 14px;
    }
}