
.dynamicForm {
    width: 95%;
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    font-size: 1.1rem !important;
    border: 2px solid #ccc;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.dynamicForm .form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: flex-start;
}

.dynamicForm .form-label {
    flex: 0 0 40%;
    padding-right: 10px;
    font-weight: normal;
}

.dynamicForm .form-field {
    flex: 1;
}

.dynamicForm input[type="text"],
.dynamicForm input[type="number"],
.dynamicForm input[type="email"],
.dynamicForm input[type="tel"],
.dynamicForm input[type="date"],
.dynamicForm select,
.dynamicForm textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 15px;
}

.dynamicForm textarea {
    resize: vertical;
    min-height: 80px;
}

.dynamicForm .checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Fancy submit button */

.dynamicForm {
    width: 95%;
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    font-size: 1.1rem !important;
    border: 2px solid #ccc;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.submit-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 28px 10px 10px;
    background-color: #DCB5D5;
    border: none;
    border-radius: 999px;
    font-size: 1.1rem !important;
    color: #231F20;
    cursor: pointer;
    overflow: hidden;
}

.highlight {
    position: absolute;
    width: 32px;
    height: 32px;
    background-color: #FFF5E6;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #231F20;
    flex-shrink: 0;
    z-index: 0;
    transition: width 0.4s ease;
}

.submit-button:hover .highlight {
    width: calc(100% - 20px);
}

.button-content {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 1;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #DCB5D5;
    border-top: 2px solid #231F20;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.submit-button.submitting .checkmark {
    display: none;
}

.submit-button.submitting .spinner {
    display: block;
}

.checkmark {
    font-size: 20px;
    color: #231F20;
}

.circle {
    width: 32px;
    height: 32px;
    background-color: #FFF5E6;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.text {
    transition: opacity 0.3s ease;
}

.submit-button.submitting .text {
    opacity: 0.5;
}



.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 4px;
}

input:invalid, textarea:invalid, select:invalid {
    border-color: red;
}

/* Responsive: stack label and field vertically on small screens */
@media (max-width: 768px) {
    .dynamicForm .form-row {
        flex-direction: column;
    }

    .dynamicForm .form-label,
    .dynamicForm .form-field {
        flex: 1 1 100%;
        padding-right: 0;
        width: 100%;
    }

    .dynamicForm input[type="text"],
    .dynamicForm input[type="number"],
    .dynamicForm input[type="email"],
    .dynamicForm input[type="tel"],
    .dynamicForm input[type="date"],
    .dynamicForm select,
    .dynamicForm textarea {
        width: 100%;
        box-sizing: border-box;
    }
}

