.gform_submission_error,
.gform_required_legend,
.gform_validation_errors {
    display: none !important;
}

:root {
    --gf-shadcn-bg: #ffffff;
    --gf-shadcn-fg: #020817;
    --gf-shadcn-border: #e2e8f0;
    --gf-shadcn-input-bg: #ffffff;
    --gf-shadcn-ring: #0f172a;
    --gf-shadcn-radius: 0.5rem;
    --gf-shadcn-primary: #0f172a;
    --gf-shadcn-primary-fg: #f8fafc;
    --gf-shadcn-font-size: 0.875rem;
}

body .gform_wrapper.gravity-theme,
body .gform_wrapper {
    direction: rtl;
    text-align: right;
    max-width: 100%;
    margin: 0 auto;
    
    --gf-field-pg-steps-number-bg-color-active: var(--gf-shadcn-primary);
    --gf-field-pg-steps-number-border-color-active: var(--gf-shadcn-primary);
    --gf-field-pg-steps-number-color-active: #ffffff;
    --gf-field-pg-steps-number-bg-color-complete: var(--gf-shadcn-primary);
    --gf-field-pg-steps-number-border-color-complete: var(--gf-shadcn-primary);
    --gf-field-pg-steps-number-color-complete: #ffffff;
}

body .gform_wrapper input[type="text"],
body .gform_wrapper input[type="email"],
body .gform_wrapper input[type="tel"],
body .gform_wrapper input[type="url"],
body .gform_wrapper input[type="password"],
body .gform_wrapper input[type="number"],
body .gform_wrapper textarea,
body .gform_wrapper select {
    display: flex;
    height: 2.6rem;
    width: 100%;
    border-radius: var(--gf-shadcn-radius) !important;
    border: 1px solid var(--gf-shadcn-border) !important;
    background-color: var(--gf-shadcn-input-bg) !important;
    padding: 0.5rem 0.75rem !important;
    font-size: var(--gf-shadcn-font-size) !important;
    line-height: 1.25rem;
    color: var(--gf-shadcn-fg) !important;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    outline: none !important;
    box-sizing: border-box;
}

body .gform_wrapper textarea {
    min-height: 120px;
    height: auto;
    resize: vertical;
    padding-bottom: 3.5rem !important;
}

body .gform_wrapper input:focus,
body .gform_wrapper textarea:focus,
body .gform_wrapper select:focus {
    border-color: var(--gf-shadcn-ring) !important;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--gf-shadcn-ring) !important;
    outline: none !important;
}

body .gform_wrapper .ginput_container_textarea {
    position: relative;
}
body .gform_wrapper .ginput_container_textarea::before,
body .gform_wrapper .ginput_container_textarea::after {
    position: absolute;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    color: #64748b;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 4px 10px 4px 8px;
    line-height: 1;
    pointer-events: none;
    z-index: 10;
}
body .gform_wrapper .ginput_container_textarea::before {
    content: "زبان: فارسی";
    right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' x2='22' y1='12' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 24px;
}
body .gform_wrapper .ginput_container_textarea::after {
    content: "محدودیت تعداد کارکتر: نامحدود";
    right: 115px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3Cpath d='M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16'/%3E%3Cpath d='M16 16h5v5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 24px;
}

body .gform_wrapper .gfield_label {
    display: inline-block;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    line-height: 1;
    margin-bottom: 0.4rem !important;
    color: var(--gf-shadcn-fg);
}
body .gform_wrapper .gfield_required {
    color: #ef4444;
    margin-right: 2px;
}
body .gform_wrapper .gfield_description {
    font-size: 0.8rem !important;
    color: #64748b !important;
    margin-top: 0.25rem;
}

body .gform_wrapper .gf_page_steps {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important; 
    gap: 2rem !important;
    border-bottom: 1px solid var(--gf-shadcn-border);
    padding: 0 0 2rem 0;
    margin: 0 0 2rem 0;
    width: 100%;
}

body .gform_wrapper .gf_page_steps .gf_step,
body .gform_wrapper .gf_page_steps .gf_step a,
body .gform_wrapper .gf_page_steps .gf_step span.gf_step_number,
body .gform_wrapper .gf_page_steps .gf_step span.gf_step_label {
    float: none !important;
    clear: none !important;
}

