/* ADP_COMPACT_COMPOSER_V1 */

:root{
    --adp-orange:#fc9012;
    --adp-cyan:#00bddd;
    --adp-ink:#172033;
    --adp-muted:#64748b;
    --adp-line:#dce7ee;
    --adp-soft:#f5f9fc;
    --adp-warm:#fff8ef;
    --adp-white:#ffffff;
}

html[lang="ar"],
html[lang="ar"] body,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select{
    font-family:"Cairo",sans-serif;
}

html[lang="en"],
html[lang="en"] body,
html[lang="en"] button,
html[lang="en"] input,
html[lang="en"] textarea,
html[lang="en"] select{
    font-family:"Montserrat",sans-serif;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] .elementor-heading-title{
    font-family:"Cairo",sans-serif!important;
    font-weight:700!important;
}

body.adp-compact-active main.studio-page > section.studio-grid{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
}

body.adp-compact-active section.studio-grid > .panel{
    display:none!important;
}

body.adp-compact-active.adp-advanced-open section.studio-grid > .panel{
    display:block!important;
    margin-top:18px!important;
}

body.adp-compact-active .education-guide{
    display:none!important;
}

.adp-compact-composer{
    direction:rtl;
    width:100%;
    box-sizing:border-box;
    padding:20px;
    border:1px solid var(--adp-line);
    border-radius:22px;
    background:
        linear-gradient(135deg,rgba(0,189,221,.045),transparent 35%),
        var(--adp-white);
    box-shadow:0 14px 42px rgba(23,32,51,.07);
}

.adp-compact-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    margin-bottom:18px;
}

.adp-compact-title{
    display:flex;
    align-items:center;
    gap:12px;
}

.adp-compact-ai{
    width:46px;
    height:46px;
    display:grid;
    place-items:center;
    border-radius:14px;
    background:linear-gradient(135deg,var(--adp-orange),#ffb34e);
    color:#fff;
    font-weight:800;
    font-family:"Montserrat",sans-serif;
}

.adp-compact-title h2{
    margin:0;
    color:var(--adp-ink);
    font-size:22px;
    line-height:1.3;
}

.adp-compact-title p{
    margin:3px 0 0;
    color:var(--adp-muted);
    font-size:13px;
}

.adp-advanced-toggle{
    border:1px solid var(--adp-line);
    background:#fff;
    color:var(--adp-ink);
    min-height:40px;
    padding:0 14px;
    border-radius:11px;
    cursor:pointer;
    font-weight:700;
}

.adp-compact-row{
    display:grid;
    gap:12px;
    margin-top:12px;
}

.adp-compact-row.adp-main{
    grid-template-columns:1.15fr .85fr 1fr 1fr .72fr;
}

.adp-compact-row.adp-content{
    grid-template-columns:1.5fr 1.5fr .72fr .9fr .72fr;
}

.adp-compact-row.adp-assets{
    grid-template-columns:1fr 1fr 1.35fr 1fr;
    align-items:stretch;
}

.adp-c-field{
    min-width:0;
}

.adp-c-label{
    display:block;
    margin:0 0 6px;
    color:var(--adp-muted);
    font-size:11px;
    font-weight:700;
}

.adp-c-field input[type="text"],
.adp-c-field select{
    width:100%;
    height:44px;
    box-sizing:border-box;
    border:1px solid var(--adp-line);
    border-radius:11px;
    background:#fff;
    color:var(--adp-ink);
    padding:0 12px;
    outline:none;
    font-size:13px;
}

.adp-c-field input[type="text"]:focus,
.adp-c-field select:focus{
    border-color:var(--adp-cyan);
    box-shadow:0 0 0 3px rgba(0,189,221,.10);
}

.adp-upload-card{
    min-height:86px;
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px;
    box-sizing:border-box;
    border:1px dashed #b9d5df;
    border-radius:14px;
    background:var(--adp-soft);
    cursor:pointer;
}

.adp-upload-icon{
    flex:0 0 40px;
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:#fff;
    color:var(--adp-cyan);
    border:1px solid var(--adp-line);
    font-weight:800;
}

.adp-upload-copy{
    min-width:0;
}

.adp-upload-copy strong{
    display:block;
    color:var(--adp-ink);
    font-size:13px;
}

.adp-upload-copy span{
    display:block;
    color:var(--adp-muted);
    font-size:11px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:190px;
}

.adp-color-panel,
.adp-font-panel{
    padding:11px 12px;
    border:1px solid var(--adp-line);
    border-radius:14px;
    background:#fff;
}

.adp-color-title,
.adp-font-title{
    margin-bottom:8px;
    color:var(--adp-muted);
    font-size:11px;
    font-weight:700;
}

.adp-color-chips{
    display:flex;
    align-items:center;
    gap:9px;
}

.adp-color-chip{
    position:relative;
    width:34px;
    height:34px;
}

.adp-color-chip input{
    position:absolute;
    inset:0;
    width:34px;
    height:34px;
    padding:0;
    border:0;
    border-radius:50%;
    cursor:pointer;
    opacity:0;
}

.adp-color-chip span{
    display:block;
    width:34px;
    height:34px;
    box-sizing:border-box;
    border-radius:50%;
    border:3px solid #fff;
    box-shadow:0 0 0 1px var(--adp-line);
    pointer-events:none;
}

.adp-fonts{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:7px;
}

.adp-fonts select{
    height:36px;
    width:100%;
    border:1px solid var(--adp-line);
    border-radius:9px;
    background:#fff;
    color:var(--adp-ink);
    padding:0 8px;
    font-size:11px;
}

.adp-compact-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-top:16px;
    padding-top:16px;
    border-top:1px solid var(--adp-line);
}

