/* ============================================
   EduLead Forms — Public Stylesheet
   CSS custom properties drive all theming.
   ============================================ */

.edulead-wrapper {
    --edulead-primary:   #4F46E5;
    --edulead-bg:        #ffffff;
    --edulead-text:      #1f2937;
    --edulead-label:     #374151;
    --edulead-radius:    8px;
    --edulead-font-size: 15px;
    --edulead-input-bg:  #f9fafb;
    --edulead-border:    #d1d5db;
    --edulead-focus-shadow: 0 0 0 3px rgba(79,70,229,0.15);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: var(--edulead-font-size);
    color: var(--edulead-text);
    width: 100%;
    box-sizing: border-box;
}

/* Title & Description */
.edulead-title {
    font-size: 1.35em;
    font-weight: 700;
    color: var(--edulead-text);
    margin: 0 0 6px;
    line-height: 1.3;
}

.edulead-desc {
    color: #6b7280;
    margin: 0 0 24px;
    font-size: 0.93em;
    line-height: 1.5;
}

/* Form rows */
.edulead-form-row {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.edulead-submit-row {
    margin-top: 8px;
}

/* Labels */
.edulead-label {
    font-size: 0.88em;
    font-weight: 600;
    color: var(--edulead-label);
    letter-spacing: 0.01em;
}

.edulead-required {
    color: #ef4444;
    margin-left: 2px;
}

/* Inputs */
.edulead-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--edulead-input-bg);
    border: 1.5px solid var(--edulead-border);
    border-radius: var(--edulead-radius);
    font-size: 1em;
    color: var(--edulead-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    font-family: inherit;
}

.edulead-input:focus {
    border-color: var(--edulead-primary);
    box-shadow: var(--edulead-focus-shadow);
    background: #fff;
}

.edulead-input::placeholder {
    color: #9ca3af;
}

.edulead-input.edulead-input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

/* Textarea */
textarea.edulead-input {
    resize: vertical;
    min-height: 90px;
}

/* Select */
select.edulead-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Radio */
.edulead-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.edulead-radio-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    font-size: 0.95em;
    color: var(--edulead-text);
}

.edulead-radio-label input[type="radio"] {
    accent-color: var(--edulead-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Checkbox */
.edulead-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95em;
    color: var(--edulead-text);
}

.edulead-checkbox {
    accent-color: var(--edulead-primary);
    width: 17px;
    height: 17px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Help text */
.edulead-help {
    font-size: 0.82em;
    color: #9ca3af;
    margin: 0;
    line-height: 1.4;
}

/* Field error */
.edulead-field-error {
    font-size: 0.82em;
    color: #ef4444;
    min-height: 0;
    line-height: 1.4;
}

/* Submit button */
.edulead-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px 28px;
    background: var(--edulead-primary);
    color: #fff;
    border: none;
    border-radius: var(--edulead-radius);
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    width: 100%;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.edulead-btn:hover:not(:disabled) {
    opacity: 0.88;
}

.edulead-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.edulead-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner */
.edulead-btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: edulead-spin 0.7s linear infinite;
}

.edulead-btn.is-loading .edulead-btn-spinner {
    display: block;
}

@keyframes edulead-spin {
    to { transform: rotate(360deg); }
}

/* Form-level message */
.edulead-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: var(--edulead-radius);
    font-size: 0.93em;
    font-weight: 500;
    display: none;
    text-align: center;
    line-height: 1.5;
}

.edulead-message.edulead-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.edulead-message.edulead-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* Error banner (plugin-level) */
p.edulead-error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 480px) {
    .edulead-wrapper {
        padding: 20px 16px;
    }
}
