:root {
    /* צבעי בסיס */
    --color-white: #FFFFFF;
    --color-soft-white: #F7F9FB;
    --color-border: #E3E7EE;

    /* פלטת כחולים */
    --blue-night: #0A1A2F;
    --blue-ocean: #123A5F;
    --blue-sky: #3D6A90;

    /* טקסט */
    --text-main: #0A1A2F;
    --text-muted: #526174;
    --text-light: #8C9AAF;

    /* מצבי מערכת */
    --success-mint: #65D6AD;
    --warning-amber: #FFC76B;
    --info-light: #A8C4E8;
    --warning-red: #D66565;
    /* בורדרים */
    --border-light: 1px solid #E3E7EE;
    --border-medium: 1px solid #CFD6E0;
    --border-dark: 1px solid rgba(10,26,47,0.15);

    /* רדיוסים */
    --radius-none: 0;
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 12px;

    /* הצללות */
    --shadow-sm: 0 2px 6px rgba(10,26,47,0.06);
    --shadow-md: 0 4px 12px rgba(10,26,47,0.08);
    --shadow-lg: 0 8px 24px rgba(10,26,47,0.12);

    /* טיפוגרפיה */
    --fs-hero: clamp(2.4rem, 4vw, 3rem);
    --fs-h1: 2rem;
    --fs-h2: 1.5rem;
    --fs-h3: 1.25rem;
    --fs-body: 1rem;
    --fs-small: 0.875rem;

    /* אינטראקציות */
    --focus-ring: 0 0 0 3px rgba(61,106,144,0.25); /* sky-blue */
    --hover-bg: rgba(247,249,251,0.8);
    --active-bg: rgba(18,58,95,0.10);
}

.qr-section {
    margin-top: 20px;
}



/* גריד לאפשרויות */
.qr-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    width: 490px;
    margin-right: 25px; /* מרכז */
    direction: rtl;

}
.qr-option{
    border: 1px dashed var(--border-light);
}
#qr-preview-wrapper {
    border: 1px dashed var(--border-light);
    padding: 10px;
    min-height: 250px;
    text-align: right;
}

#qr-preview-placeholder {
    color: var(--text-light);
}

.qr-download-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    justify-content: center;
}
/* ===============================
   ISAACCO QR TOOL – Premium UI
   מעוצב ברמת מותג איטלקי מודרני
================================= */

.isaacco-qr-tool {
    direction: rtl;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    padding: 40px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px var(--shadow-lg);
    font-family: 'Heebo', sans-serif;
}

/* כותרת עליונה */
.qr-header {
    grid-column: 1 / -1;
    margin-bottom: 10px;
}
.qr-title {
    font-size: 28px;
    margin: 0;
    color: var(--fs-h1);
    font-weight: 700;
}
.qr-subtitle {
    margin-top: 4px;
    font-size: 16px;
    color: var(--fs-h2);
}

/* כותרות תתי־שלבים */
.qr-section-title {
    font-size: 22px!important;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 25px;
}

/* קבוצות קלט */
.qr-section {
    margin-bottom: 32px;
}
.qr-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
    color: var(--blue-ocean);
}



/* קבוצה – מוסתרת כברירת מחדל */
.qr-input-group {
    display: none;
}

.qr-input-group.is-active {
    display: block;
}


/* -------------------------------------------------
   🟦 עיצוב שדה אינפוט – יוקרתי ומעודכן לפי ה־Design System
-------------------------------------------------- */
.qr-input {
    width: 100%;
    max-width: 550px;
    padding: 12px 14px;
    margin-right: 25px;
    font-size: 15px;
    font-family: inherit;

    background: var(--color-soft-white); /* אפור-לבן עדין */
    border: var(--border-light);         /* בורדר רך */
    border-radius: var(--radius-lg);     /* רדיוס עגול – 12px */
    
    color: var(--blue-night);
    outline: none;

    transition: 
        border-color .25s ease,
        background .25s ease,
        box-shadow .25s ease,
        transform .1s ease;
}

/* הובר — קיבל עומק */
.qr-input:hover {
    background: #ffffff;
    border: var(--border-dark);         /* בורדר רך */
    box-shadow: 0 0 0 3px rgba(214,101,101, 0.30);;
}

/* פוקוס – תצוגת מומחה */
.qr-input:focus {
    background: #ffffff;
    border-color: var(--blue-ocean);
    box-shadow: 0 0 0 3px rgba(214,101,101,0.35); /* glow כחול יוקרתי */
    transform: translateY(-1px);             /* אפקט ריחוף */
}

