/* Nadlan360 – Elementor contact form styling (v2)
 *
 * HOW TO USE:
 * 1. Edit your Elementor Form widget.
 * 2. In Advanced → CSS Classes, add: n360-contact-form
 * 3. This CSS will target that form robustly.
 */

/* Base wrapper by widget class */
.elementor-widget-form.n360-contact-form,
.n360-contact-form {
    --n360-primary: #1e3c72;
    --n360-primary-2: #2a5298;
    --n360-accent: #ffd700;
    --n360-bg: #f5f7fb;
    --n360-border: #e5e7eb;
    --n360-danger: #dc3545;
    --n360-success-bg: #ecfdf3;
    --n360-success-border: #22c55e;
    --n360-success-text: #166534;
    --n360-radius: 8px;
    --n360-radius-lg: 999px;
}

/* Ensure RTL + alignment on the form itself */
.elementor-widget-form.n360-contact-form .elementor-form,
.n360-contact-form .elementor-form {
    direction: rtl;
    text-align: right;
}

.elementor-widget-form.n360-contact-form .elementor-form-fields-wrapper,
.n360-contact-form .elementor-form-fields-wrapper {
    row-gap: 16px;
    column-gap: 16px;
}

.elementor-widget-form.n360-contact-form .elementor-field-group,
.n360-contact-form .elementor-field-group {
    margin-bottom: 0;
}

/* Labels */
.elementor-widget-form.n360-contact-form .elementor-field-label,
.n360-contact-form .elementor-field-label {
    font-weight: 600;
    margin-bottom: 4px;
    color: #111827;
    display: block;
}

.elementor-widget-form.n360-contact-form .required,
.n360-contact-form .required,
.elementor-widget-form.n360-contact-form .elementor-mark-required .elementor-field-label:after,
.n360-contact-form .elementor-mark-required .elementor-field-label:after {
    color: var(--n360-danger);
}

/* Inputs, selects & textarea */
.elementor-widget-form.n360-contact-form .elementor-field,
.n360-contact-form .elementor-field,
.elementor-widget-form.n360-contact-form .elementor-field-textual,
.n360-contact-form .elementor-field-textual,
.elementor-widget-form.n360-contact-form select,
.n360-contact-form select,
.elementor-widget-form.n360-contact-form textarea,
.n360-contact-form textarea {
    padding: 11px 14px !important;
    border-radius: var(--n360-radius) !important;
    border: 2px solid var(--n360-border) !important;
    background-color: #ffffff !important;
    font-size: 1rem !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.elementor-widget-form.n360-contact-form .elementor-field:focus,
.n360-contact-form .elementor-field:focus,
.elementor-widget-form.n360-contact-form select:focus,
.n360-contact-form select:focus,
.elementor-widget-form.n360-contact-form textarea:focus,
.n360-contact-form textarea:focus {
    outline: none !important;
    border-color: var(--n360-primary-2) !important;
    box-shadow: 0 0 0 1px rgba(42, 82, 152, 0.08);
    background-color: #ffffff;
}

.elementor-widget-form.n360-contact-form textarea,
.n360-contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

/* Placeholder styling */
.elementor-widget-form.n360-contact-form ::placeholder,
.n360-contact-form ::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Acceptance / checkbox – text on same line */
.elementor-widget-form.n360-contact-form .elementor-field-type-acceptance .elementor-field-subgroup,
.n360-contact-form .elementor-field-type-acceptance .elementor-field-subgroup,
.elementor-widget-form.n360-contact-form .elementor-field-type-checkbox .elementor-field-subgroup,
.n360-contact-form .elementor-field-type-checkbox .elementor-field-subgroup {
    display: flex;
    align-items: center;
    gap: 8px;
}

.elementor-widget-form.n360-contact-form .elementor-field-type-acceptance input,
.n360-contact-form .elementor-field-type-acceptance input,
.elementor-widget-form.n360-contact-form .elementor-field-type-checkbox input,
.n360-contact-form .elementor-field-type-checkbox input {
    margin: 0;
}

.elementor-widget-form.n360-contact-form .elementor-field-type-acceptance .elementor-field-label,
.n360-contact-form .elementor-field-type-acceptance .elementor-field-label,
.elementor-widget-form.n360-contact-form .elementor-field-type-checkbox .elementor-field-label,
.n360-contact-form .elementor-field-type-checkbox .elementor-field-label {
    margin: 0;
    font-weight: 400;
}

/* Submit button – pill style, centered */
.elementor-widget-form.n360-contact-form .elementor-field-type-submit,
.n360-contact-form .elementor-field-type-submit {
    text-align: center;
    margin-top: 8px;
}

.elementor-widget-form.n360-contact-form .elementor-button,
.n360-contact-form .elementor-button {
    border-radius: var(--n360-radius-lg) !important;
    padding: 12px 40px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    border: none !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04) !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.elementor-widget-form.n360-contact-form .elementor-button-icon,
.n360-contact-form .elementor-button-icon {
    display: inline-flex;
}

/* Let Elementor control the background/gradient of the button */
.elementor-widget-form.n360-contact-form .elementor-button,
.n360-contact-form .elementor-button {
    background-image: none;
}

/* Success & error messages */
.elementor-widget-form.n360-contact-form .elementor-message,
.n360-contact-form .elementor-message {
    direction: rtl;
    text-align: right;
    margin-top: 16px;
    font-size: 0.95rem;
}

.elementor-widget-form.n360-contact-form .elementor-message.elementor-message-success,
.n360-contact-form .elementor-message.elementor-message-success {
    border: 2px solid var(--n360-success-border);
    background-color: var(--n360-success-bg);
    color: var(--n360-success-text);
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 500;
}

.elementor-widget-form.n360-contact-form .elementor-message.elementor-message-success:before,
.n360-contact-form .elementor-message.elementor-message-success:before {
    content: "✅ ";
    margin-left: 4px;
}

.elementor-widget-form.n360-contact-form .elementor-message.elementor-message-danger,
.n360-contact-form .elementor-message.elementor-message-danger {
    border-radius: 8px;
    padding: 10px 14px;
    font-weight: 500;
    color: var(--n360-danger);
    background-color: #fff1f2;
    border: 1px solid #fecaca;
}

/* Field error state */
.elementor-widget-form.n360-contact-form .elementor-field-group.elementor-error .elementor-field,
.n360-contact-form .elementor-field-group.elementor-error .elementor-field {
    border-color: var(--n360-danger) !important;
}

/* Responsive tweaks */
@media (max-width: 767px) {
    .elementor-widget-form.n360-contact-form .elementor-form-fields-wrapper,
    .n360-contact-form .elementor-form-fields-wrapper {
        row-gap: 12px;
    }

    .elementor-widget-form.n360-contact-form .elementor-button,
    .n360-contact-form .elementor-button {
        width: 100%;
        justify-content: center;
    }
}