.adp-preset-summary{
    color:var(--adp-muted);
    font-size:12px;
}

.adp-preset-summary strong{
    color:var(--adp-ink);
}

#adpCompactGenerate{
    min-width:210px;
    min-height:48px;
    border:0;
    border-radius:13px;
    background:var(--adp-orange);
    color:#fff;
    cursor:pointer;
    font-weight:800;
    font-size:15px;
    box-shadow:0 10px 24px rgba(252,144,18,.20);
}

#adpCompactGenerate:hover{
    transform:translateY(-1px);
}

.adp-file-clear{
    margin-inline-start:6px;
    border:0;
    background:transparent;
    color:var(--adp-muted);
    cursor:pointer;
    font-size:11px;
}

@media(max-width:1100px){
    .adp-compact-row.adp-main,
    .adp-compact-row.adp-content{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .adp-compact-row.adp-assets{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:680px){
    .adp-compact-composer{
        padding:14px;
        border-radius:16px;
    }

    .adp-compact-head{
        align-items:flex-start;
        flex-direction:column;
    }

    .adp-compact-row.adp-main,
    .adp-compact-row.adp-content,
    .adp-compact-row.adp-assets{
        grid-template-columns:1fr;
    }

    .adp-compact-footer{
        align-items:stretch;
        flex-direction:column;
    }

    #adpCompactGenerate{
        width:100%;
    }
}

/* ==========================================================
   ADP AI GENERATING OVERLAY V273
   ========================================================== */

.adp-ai-generating-overlay{
    position:fixed;
    inset:0;
    z-index:9999998;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    box-sizing:border-box;
    background:rgba(245,249,252,.88);
    backdrop-filter:blur(7px);
    -webkit-backdrop-filter:blur(7px);
}

.adp-ai-generating-overlay[hidden]{
    display:none !important;
}

.adp-ai-generating-card{
    width:min(360px,92vw);
    padding:32px 26px 28px;
    box-sizing:border-box;
    text-align:center;
    border:1px solid var(--adp-line);
    border-radius:24px;
    background:rgba(255,255,255,.97);
    box-shadow:
        0 24px 70px rgba(23,32,51,.16);
}

.adp-ai-spinner{
    position:relative;
    width:82px;
    height:82px;
    margin:0 auto 20px;
    border-radius:50%;
    background:
        conic-gradient(
            from 0deg,
            var(--adp-orange) 0deg,
            var(--adp-orange) 115deg,
            var(--adp-cyan) 180deg,
            var(--adp-cyan) 295deg,
            var(--adp-orange) 360deg
        );
    animation:
        adpAiSpin 1.05s linear infinite;
    box-shadow:
        0 10px 30px rgba(0,189,221,.15),
        0 10px 30px rgba(252,144,18,.12);
}

.adp-ai-spinner::before{
    content:"";
    position:absolute;
    inset:9px;
    border-radius:50%;
    background:#fff;
}

.adp-ai-spinner::after{
    content:"AI";
    position:absolute;
    inset:0;
    display:grid;
    place-items:center;
    color:var(--adp-ink);
    font-family:"Montserrat",sans-serif;
    font-size:17px;
    font-weight:800;
}

@keyframes adpAiSpin{
    to{
        transform:rotate(360deg);
    }
}

/*
 * Keep AI letters visually upright while ring rotates.
 */
.adp-ai-spinner-inner{
    position:absolute;
    inset:0;
}

.adp-ai-generating-card h3{
    margin:0;
    color:var(--adp-ink);
    font-family:"Cairo",sans-serif;
    font-size:21px;
    font-weight:700;
}

.adp-ai-generating-card p{
    margin:7px 0 0;
    color:var(--adp-muted);
    font-family:"Cairo",sans-serif;
    font-size:13px;
    line-height:1.8;
}

.adp-ai-generating-dots{
    display:flex;
    justify-content:center;
    gap:6px;
    margin-top:16px;
}

.adp-ai-generating-dots span{
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--adp-cyan);
    animation:
        adpAiDot 1.2s ease-in-out infinite;
}