/* Disabled – סטייל נקי ומכובד */
.qr-input:disabled {
    background: #F1F4F8;
    border-color: #D3DCE5;
    color: #A0AEC0;
    cursor: not-allowed;
}

/* בורר סוג QR */
.qr-type-selector {
    display: flex;
    gap: 12px;
}
.qr-type-selector label {
    background: transparent;
    padding: 0 25px 0;
    border-radius: none;
    cursor: pointer;
    font-size: 15px;
    color: var(--blue-sky);
    border: 1px solid transparent;
    transition: .2s;
    display: flex;
    gap: 6px;
    align-items: center;
}
.qr-type-selector input {
    accent-color: var(--warning-red);
}
.qr-type-selector input:checked + span {
    font-weight: 700;
}
.qr-logo-row{

    margin-top: 25px;
}


/* כפתורים */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm)!important;
    font-size: 15px;
    cursor: pointer;
    border: var(--border-light)!important;
    transition: .2s;
}
.btn-primary {
    background: var(--color-border) !important;
    border: 1px solid var(--warning-red) !important;
    color: var(--blue-ocean) !important;
    transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

/* Hover */
.btn-primary:hover {
    background: var(--color-soft-white) !important;
    color: var(--blue-night) !important;
    border-color: var(--blue-ocean) !important;
}

/* Focus – נגישות (טבעת פוקוס עדינה) */
.btn-primary:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(18, 58, 95, 0.25) !important; /* blue-ocean 25% */
    border-color: var(--blue-ocean) !important;
    color: var(--blue-night) !important;
}

/* Active – לחיצה */
.btn-primary:active {
    background: var(--blue-ocean) !important;
    color: var(--blue-night) !important;
    border-color: var(--blue-night) !important;
    transform: scale(0.97); /* תחושת קליק */
}

.btn-secondary {
    background: var(--color-white)!important;
    color: var(--blue-ocean)!important;
    border: none!important;
}
.btn-secondary:hover {
    background: var(--color-soft-white)!important;
    color: var(--warning-red)!important;
}



.btn-ghost {
    background: var(--color-soft-white)!important;
    border: var(--border-medium)!important;
    color: var(--blue-night)!important;
}
.btn-ghost:hover {
    background:var(--info-light)!important;
}

/* ===== תצוגה מקדימה ===== */
#qr-preview-wrapper {
    width: 100%;
    height: 530px;
    border: 2px dashed #CBD5E0;
    border-radius: 18px;
    background: #F7FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qr-preview-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* תיבה ריבועית אמיתית */
.qr-box-square {
    width: 100%;          /* שליטה על גודל */
    aspect-ratio: 1/1;   /* ריבוע אמיתי */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ה-QR בפנים */
.qr-box-square svg,
.qr-box-square canvas {
    width: 470px !important;
    height: 100% !important;
    object-fit: contain !important;
}


#qr-preview-inner svg,
#qr-preview-inner canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

.qr-logo-row {
    width: 100%;
}

.qr-logo-wrapper {
    display: flex;
    justify-content: space-between; /* אחד ימין אחד שמאל */
    align-items: center;
    gap: 20px;
    width: 100%;
}
.qr-upload-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qr-upload-btn {
    display: inline-block;
}

#qr-logo-preview-wrapper {
    width: 160px;
    height: 110px;
    background: #F7FAFC;
    border: 1px dashed #D0D7DF;
    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* תצוגת הלוגו – מיוצב בצד שמאל */
#qr-logo-preview-wrapper {
    max-width: 145px;
    width: 100%;
    height: 90px;
    border: 1px dashed #D0D7DF;
    border-radius: 6px;
    background: #F7FAFC;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    margin-right: auto; /* ← מצמיד לשמאל ב־RTL */
    margin-left: 125px;
}
@media (max-width: 480px) {
    .qr-logo-row {
        
        flex-direction: row-reverse !important; /* RTL ימין→שמאל */
        justify-content: space-between !important;
        align-items: center !important;
        max-width: 95px;
        width: 100% !important;
        gap: 10px;
    }
}
@media (max-width: 768px) {

    .qr-logo-wrapper {
        flex-direction: column; /* אנכי */
        align-items: flex-start; /* הכל מיושר לימין ב־RTL */
        gap: 16px;
        width: 100%;
    }

    #qr-logo-preview-wrapper {
        width: 100% !important;
        max-width: 260px; /* כדי להיות יפה ולא להשתלט */
        height: 120px;
    }

    .qr-upload-area {
        width: 100%;
         width: auto !important;
    max-width: fit-content !important;
    display: inline-block !important;
    }
}

