/**
 * vPlans Lead Form - Frontend Styles v3.0
 * File: assets/css/vplans-form.css
 */

.vplans-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vplans-field {
    margin-bottom: 16px;
}

.vplans-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.vplans-field .required {
    color: #ef4444;
    margin-left: 2px;
}

[dir="rtl"] .vplans-field .required {
    margin-left: 0;
    margin-right: 2px;
}

.vplans-field input,
.vplans-field select,
.vplans-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.vplans-field input:focus,
.vplans-field select:focus,
.vplans-field textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.vplans-field input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

/* Checkbox - Mailing Consent */
.vplans-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal !important;
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
}

.vplans-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #3b82f6;
}

/* Phone Field */
.vplans-phone-wrapper {
    display: flex;
    gap: 8px;
}

.vplans-phone-prefix {
    width: 110px !important;
    flex-shrink: 0;
    padding: 12px 8px !important;
    text-align: center;
}

.vplans-phone-input {
    flex: 1;
    direction: ltr;
    text-align: left;
}

/* Submit Button */
.vplans-submit {
    margin-top: 20px;
}

.vplans-submit button {
    width: 100%;
    padding: 12px 24px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.vplans-submit button:hover {
    background: #2563eb;
}

.vplans-submit button:active {
    transform: scale(0.98);
}

.vplans-submit button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Success Message */
.vplans-success {
    padding: 20px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Error Message */
.vplans-error {
    padding: 12px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 6px;
    margin-bottom: 16px;
    text-align: center;
}

/* Loading Animation */
.vplans-submit button:disabled::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: vp-spin 0.8s linear infinite;
}

[dir="rtl"] .vplans-submit button:disabled::after {
    margin-left: 0;
    margin-right: 8px;
}

@keyframes vp-spin {
    to { transform: rotate(360deg); }
}

/* Powered By vPlans */
.vplans-powered-by {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    font-size: 11px;
    color: #c0c0c0;
    letter-spacing: 0.3px;
}

.vplans-powered-by a {
    color: #c0c0c0;
    text-decoration: none;
    transition: color 0.2s;
}

.vplans-powered-by a:hover {
    color: #999;
}

/* Responsive */
@media (max-width: 480px) {
    .vplans-form-wrapper {
        padding: 16px;
        border-radius: 8px;
    }
    
    .vplans-phone-wrapper {
        flex-direction: column !important;
    }
    
    .vplans-phone-prefix {
        width: 100% !important;
    }
}