.adp-ai-generating-dots span:nth-child(2){
    animation-delay:.15s;
    background:var(--adp-orange);
}

.adp-ai-generating-dots span:nth-child(3){
    animation-delay:.30s;
}

@keyframes adpAiDot{
    0%,100%{
        transform:translateY(0);
        opacity:.35;
    }

    50%{
        transform:translateY(-5px);
        opacity:1;
    }
}

body.adp-ai-is-generating{
    overflow:hidden !important;
}

#adpCompactGenerate:disabled{
    cursor:wait;
    opacity:.72;
}

/* ==========================================================
   ADP SMART COMMANDS V282
   ========================================================== */

.adp-smart-commands{
    display:none;
    margin-top:18px;
    padding:18px;
    border:1px solid var(--adp-line);
    border-radius:18px;
    background:var(--adp-soft);
}

body.adp-advanced-open .adp-smart-commands{
    display:block;
}

.adp-smart-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:16px;
}

.adp-smart-head h3{
    margin:0;
    font-family:"Cairo",sans-serif;
    font-size:18px;
    font-weight:700;
    color:var(--adp-ink);
}

.adp-smart-head p{
    margin:5px 0 0;
    color:var(--adp-muted);
    font-size:13px;
}

.adp-smart-count{
    flex:none;
    padding:6px 10px;
    border-radius:999px;
    background:var(--adp-warm);
    color:var(--adp-orange);
    font-size:12px;
    font-weight:700;
}

.adp-smart-controls{
    display:grid;
    grid-template-columns:
        minmax(180px,1fr)
        minmax(220px,1.5fr)
        auto;
    gap:12px;
    align-items:end;
}

.adp-smart-actions{
    display:flex;
    gap:8px;
}

.adp-smart-actions button{
    min-height:42px;
    padding:0 13px;
    border:1px solid var(--adp-line);
    border-radius:10px;
    background:#fff;
    color:var(--adp-ink);
    font-family:"Cairo",sans-serif;
    cursor:pointer;
}

.adp-smart-actions button:disabled{
    opacity:.45;
    cursor:not-allowed;
}

.adp-smart-auto-summary{
    margin-top:14px;
    padding:12px 14px;
    border-radius:12px;
    background:#fff;
    border:1px solid var(--adp-line);
    color:var(--adp-muted);
    font-size:13px;
    line-height:1.8;
}

.adp-smart-auto-summary code{
    display:inline-flex;
    margin:2px;
    padding:3px 7px;
    border-radius:7px;
    background:var(--adp-warm);
    color:var(--adp-orange);
    font-family:"Montserrat",sans-serif;
    font-size:11px;
    direction:ltr;
}

.adp-smart-command-grid{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:14px;
}

.adp-smart-command{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    padding:5px 10px;
    border:1px solid var(--adp-line);
    border-radius:999px;
    background:#fff;
    color:var(--adp-ink);
    font-family:"Montserrat",sans-serif;
    font-size:12px;
    direction:ltr;
}

button.adp-smart-command{
    cursor:pointer;
}

.adp-smart-command.active{
    border-color:var(--adp-cyan);
    background:rgba(0,189,221,.08);
    color:var(--adp-ink);
    font-weight:700;
}

@media(max-width:780px){
    .adp-smart-controls{
        grid-template-columns:1fr;
    }

    .adp-smart-head{
        flex-direction:column;
    }
}
/* ==========================================================
   ADP_PRODUCT_RECIPE_COMPACT_V283
   ========================================================== */

.adp-product-recipe-inline{
    display:grid;
    grid-template-columns:180px minmax(0,1fr);
    gap:10px;
    align-items:end;
    margin-top:10px;
    padding:10px 12px;
    border:1px solid var(--adp-line);
    border-radius:13px;
    background:var(--adp-soft);
}

