/*
Theme Name: Hello Biz Child
Theme URI: https://example.com
Description: תבנית בן מעודכנת עם ביטול הולידציה של אלמנטור והוספת הולידציה מותאמת אישית
Author: Hezy Sela
Author URI: https://example.com
Template: hello-biz
Version: 2.1.5
Requires at least: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hello-biz-child
Domain Path: /languages

/*
 * תבנית בן זו כוללת:
 * 1. ביטול הולידציה של אלמנטור Pro
 * 2. הוספת הולידציה מותאמת אישית לטלפון
 * 3. הוספת הולידציה מותאמת אישית לאימייל
 * 4. הוספת הולידציה מותאמת אישית ל-URL
 * 5. בדיקות נוספות וטיפול בשגיאות
 */

/* Parent theme styles */
@import url("../hello-biz/style.css");

/* ===================================
   עברית - תמיכה בטקסט מימין לשמאל
   =================================== */

html[lang="he"] {
    direction: rtl;
    text-align: right;
}

html[lang="he"] body {
    direction: rtl;
}

html[lang="he"] .elementor-field-group {
    direction: rtl;
}

/* ===================================
   טפסים - Elementor Forms
   =================================== */

.elementor-form-fields-wrapper {
    direction: rtl;
}

.elementor-field {
    direction: rtl;
}

.elementor-field-label {
    direction: rtl;
    text-align: right;
}

/* ===================================
   הודעות שגיאה - Validation Messages
   =================================== */

.elementor-message-danger {
    color: #c1272d;
    background-color: #fde9e9;
    border-left: 4px solid #c1272d;
    padding: 12px 15px;
    margin-top: 8px;
    border-radius: 3px;
    font-size: 14px;
    direction: rtl;
    text-align: right;
}

html[lang="he"] .elementor-message-danger {
    border-left: 0;
    border-right: 4px solid #c1272d;
}

.elementor-message-danger[data-custom-error="true"] {
    animation: slideInRight 0.3s ease-in-out;
}

/* ===================================
   שדות עם שגיאות
   =================================== */

.elementor-field-group.error input,
.elementor-field-group.error textarea,
.elementor-field-group.error select {
    border-color: #c1272d !important;
    background-color: #fff9f9;
}

.elementor-field-group.error input:focus,
.elementor-field-group.error textarea:focus,
.elementor-field-group.error select:focus {
    border-color: #c1272d !important;
    box-shadow: 0 0 0 3px rgba(193, 39, 45, 0.1);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
    border-color: #c1272d !important;
}

/* ===================================
   שדות תקינים
   =================================== */

input[aria-invalid="false"],
textarea[aria-invalid="false"],
select[aria-invalid="false"] {
    border-color: #27ae60;
}

/* ===================================
   אנימציות
   =================================== */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ===================================
   הודעות הצלחה
   =================================== */

.elementor-message-success {
    animation: successFadeIn 0.5s ease-in-out;
}

/* ===================================
   קורא מסך וגישוליות - Accessibility
   =================================== */

#form-error-summary {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.elementor-field:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* ===================================
   טלפון - Phone Fields
   =================================== */

input[type="tel"] {
    font-family: monospace;
    letter-spacing: 0.5px;
}

/* ===================================
   אימייל - Email Fields
   =================================== */

input[type="email"] {
    direction: ltr;
}

html[lang="he"] input[type="email"] {
    text-align: left;
}

/* ===================================
   הודעות עזר - Helper Text
   =================================== */

.elementor-field-description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    direction: rtl;
}

/* ===================================
   Mobile - Responsive
   =================================== */

@media (max-width: 768px) {
    .elementor-message-danger {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .elementor-field-group {
        margin-bottom: 15px;
    }
}

/* ===================================
   Dark Mode - תמיכה
   =================================== */

@media (prefers-color-scheme: dark) {
    .elementor-message-danger {
        background-color: rgba(193, 39, 45, 0.15);
        color: #ff6b6b;
    }
    
    .elementor-field-group.error input,
    .elementor-field-group.error textarea,
    .elementor-field-group.error select {
        background-color: rgba(193, 39, 45, 0.05);
    }
}

/* ===================================
   Print - הדפסה
   =================================== */

@media print {
    .elementor-message-danger {
        page-break-inside: avoid;
        background-color: #f0f0f0;
        border: 1px solid #ccc;
    }
}
