/* Membershiping Unified Form Component Styles */

/* Base form container */
.membershiping-form {
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    padding: 30px !important;
    max-width: 500px !important;
    margin: 0 auto !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #333 !important;
}

/* Ensure all text elements within the form inherit the correct font */
.membershiping-form * {
    font-family: inherit !important;
}

/* Form title */
.membershiping-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

/* Field container */
.membershiping-field {
    margin-bottom: 20px;
}

/* Field labels */
.membershiping-field label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    color: #333 !important;
    font-family: inherit !important;
    font-size: 14px !important;
}

/* Required asterisk */
.membershiping-field .required {
    color: #d63638;
}

/* Input fields styling */
.membershiping-field input[type="text"],
.membershiping-field input[type="email"],
.membershiping-field input[type="tel"],
.membershiping-field input[type="url"],
.membershiping-field input[type="number"],
.membershiping-field textarea,
.membershiping-field select {
    width: 100% !important;
    padding: 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    transition: border-color 0.3s !important;
    box-sizing: border-box !important;
}

/* Focus states */
.membershiping-field input:focus,
.membershiping-field textarea:focus,
.membershiping-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

/* Textarea specific styling */
.membershiping-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* Error states */
.membershiping-field .field-error {
    border-color: #d63638;
}

.membershiping-field .field-error-message {
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.membershiping-field .field-error + .field-error-message {
    display: block;
}

/* Checkbox and radio button styling */
.membershiping-field .radio-label,
.membershiping-field .checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    font-weight: normal !important;
    font-family: inherit !important;
    font-size: 14px !important;
    color: #333 !important;
}

.membershiping-field .radio-label input,
.membershiping-field .checkbox-label input {
    margin-right: 8px;
    margin-bottom: 0;
    width: auto;
}

/* Terms field specific styling */
.membershiping-field-terms {
    margin-bottom: 20px;
}

.membershiping-field-terms label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-weight: normal !important;
    font-family: inherit !important;
    font-size: 14px !important;
    color: #333 !important;
}

.membershiping-field-terms input[type="checkbox"] {
    margin: 0;
    width: auto;
    flex-shrink: 0;
    margin-top: 2px;
}

.membershiping-field-terms a {
    color: #007cba;
    text-decoration: none;
}

.membershiping-field-terms a:hover {
    text-decoration: underline;
}

/* Submit button and actions */
.membershiping-submit-field,
.membershiping-form-actions {
    margin-top: 25px;
    text-align: center;
}

.membershiping-submit-btn {
    background: #0073aa !important;
    color: #fff !important;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.membershiping-submit-btn:hover {
    background: #005a87 !important;
}

.membershiping-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Form messages */
.membershiping-form-messages {
    margin-top: 15px;
}

.membershiping-form-messages .success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.membershiping-form-messages .error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Form specific variations */
.membershiping-form.membershiping-form-popup {
    position: relative;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.membershiping-form.membershiping-form-inline {
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 20px 0;
}

.membershiping-form.membershiping-form-widget {
    padding: 20px;
    max-width: none;
}

/* Additional class support for legacy compatibility */
.membershiping-form.formmmmmmm {
    position: relative; /* Legacy class support - all styling already applied above */
}

/* Responsive design */
@media (max-width: 768px) {
    .membershiping-form {
        padding: 20px;
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .membershiping-field input,
    .membershiping-field textarea,
    .membershiping-field select {
        padding: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .membershiping-submit-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .membershiping-form {
        padding: 15px;
        margin: 5px;
        max-width: calc(100% - 10px);
    }
    
    .membershiping-field {
        margin-bottom: 15px;
    }
    
    .membershiping-field label {
        margin-bottom: 6px;
    }
}