body .gform_wrapper .gf_page_steps .gf_step,
body .gform_wrapper .gf_page_steps .gf_step a {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    text-decoration: none !important;
}

body .gform_wrapper .gf_page_steps .gf_step.gf_step_active,
body .gform_wrapper .gf_page_steps .gf_step.gform_multi_page_nav-step-current {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
}

body .gform_wrapper .gf_step_number {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 2rem !important;
    height: 2rem !important;
    min-width: 2rem !important;
    border-radius: 9999px;
    background-color: transparent;
    border: 1px solid var(--gf-shadcn-border);
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1 !important;
    font-family: inherit;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

body .gform_wrapper .gf_step_label {
    font-size: 0.875rem !important;
    font-weight: 500;
    color: #64748b;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: -0.01em;
    white-space: nowrap !important;
    width: auto !important;
    display: inline-block !important;
}

body .gform_wrapper .gf_step_active .gf_step_number,
body .gform_wrapper .gform_multi_page_nav-step-current .gf_step_number {
    background-color: var(--gf-shadcn-primary);
    color: var(--gf-shadcn-primary-fg);
    border-color: var(--gf-shadcn-primary);
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--gf-shadcn-border);
}

body .gform_wrapper .gf_step_active .gf_step_label,
body .gform_wrapper .gform_multi_page_nav-step-current .gf_step_label {
    color: var(--gf-shadcn-fg);
    font-weight: 600;
}

body .gform_wrapper .gf_step_completed .gf_step_number {
    background-color: var(--gf-shadcn-primary) !important;
    border-color: var(--gf-shadcn-primary) !important;
    color: #ffffff !important;
}
body .gform_wrapper .gf_step_completed .gf_step_label {
    color: var(--gf-shadcn-fg);
}

body .gform_wrapper .gf_step::before,
body .gform_wrapper .gf_step::after,
body .gform_wrapper .gf_step_clear,
body .gform_wrapper .gf_page_steps hr {
    display: none !important;
    content: none !important;
}

body .gform_wrapper .gform_page_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

body .gform_wrapper .gform_footer input[type="submit"],
body .gform_wrapper .gform_page_footer .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--gf-shadcn-radius) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    height: 3rem !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
}

body .gform_wrapper .gform_page_footer .gform_next_button,
body .gform_wrapper input[type="submit"] {
    background-color: var(--gf-shadcn-primary) !important;
    color: var(--gf-shadcn-primary-fg) !important;
    padding: 0.75rem 1.5rem !important;
    min-width: 120px;
}

body .gform_wrapper .gform_page_footer .gform_previous_button {
    background-color: #ffffff !important;
    color: var(--gf-shadcn-fg) !important;
    border: 1px solid var(--gf-shadcn-border) !important;
    padding: 0.75rem 1.5rem !important;
}

body .gform_wrapper .gform_page_footer .gform_next_button {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f8fafc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15 18 9 12 15 6'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center !important;
    padding-left: 2.5rem !important;
}
body .gform_wrapper .gform_page_footer .gform_previous_button {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23020817' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center !important;
    padding-right: 2.5rem !important;
}
body .gform_wrapper input[type="submit"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23f8fafc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'%3E%3C/line%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'%3E%3C/polygon%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.5rem center !important;
    padding-right: 3rem !important;
}

body .gform_wrapper input[type="submit"]:hover,
body .gform_wrapper .gform_page_footer .gform_next_button:hover {
    background-color: #1e293b !important;
    transform: translateY(-2px);
}
body .gform_wrapper .gform_page_footer .gform_previous_button:hover {
    background-color: #f8fafc !important;
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    body .gform_wrapper .gf_page_steps .gf_step,
    body .gform_wrapper .gf_page_steps .gf_step a,
    body .gform_wrapper .gf_page_steps .gf_step.gf_step_active {
        flex-direction: column !important;
        text-align: center !important;
        gap: 0.5rem !important;
    }
    
    body .gform_wrapper .gf_step_label {
        white-space: normal !important;
        text-align: center !important;
    }
}