/* מסתיר את אינפוט הקובץ המקורי */
.qr-logo-input {
    display: none;
}

/* כפתור מעוצב */
.qr-upload-btn {
    background: var(--blue-night);
    color: var(--color-soft-white);
    padding: 10px 18px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
    transition: 0.2s;
}

.qr-upload-btn:hover {
    background: var(--blue-night);
    color: var(--warning-red);
}

/* שם הקובץ */
.qr-upload-filename {
    margin-right: 12px;
    font-size: 14px;
    color: #2D3748;
}


/* תמונה */
#qr-logo-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
}



/* כל הקבוצה — שתי שורות */
.qr-size-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    direction: rtl;            /* ⬅️ לוודא RTL */
    text-align: right;         /* ⬅️ שלא ייזרק שמאלה */
    width: fit-content;        /* ⬅️ שלא יתפוס רוחב מלא */
}

/* כל שורה */
.qr-size-option {
    display: inline-flex;      /* ⬅️ שלא יימתחו שמאלה */
    flex-direction: row-reverse; /* רדיו מימין, טקסט משמאל */
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    cursor: pointer;
    text-align: right;         /* ⬅️ חובה */
    direction: rtl;            /* ⬅️ חובה */
    font-size: 15px;
}

/* הרדיו */
.qr-size-option input[type="radio"] {
    margin: 0;
    accent-color: var(--warning-red);
}



/* תיקון תצוגת color input */
.isaacco-qr-tool input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    width: 48px;
    height: 38px;
    padding: 0;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
    background-color: transparent;
}

/* הפנימי של הדפדפן */
.isaacco-qr-tool input[type="color"]::-webkit-color-swatch {
    border-radius: 6px;
    border: none;
}

.isaacco-qr-tool input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

/* Firefox */
.isaacco-qr-tool input[type="color"]::-moz-color-swatch {
    border-radius: 6px;
    border: none;
}

.isaacco-qr-tool {
    width: min(100%, 1200px);
    margin: 20px auto;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
}

/**********************************************
 * ISAACCO – Custom Choices.js Theme
 * מבוסס כולו על ה־Design System שלך
 **********************************************/

/* -------------------------------------------------
   🟦 1) תמיכה מלאה ב־RTL
-------------------------------------------------- */
.choices {
    direction: ltr;
    text-align: right;
    font-size: 15px;
    font-family: inherit;
}

/* -------------------------------------------------
   🟦 2) מיכל פנימי – מצב ברירת מחדל
   משתמש בצבעים + בורדר + רדיוסים מה־ROOT
-------------------------------------------------- */
.choices__inner {
    background: var(--color-white);
    border: var(--border-light);
    border-radius: var(--radius-md);

    padding: 10px 12px;
    min-height: 44px;
    
    display: flex;
    align-items: center;

    color: var(--blue-night);
    transition: 0.2s ease;
}

/* Hover קל */
.choices__inner:hover {
    border-color: var(--color-border);
}

/* Focus / Open state */
.choices__inner.is-open {
    border-color: var(--blue-sky);
    box-shadow: 0 0 0 3px rgba(61, 106, 144, 0.25); /* sky-blue glow */
}

