/* Base form styles */
.static-form-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.static-form {
    width: 100%;
    box-sizing: border-box;
}

/* Grid system for form groups */
.static-form .form-group {
    display: inline-block;
    vertical-align: top;
    margin-bottom: 20px;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Field width classes */
.static-form .form-group.width-100 { width: 100%; }
.static-form .form-group.width-75 { width: 75%; }
.static-form .form-group.width-66 { width: 66.66%; }
.static-form .form-group.width-50 { width: 50%; }
.static-form .form-group.width-33 { width: 33.33%; }
.static-form .form-group.width-25 { width: 25%; }

/* Labels */
.static-form label {
    display: block;
    margin-bottom: 8px;
    color: #444;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
}

/* Basic form elements */
.static-form input[type="text"],
.static-form input[type="email"],
.static-form input[type="url"],
.static-form input[type="tel"],
.static-form input[type="number"],
.static-form input[type="date"],
.static-form input[type="time"],
.static-form input[type="password"],
.static-form textarea,
.static-form select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #444;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin: 0;
    font-family: inherit;
}

/* Textarea specific */
.static-form textarea {
    min-height: 120px;
    resize: vertical;
    padding: 12px 15px;
}

/* Select specific */
.static-form select {
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5'%3E%3Cpath d='M0 0l5 5 5-5z' fill='%23444444'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Focus states */
.static-form input:focus,
.static-form textarea:focus,
.static-form select:focus {
    outline: none;
    border-color: #666;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* File upload styling */
.static-form input[type="file"] {
    display: block;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.static-form input[type="file"]:hover {
    border-color: #999;
    background-color: #f5f5f5;
}

/* Radio and Checkbox styles */
.static-form .radio-group,
.static-form .checkbox-group {
    margin: 5px 0;
}

.static-form .radio-wrapper,
.static-form .checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    cursor: pointer;
}

.static-form .radio-wrapper input[type="radio"],
.static-form .checkbox-wrapper input[type="checkbox"] {
    margin: 3px 8px 0 0;
}

.static-form .radio-wrapper label,
.static-form .checkbox-wrapper label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

/* Step navigation */
.static-form .step-navigation {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    gap: 10px;
}

.static-form .step-prev,
.static-form .step-next {
    padding: 10px 20px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.static-form .step-prev:hover,
.static-form .step-next:hover {
    background-color: #e9e9e9;
}

.static-form .step-prev:disabled,
.static-form .step-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress bar */
.static-form .step-progress {
    height: 4px;
    background-color: #eee;
    border-radius: 2px;
    margin-bottom: 30px;
    overflow: hidden;
}

.static-form .step-progress-bar {
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.3s ease;
}

/* Submit button */
.static-form .submit-button {
    margin-top: 25px;
    text-align: center;
}

.static-form button[type="submit"] {
    padding: 12px 30px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.static-form button[type="submit"]:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.static-form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: none;
}

/* reCAPTCHA Styles */
.static-form .recaptcha-wrapper {
    margin-bottom: 20px;
}

.static-form .g-recaptcha {
    display: inline-block;
}

.static-form .g-recaptcha iframe {
    margin: 0;
}

/* Error states */
.static-form .has-error input,
.static-form .has-error textarea,
.static-form .has-error select {
    border-color: #dc3545;
}

.static-form .error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    padding: 5px 0;
}

/* Success message */
.static-form-wrapper .success-message {
    padding: 20px;
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

/* Loading state */
.static-form-wrapper.loading {
    opacity: 0.7;
    pointer-events: none;
}

.static-form-wrapper.loading button[type="submit"] {
    position: relative;
    color: transparent;
}

.static-form-wrapper.loading button[type="submit"]::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: form-spinner 0.8s linear infinite;
}

/* Animations */
@keyframes form-spinner {
    to {transform: rotate(360deg);}
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .static-form input[type="text"],
    .static-form input[type="email"],
    .static-form input[type="url"],
    .static-form input[type="tel"],
    .static-form input[type="number"],
    .static-form input[type="date"],
    .static-form input[type="time"],
    .static-form input[type="password"],
    .static-form textarea,
    .static-form select {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }

    .static-form label {
        color: #e0e0e0;
    }

    .static-form input[type="file"] {
        background-color: #2d2d2d;
        border-color: #404040;
    }

    .static-form .step-prev,
    .static-form .step-next {
        background-color: #2d2d2d;
        border-color: #404040;
        color: #e0e0e0;
    }

    .static-form .success-message {
        background-color: #1e4620;
        border-color: #2a602c;
        color: #9be9a8;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .static-form .form-group {
        width: 100% !important;
        padding: 0;
    }

    .static-form .step-navigation {
        flex-direction: column;
    }

    .static-form .step-prev,
    .static-form .step-next {
        width: 100%;
    }

    .static-form button[type="submit"] {
        width: 100%;
    }

    .static-form .g-recaptcha {
        transform: scale(0.9);
        transform-origin: left center;
    }
}