.adp-product-kind-field select{
    width:100%;
    min-height:40px;
    border:1px solid var(--adp-line);
    border-radius:9px;
    background:#fff;
    color:var(--adp-ink);
    padding:0 9px;
    font-family:"Cairo",sans-serif;
}

.adp-product-recipe-title{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:5px;
}

.adp-product-recipe-title strong{
    color:var(--adp-ink);
    font-size:12px;
}

.adp-product-recipe-title span{
    color:var(--adp-muted);
    font-size:10px;
}

.adp-product-recipe-codes{
    display:flex;
    flex-wrap:wrap;
    gap:4px;
}

.adp-product-recipe-code{
    display:inline-flex;
    align-items:center;
    min-height:23px;
    padding:2px 7px;
    border:1px solid rgba(0,189,221,.24);
    border-radius:999px;
    background:rgba(0,189,221,.07);
    color:var(--adp-ink);
    font-family:"Montserrat",sans-serif;
    font-size:9.5px;
    direction:ltr;
}


/* ==========================================================
   SMART COMMANDS — COMPACT NORMAL MODE
   ========================================================== */

/*
 * إظهار الأوامر الذكية أيضًا في الوضع العادي،
 * لكن بحجم صغير.
 */
.adp-smart-commands{
    display:block!important;
    margin-top:10px!important;
    padding:10px 12px!important;
    border-radius:13px!important;
}

.adp-smart-head{
    margin-bottom:6px!important;
}

.adp-smart-head h3{
    font-size:14px!important;
}

.adp-smart-head p{
    margin-top:1px!important;
    font-size:10px!important;
}

/*
 * خيارات التحكم اليدوية تظهر فقط عند فتح
 * الإعدادات المتقدمة.
 */
.adp-smart-controls{
    display:none!important;
}

body.adp-advanced-open .adp-smart-controls{
    display:grid!important;
}

.adp-smart-auto-summary{
    margin-top:6px!important;
    padding:6px 8px!important;
    font-size:10px!important;
    line-height:1.5!important;
}

.adp-smart-command-grid{
    margin-top:6px!important;
    gap:4px!important;
}

.adp-smart-command{
    min-height:24px!important;
    padding:2px 7px!important;
    font-size:9.5px!important;
}


/* ==========================================================
   لا نفتح النموذج القديم الضخم
   ========================================================== */

body.adp-compact-active.adp-advanced-open
section.studio-grid > .panel{
    display:none!important;
}


/* ==========================================================
   GENERATION OVERLAY
   ========================================================== */

.adp-ai-generating-overlay:not([hidden]){
    display:flex!important;
    position:fixed!important;
    inset:0!important;
    z-index:99999999!important;
}

@media(max-width:700px){
    .adp-product-recipe-inline{
        grid-template-columns:1fr;
    }
}
/* ==========================================================
   ADP_HIDE_INTERNAL_COMMANDS_V284
   الأكواد تعمل داخليًا فقط ولا تظهر للمستخدم
   ========================================================== */

.adp-product-recipe-codes,
.adp-smart-commands{
    display:none !important;
}

/*
 * نبقي وصفة المنتج كمعلومة بسيطة بدون أكواد.
 */
.adp-product-recipe-inline{
    grid-template-columns:180px 1fr !important;
}

.adp-product-recipe-title{
    margin-bottom:0 !important;
}

.adp-product-recipe-info{
    display:flex;
    align-items:center;
    min-height:40px;
}

.adp-product-recipe-title span{
    font-size:11px !important;
}

/*
 * عدم إظهار النموذج القديم عند فتح المتقدم.
 */
body.adp-compact-active.adp-advanced-open
section.studio-grid > .panel{
    display:none !important;
}

/* ==========================================================
   ADP DESIGN STYLE DROPDOWN V284
   ========================================================== */

.adp-product-recipe-inline{
    grid-template-columns:
        minmax(180px,1fr)
        minmax(220px,1fr)
        !important;
}

.adp-product-style-field select{
    width:100%;
    min-height:40px;
    padding:0 10px;
    border:1px solid var(--adp-line);
    border-radius:9px;
    background:var(--adp-white);
    color:var(--adp-ink);
    font-family:"Cairo",sans-serif;
}

/* الأكواد داخلية فقط */
.adp-product-recipe-codes,
.adp-smart-commands,
#adpSmartCommands{
    display:none !important;
}

@media(max-width:700px){
    .adp-product-recipe-inline{
        grid-template-columns:1fr!important;
    }
}