/* -------------------------------------------------
   🟦 3) Placeholder (טקסט רך)
-------------------------------------------------- */
.choices__placeholder {
    opacity: 0.6;
    color: var(--text-muted, #526174); /* fallback */
}

/* -------------------------------------------------
   🟦 Dropdown Arrow — בצד שמאל, יציב ב־RTL
-------------------------------------------------- */

/* הסתרת החצים המקוריים */
.choices[data-type*="select-one"]::after,
.choices[data-type*="select-one"]::before {
    display: none !important;
}
/* חץ צד שמאל – ISAACCO */
.choices.isaacco-arrow .choices__inner::before {
    content: "";
    position: absolute;

    /* גודל */
    width: 8px;
    height: 8px;

    /* צורת החץ */
    border-left: 2px solid var(--text-muted, #526174);
    border-bottom: 2px solid var(--text-muted, #526174);

    /* מיקום בצד שמאל */
    top: 50%;
    left: 14px;

    /* ממרכז את החץ — תמיד */
    transform: translateY(-50%) rotate(-45deg);

    pointer-events: none;
    transition: transform 0.25s ease;
}

/* מצב פתוח */
.choices.is-open .choices__inner::before {
    transform: translateY(-50%) rotate(135deg);
}

/* -------------------------------------------------
   🟦 5) Dropdown Container – רשימת האופציות
-------------------------------------------------- */
.choices__list--dropdown,
.choices__list[aria-expanded] {
    background: var(--color-white);
    border: var(--border-light);
    border-radius: var(--radius-lg);
    margin-top: 4px;
    padding: 6px 0;

    box-shadow: 0 4px 12px rgba(10,26,47,0.12);
    overflow: hidden;
}

/* -------------------------------------------------
   🟦 6) פריטים בתוך הרשימה
-------------------------------------------------- */
.choices__list--dropdown .choices__item {
    padding: 10px 14px;
    font-size: 15px;
    color: var(--blue-night);
    cursor: pointer;

    transition: 0.15s ease;
}

/* Hover */
.choices__list--dropdown .choices__item:hover {
    background: var(--color-soft-white);
}

/* פריט מסומן */
.choices__item--selectable.is-highlighted {
    background: rgba(61, 106, 144, 0.12) !important;
}

/* -------------------------------------------------
   🟦 7) מצב Disabled
-------------------------------------------------- */
.choices.is-disabled .choices__inner {
    background: #F2F4F7;
    border-color: #D6DCE5;
    color: #9AA4B2;
}

/* -------------------------------------------------
   🟦 8) תגיות במצב select-multiple
-------------------------------------------------- */
.choices__inner .choices__item.choices__item--selectable {
    background: rgba(255, 255, 255, 0);
    color: var(--blue-night);
    border-radius: var(--radius-sm);

    padding: 4px 10px;
    margin: 2px;
}

/* כפתור X להסרת תגית */
.choices__inner .choices__item.choices__item--selectable .remove-button {
    margin-right: 6px;
    color: var(--color-white);
    opacity: 0.8;
}

.choices__inner .choices__item.choices__item--selectable .remove-button:hover {
    opacity: 1;
}
/* ⭐ הדגשה של הפריט הנבחר (value Q) */
.choices__inner .choices__item[data-value="Q"] {
    font-weight: 700;
    color: var(--blue-ocean);
    position: relative;
}

/* הוספת כוכב לפריט הנבחר */
.choices__inner .choices__item[data-value="Q"]::after {
    font-size: 14px;
    margin-right: 6px;
    opacity: 0.9;
    position: absolute;
    right: -22px;
    top: 50%;
    transform: translateY(-50%);
}


/* ⭐ הדגשה של הפריט בתוך הרשימה */
.choices__list--dropdown .choices__item[data-value="Q"] {
    font-weight: 700;
    color: var(--blue-ocean);
    position: relative;
}

/* כוכב בתוך הרשימה */
.choices__list--dropdown .choices__item[data-value="Q"]::before {
    content: "⭐";
    font-size: 14px;
    opacity: 0.9;
    margin-left: 6px;
}



/* ================================
   MOBILE / TABLET PERFECT LAYOUT
   — בלי לשבור את הדסקטופ
================================ */

/* כל המסך מתיישר ומונעים גלילה */
@media (max-width: 1024px) {
    html, body {
        overflow-x: hidden !important;
    }

    .isaacco-qr-tool {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px !important;
        gap: 32px !important;
        box-sizing: border-box;
    }

    /* אזור הבילדר — נשאר שלם בדיוק כמו בדסקטופ */
    .qr-builder {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* התצוגה המקדימה רק יורדת — לא משנה את הגריד */
    .qr-preview-panel {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    #qr-preview-wrapper {
        width: 100% !important;
        height: auto !important;
        min-height: 260px !important;
    }

    /* מבטיח *אפס* גלילה לרוחב גם בתוך ילדים */
    .isaacco-qr-tool *,
    .qr-builder *,
    .qr-preview-panel * {
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
}

/* גריד אפשרויות – שתי עמודות לטאבלט */
@media (max-width: 768px) {
    .qr-options-grid {
        grid-template-columns: 1fr 1fr !important;
        width: 100% !important;
        margin-right: 0 !important;
        padding: 0 !important;
        gap: 16px !important;
    }

    .qr-input {
        margin-right: 0 !important;
        max-width: 100% !important;
    }

    #qr-logo-preview-wrapper {
        width: 100% !important;
        margin-right: 0 !important;
    }
}
