/**
 * Frontend styles for Wrecker Forms & Ajánlatkérő
 */

.wf-form-container {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
    box-sizing: border-box;
}

.wf-form-container * {
    box-sizing: border-box;
}

/* Fields Grid Layout */
.wf-form-fields-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 24px;
    align-items: flex-start;
}

.wf-form-group {
    display: flex;
    flex-direction: column;
}

.wf-col-50 {
    flex: 1 1 calc(50% - 12px);
    min-width: 280px;
}

.wf-col-100 {
    flex: 1 1 100%;
    width: 100%;
}

.wf-col-33 {
    flex: 1 1 calc(33.333% - 16px);
    min-width: 200px;
}

@media screen and (max-width: 640px) {
    .wf-col-50,
    .wf-col-33 {
        flex: 1 1 100%;
        min-width: 100%;
    }
}

/* Labels & Required Star */
.wf-field-label {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.3;
}

.wf-req-star {
    font-size: 15px;
    color: #ef4444;
    font-weight: 800;
    display: inline-block;
    line-height: 1;
    margin-left: 2px;
}

/* Input Fields */
.wf-input-wrapper {
    position: relative;
    width: 100%;
}

.wf-input-field,
.wf-select-field,
.wf-textarea-field {
    width: 100% !important;
    background-color: #fdfdfd !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    color: #0f172a !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    box-shadow: none !important;
}

.wf-input-field,
.wf-select-field {
    height: 52px !important;
    padding: 0 18px !important;
}

.wf-textarea-field {
    height: 130px !important;
    padding: 14px 18px !important;
    resize: vertical;
    line-height: 1.5;
}

.wf-input-field::placeholder,
.wf-textarea-field::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

.wf-input-field:focus,
.wf-select-field:focus,
.wf-textarea-field:focus {
    border-color: #2563eb !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    outline: none !important;
}

/* Error state on input */
.wf-form-group.has-error .wf-input-field,
.wf-form-group.has-error .wf-select-field,
.wf-form-group.has-error .wf-textarea-field {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.wf-field-error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 5px;
    font-weight: 600;
}

/* Custom Select Dropdown */
.wf-select-wrapper {
    position: relative;
    width: 100%;
}

.wf-select-field {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 42px !important;
    cursor: pointer;
}

.wf-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #64748b;
}

/* Checkbox Style */
.wf-type-checkbox {
    margin-top: 6px;
}

.wf-checkbox-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 13.5px;
    line-height: 1.45;
    color: #475569;
    user-select: none;
}

.wf-checkbox-field {
    width: 18px !important;
    height: 18px !important;
    margin-top: 2px !important;
    border-radius: 4px !important;
    border: 1px solid #cbd5e1 !important;
    accent-color: #0f172a !important;
    cursor: pointer;
    flex-shrink: 0;
}

.wf-checkbox-text {
    flex: 1;
}

/* Captcha Styling */
.wf-captcha-group {
    margin-top: 8px;
}

.wf-math-captcha-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.wf-math-question {
    background: #f1f5f9;
    color: #0f172a;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    user-select: none;
    letter-spacing: 0.05em;
}

.wf-math-input {
    max-width: 140px !important;
    text-align: center;
    font-size: 16px !important;
    font-weight: 700 !important;
}

.g-recaptcha,
.cf-turnstile {
    margin-top: 4px;
}

/* Submit Button */
.wf-submit-wrapper {
    margin-top: 24px;
    width: 100%;
}

.wf-submit-btn {
    width: 100%;
    height: 56px;
    background-color: #ffe600 !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 9999px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(255, 230, 0, 0.25);
}

.wf-submit-btn:hover {
    background-color: #ffd700 !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 230, 0, 0.4);
}

.wf-submit-btn:active {
    transform: translateY(0);
}

.wf-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Spinner */
.wf-btn-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000000;
    border-radius: 50%;
    animation: wfSpin 0.7s linear infinite;
}

@keyframes wfSpin {
    to { transform: rotate(360deg); }
}

/* Form Response Alert Box */
.wf-form-alert {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
    animation: wfAlertIn 0.3s ease;
}

@keyframes wfAlertIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wf-alert-success {
    background-color: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.wf-alert-error {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.wf-error-box {
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #b91c1c;
    border-radius: 8px;
    font-weight: bold;
}
