/* אילוץ כיווניות LTR למרות אלמנטור */
.ductulator-wrapper, .ductulator-wrapper * {
    direction: ltr !important;
    text-align: left;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* מעטפת ראשית - הרקע הירקרק-אפרפר */
.ductulator-wrapper {
    background-color: #f0f5f6;
    padding: 40px;
    border-radius: 4px;
    max-width: 650px;
    margin: 0 auto;
    color: #12497f;
}

.duct-form-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.duct-row {
    display: flex;
    gap: 30px;
    width: 100%;
}

.duct-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.duct-field.full-width {
    width: 100%;
    flex: none;
}

/* תוויות השדות */
.duct-field label {
    font-size: 14.5px;
    font-weight: 500;
    color: #12497f;
    margin-bottom: 8px;
    display: block;
}

/* שדות קלט ובחירה - לבנים, נקיים, ללא גבול */
.duct-select, .input-group input {
    width: 100%;
    padding: 12px 15px;
    border: none !important;
    border-radius: 2px;
    font-size: 14px;
    background-color: #ffffff !important;
    color: #4a5568;
    outline: none;
    box-shadow: none;
}

/* אפקט פוקוס עדין כדי שהמשתמש ידע איפה הוא */
.duct-select:focus, .input-group input:focus {
    box-shadow: 0 0 0 2px rgba(18, 73, 127, 0.15);
}

/* מבנה יחידות המידה (Flexbox שמוציא את היחידה מחוץ לשדה הלבן) */
.input-group {
    display: flex;
    align-items: center;
    width: 100%;
}

.input-group input {
    flex-grow: 1;
    width: auto;
}

/* יחידות המידה (m, L/s וכו') */
.unit-label {
    position: static !important;
    margin-left: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #12497f;
    min-width: 40px; /* שומר על קו יישור אחיד לכל היחידות */
}

/* אזור יצירת ה-PDF - מנקה רקעים מיותרים */
.duct-pdf-area {
    margin-top: 15px;
    background: transparent !important;
    padding: 0;
    border: none !important;
}

/* כותרת מיותרת שמוסתרת בעיצוב שלך */
.pdf-title {
    display: none; 
}

/* המעטפת הלבנה של הטבלה */
.duct-results {
    background-color: #ffffff;
    padding: 15px;
    border-radius: 4px;
}

/* עיצוב הטבלה (המראה המרווח נוצר בעזרת גבולות לבנים עבים) */
.duct-results table {
    width: 100%;
    border-collapse: collapse;
}

.duct-results th {
    background-color: #0e4b82 !important;
    color: #ffffff !important;
    padding: 14px 15px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: 3px solid #ffffff; /* המרווח הלבן בין התאים */
}

.duct-results td {
    background-color: #f1f5f7;
    color: #0e4b82;
    padding: 14px 15px;
    font-size: 14px;
    font-weight: 500;
    border: 3px solid #ffffff;
}

.duct-results tr td:first-child {
    text-align: left;
}

.duct-results tr td:last-child {
    text-align: center;
}

/* כפתור ראשי */
.duct-btn {
    background-color: #0e4b82;
    color: #ffffff;
    border: none;
    padding: 14px 30px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    margin: 25px auto 0;
    transition: background 0.3s;
    display: block;
    width: auto;
    min-width: 250px;
}

.duct-btn:hover {
    background-color: #0a355c;
}

.duct-btn:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
}

/* פופאפ (הותאם למראה החדש) */
.ductulator-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.ductulator-popup {
    background: #ffffff;
    padding: 30px;
    border-radius: 4px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ductulator-popup h3 {
    margin-top: 0;
    color: #0e4b82;
    text-align: center;
    font-weight: 600;
}

.ductulator-popup input {
    border: 1px solid #ccc !important; /* בפופאפ כן נשאיר מסגרת קלה */
}

.duct-popup-actions {
    display: flex;
    flex-direction: column; 
    gap: 10px;
    margin-top: 10px;
}

.duct-btn-secondary {
    background-color: #e0e0e0;
    color: #333;
    border: none;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
}

/* התאמה למובייל */
@media (max-width: 480px) {
    .duct-row { flex-direction: column; gap: 15px; }
    .ductulator-wrapper { padding: 25px 20px; }
}