/* MockupMaker toolbar — Studio-independent */
.mm-flat-toolbar{
  align-items:center!important;gap:8px!important;white-space:nowrap;
  padding-inline:10px!important;overflow-x:auto;overflow-y:hidden;
}
.mm-toolbar-title{display:flex;align-items:center;gap:6px;flex:0 0 auto;color:#343944;font-size:11px;font-weight:800;padding:0 4px}
.mm-toolbar-title i{font-size:13px;color:#555d6d}
.mm-tool-group{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.mm-tool-separator{width:1px;height:38px;background:#343944;opacity:.55;margin:0 5px;flex:0 0 1px}
.mm-tool-icon{min-width:58px;height:46px;border:0;border-radius:8px;background:transparent;color:#505765;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;position:relative;padding:3px 8px;box-sizing:border-box}
.mm-tool-icon>i{font-size:15px}.mm-tool-text{font-size:9px;line-height:1.1;white-space:nowrap;color:#555d6b;font-weight:700}
.mm-tool-icon:hover{background:#e8eaf0;color:#242832}.mm-tool-icon:hover .mm-tool-text{color:#242832}
.mm-tool-icon input{position:absolute;opacity:0;pointer-events:none}.mm-tool-icon:has(input:checked){background:#dedff8;color:#4d49a8}
.mm-aspect-tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:108px;height:46px;padding:2px 5px;box-sizing:border-box}
.mm-aspect-label{font-size:9px;line-height:1;color:#555d6b;font-weight:700;white-space:nowrap}
.mm-toolbar-select{height:25px!important;min-width:88px!important;max-width:96px!important;padding:0 7px!important;border:1px solid #cfd3db!important;border-radius:7px!important;background:#fff!important;font-size:10px!important}
#rightPanel #objSelectedColorBtn{min-height:48px!important;border:2px solid #343944!important;border-radius:10px!important;padding:6px 11px!important}
#rightPanel #objSelectedColorBtn .mm-material-color-swatch{width:36px!important;height:36px!important;min-width:36px!important;border:1px solid #2e323b!important;border-radius:8px!important}
body.night-mode .mm-toolbar-title,body.night-mode .mm-tool-text,body.night-mode .mm-aspect-label{color:#d9dce5}
body.night-mode .mm-tool-icon{color:#d5d8e1}body.night-mode .mm-tool-icon:hover{background:#3a3e4d;color:#fff}
body.night-mode .mm-tool-separator{background:#11141b;opacity:.9}body.night-mode .mm-toolbar-select{background:#2e3240!important;color:#f1f2f6!important;border-color:#4b5060!important}
@media(max-width:900px){.mm-tool-icon{min-width:54px}.mm-flat-toolbar{gap:6px!important}.mm-tool-group{gap:4px}.mm-toolbar-title{font-size:10px}}

.mm-toolbar-title{
  background:#343944;color:#fff!important;border-radius:7px;padding:7px 10px!important;
  cursor:default;user-select:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}
.mm-toolbar-title i,.mm-toolbar-title span{color:#fff!important}
.mm-tool-primary{background:#ece9ff!important;color:#4d49a8!important}
.mm-inline-tool{position:relative;display:flex;align-items:center}
.mm-project-notice{position:fixed;inset:0;z-index:2147483000;background:rgba(8,10,15,.58);display:flex;align-items:center;justify-content:center;padding:20px}
.mm-project-notice-card{width:min(440px,calc(100vw - 32px));background:#fff;color:#252934;border-radius:14px;padding:20px;box-shadow:0 22px 70px rgba(0,0,0,.32);font-family:inherit}
.mm-project-notice-card h3{margin:0 0 10px;font-size:16px}.mm-project-notice-card p{font-size:12px;line-height:2;margin:0 0 14px}.mm-project-notice-card button{border:0;border-radius:9px;background:#343944;color:#fff;padding:10px 18px;font-family:inherit;font-weight:800;cursor:pointer}.mm-project-notice-card input[type=file]{width:100%;margin:0 0 14px}.mm-missing-files{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 12px}.mm-missing-files span{font-size:10px;background:#f0f1f4;border-radius:6px;padding:5px 7px}
body.night-mode .mm-project-notice-card{background:#252936;color:#f2f3f6}

/* ================================================================
   PHOTO STUDIO
   ================================================================ */
.mm-photo-studio-group{margin-inline-start:auto!important;align-self:stretch;display:flex;align-items:center}
.mm-photo-studio-trigger{
  min-width:128px;height:46px;padding:0 14px;border:1px solid rgba(176,101,8,.24);border-radius:10px;
  display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;cursor:pointer;
  color:#fff;font:800 11px Vazirmatn,Tahoma,sans-serif;
  background:linear-gradient(135deg,#f7971e 0%,#e77f0b 58%,#c96505 100%);
  box-shadow:0 7px 18px rgba(218,116,10,.26),inset 0 1px 0 rgba(255,255,255,.26);
  transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;
}
.mm-photo-studio-trigger>i:first-child{font-size:15px}.mm-photo-studio-trigger:hover{filter:saturate(1.08) brightness(1.03);box-shadow:0 9px 22px rgba(218,116,10,.34);transform:translateY(-1px)}
.mm-photo-studio-trigger:active{transform:translateY(0)}.mm-photo-studio-trigger[aria-expanded="true"]{box-shadow:0 0 0 3px rgba(247,151,30,.18),0 8px 22px rgba(218,116,10,.30)}
.mm-studio-chevron{font-size:8px!important;transition:transform .18s ease}.mm-photo-studio-trigger[aria-expanded="true"] .mm-studio-chevron{transform:rotate(180deg)}

.mm-studio-menu{
  position:fixed;z-index:19000;width:218px;padding:7px;display:none;direction:rtl;
  border:1px solid rgba(32,39,56,.12);border-radius:13px;background:rgba(255,255,255,.985);
  box-shadow:0 18px 55px rgba(16,22,36,.24);backdrop-filter:blur(16px);
}
.mm-studio-menu.open{display:block;animation:mmStudioMenuIn .16s ease-out}
@keyframes mmStudioMenuIn{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
.mm-studio-menu button{width:100%;height:41px;border:0;border-radius:9px;background:transparent;color:#303746;display:flex;align-items:center;gap:10px;padding:0 12px;font:750 11px Vazirmatn,Tahoma,sans-serif;text-align:right;cursor:pointer}
.mm-studio-menu button i{width:20px;color:#d8750a;font-size:13px;text-align:center}.mm-studio-menu button:hover:not(:disabled){background:#fff2df;color:#9f5100}.mm-studio-menu button:disabled{opacity:.36;cursor:not-allowed}
.mm-studio-menu button.danger i{color:#c44949}.mm-studio-menu button.danger:hover:not(:disabled){background:#fff0f0;color:#a62f36}
.mm-studio-menu-divider{display:block;height:1px;background:#e9eaf0;margin:5px 7px}

.mm-studio-overlay{z-index:20000!important;background:rgba(12,16,26,.62)!important;backdrop-filter:blur(7px)!important}
.mm-studio-overlay .modal-card{box-sizing:border-box;overflow:hidden!important;border:1px solid rgba(35,45,67,.11);box-shadow:0 28px 90px rgba(8,13,24,.38)}
.mm-studio-gallery-card{width:min(1120px,94vw)!important;max-width:1120px!important;height:min(760px,90dvh);max-height:90dvh!important;padding:0!important;display:flex;flex-direction:column;background:#f7f8fb!important}
.mm-studio-compact-card{width:min(480px,calc(100vw - 26px))!important;max-width:480px!important;padding:0!important;background:#fff!important}
.mm-studio-modal-head{min-height:76px;padding:14px 18px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border-bottom:1px solid #e7e9ef}
.mm-studio-modal-head.compact{min-height:72px}.mm-studio-modal-title{display:flex;align-items:center;gap:11px;min-width:0}.mm-studio-title-icon{width:40px;height:40px;flex:0 0 40px;border-radius:11px;display:grid;place-items:center;color:#c86b08;background:#fff0db;border:1px solid #f5d8af;font-size:15px}
.mm-studio-modal-title h3{margin:0!important;color:#222a3a!important;font-size:15px!important;line-height:1.5}.mm-studio-modal-title p{margin:1px 0 0!important;color:#8a91a0!important;font-size:10px!important;line-height:1.6}
.mm-studio-head-actions{display:flex;align-items:center;gap:7px}.mm-studio-upload-btn{height:38px;border:1px solid #e28a28;border-radius:9px;background:#fff7eb;color:#a95604;padding:0 13px;font:800 10px Vazirmatn,Tahoma,sans-serif;cursor:pointer;display:flex;align-items:center;gap:7px}.mm-studio-upload-btn:hover{background:#ffefd6}
.mm-studio-close-btn{width:38px;height:38px;flex:0 0 38px;border:0;border-radius:9px;background:#f0f2f6;color:#697181;display:grid;place-items:center;cursor:pointer}.mm-studio-close-btn:hover{background:#ffe8e8;color:#b03d45}

.mm-studio-categories{display:flex;align-items:center;gap:7px;padding:11px 17px 10px;overflow-x:auto;flex:0 0 auto;background:#fff;border-bottom:1px solid #e7e9ef;scrollbar-width:thin}
.mm-studio-category{height:34px;flex:0 0 auto;padding:0 13px;border:1px solid #dfe2e9;border-radius:18px;background:#fff;color:#626a78;font:750 10px Vazirmatn,Tahoma,sans-serif;cursor:pointer;display:flex;align-items:center;gap:6px}
.mm-studio-category small{min-width:18px;height:18px;border-radius:9px;display:grid;place-items:center;background:#edf0f4;color:#7b8392;font-size:8px}.mm-studio-category:hover{border-color:#efb873;background:#fffaf3}.mm-studio-category.active{border-color:#e68a22;background:#fff0dc;color:#a85604}.mm-studio-category.active small{background:#e68a22;color:#fff}
.mm-studio-gallery{flex:1;min-height:0;overflow-y:auto;padding:14px 16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(122px,1fr));align-content:start;gap:9px;background:#f7f8fb;contain:layout paint}
.mm-studio-loading,.mm-studio-empty{grid-column:1/-1;min-height:240px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#858d9d;font-size:11px}.mm-studio-loading i{font-size:22px;color:#e1851c}
.mm-studio-bg-card{position:relative;aspect-ratio:1;border:2px solid transparent;border-radius:11px;padding:0;background:#e9ebf0;overflow:hidden;cursor:pointer;box-shadow:0 3px 9px rgba(16,24,40,.065);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;content-visibility:auto;contain-intrinsic-size:142px 142px}
.mm-studio-bg-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(16,24,40,.13)}.mm-studio-bg-card.selected{border-color:#f08b18;box-shadow:0 0 0 3px rgba(240,139,24,.17),0 8px 22px rgba(16,24,40,.14)}
.mm-studio-bg-card:before{content:"";position:absolute;inset:0;background:linear-gradient(110deg,#e7e9ee 28%,#f5f6f8 42%,#e7e9ee 58%);background-size:220% 100%;animation:mmThumbLoading 1.15s linear infinite}.mm-studio-bg-card img{position:relative;width:100%;height:100%;display:block;object-fit:cover;opacity:0;transition:opacity .18s ease}.mm-studio-bg-card img.loaded{opacity:1}@keyframes mmThumbLoading{to{background-position-x:-220%}}.mm-studio-bg-card span{position:absolute;inset:auto 7px 7px 7px;padding:6px 8px;border-radius:8px;color:#fff;background:linear-gradient(90deg,rgba(17,20,28,.79),rgba(17,20,28,.48));font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right;backdrop-filter:blur(5px)}
.mm-studio-bg-card .mm-card-check{position:absolute;top:8px;left:8px;width:24px;height:24px;border-radius:12px;display:none;place-items:center;background:#e98210;color:#fff;font-size:10px;box-shadow:0 3px 10px rgba(0,0,0,.2)}.mm-studio-bg-card.selected .mm-card-check{display:grid}
.mm-studio-modal-footer{min-height:67px;box-sizing:border-box;padding:11px 17px;display:flex;align-items:center;justify-content:space-between;gap:13px;background:#fff;border-top:1px solid #e2e5eb}.mm-studio-modal-footer.compact{min-height:66px;padding:12px 16px}
.mm-studio-selection{min-width:0;color:#747c8b;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mm-studio-footer-actions{display:flex;align-items:center;justify-content:center;gap:8px}
.mm-studio-btn{height:38px;min-width:84px;border:0;border-radius:9px;padding:0 14px;font:800 10px Vazirmatn,Tahoma,sans-serif;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px}.mm-studio-btn.primary{color:#fff;background:linear-gradient(135deg,#f7971e,#d56d08);box-shadow:0 5px 13px rgba(218,116,10,.22)}.mm-studio-btn.primary:disabled{opacity:.38;cursor:not-allowed;box-shadow:none}.mm-studio-btn.secondary{background:#eef0f4;color:#555e6d}.mm-studio-btn.reset{background:#fff5df;color:#a8620d;border:1px solid #f0d39e}.mm-studio-btn.danger{background:#c7464e;color:#fff}.mm-studio-btn:hover:not(:disabled){filter:brightness(.97)}

.mm-studio-controls{padding:17px 18px 20px;display:flex;flex-direction:column;gap:18px}.mm-studio-controls label{display:flex;flex-direction:column;gap:9px}.mm-studio-controls label>span{display:flex;align-items:center;justify-content:space-between;color:#424a59;font-size:11px;font-weight:750}.mm-studio-controls output{min-width:45px;direction:rtl;text-align:left;color:#b75f05;font-size:10px;font-weight:850}
.mm-studio-controls input[type=range]{width:100%;height:5px;border-radius:5px;accent-color:#e88414;cursor:pointer}
.mm-reflection-switch{margin:16px 18px 0;padding:11px 12px;border:1px solid #e7e9ee;border-radius:11px;background:#fafbfc;display:flex;align-items:center;gap:10px;cursor:pointer}.mm-reflection-switch>span:first-child{display:flex;flex:1;flex-direction:column}.mm-reflection-switch strong{color:#384151;font-size:11px}.mm-reflection-switch small{color:#9298a5;font-size:9px}.mm-reflection-switch input{position:absolute;opacity:0;pointer-events:none}.mm-switch-ui{position:relative;width:42px;height:23px;flex:0 0 42px;border-radius:12px;background:#cdd1d9;transition:background .18s ease}.mm-switch-ui:after{content:"";position:absolute;top:3px;right:3px;width:17px;height:17px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.2);transition:transform .18s ease}.mm-reflection-switch input:checked+.mm-switch-ui{background:#e88414}.mm-reflection-switch input:checked+.mm-switch-ui:after{transform:translateX(-19px)}
.mm-reflection-blend{margin:10px 18px 0;display:flex;align-items:center;justify-content:space-between;gap:10px}.mm-reflection-blend>span{font-size:10px;font-weight:750;color:#596171;white-space:nowrap}.mm-reflection-blend-options{display:flex;direction:ltr;padding:3px;border-radius:9px;background:#eef0f4;gap:3px}.mm-reflection-blend-options button{height:29px;border:0;border-radius:7px;padding:0 9px;background:transparent;color:#6c7380;font:750 9px Arial,sans-serif;cursor:pointer}.mm-reflection-blend-options button.active{background:#fff;color:#b75d04;box-shadow:0 2px 7px rgba(18,26,42,.12)}.mm-reflection-blend-options button:disabled{opacity:.42;cursor:not-allowed}
.mm-studio-confirm-card{width:min(390px,calc(100vw - 28px))!important;max-width:390px!important;padding:25px 22px!important;text-align:center!important;background:#fff!important}.mm-studio-warning-icon{width:54px;height:54px;margin:0 auto 10px;border-radius:17px;display:grid;place-items:center;background:#fff0f0;color:#bd424a;font-size:20px}.mm-studio-confirm-card h3{margin:0 0 7px!important;font-size:16px!important;color:#2c3341!important}.mm-studio-confirm-card p{margin:0 0 18px!important;color:#7b8290!important;font-size:11px!important}.mm-studio-confirm-card .mm-studio-footer-actions{width:100%}.mm-studio-confirm-card .mm-studio-btn{flex:1}

body.night-mode .mm-studio-menu,body.night-mode .mm-studio-modal-head,body.night-mode .mm-studio-modal-footer,body.night-mode .mm-studio-compact-card,body.night-mode .mm-studio-confirm-card{background:#272a38!important;color:#eef0f6}
body.night-mode .mm-studio-menu{border-color:rgba(255,255,255,.09)}body.night-mode .mm-studio-menu button{color:#e1e4ec}body.night-mode .mm-studio-menu button:hover:not(:disabled){background:rgba(247,151,30,.13);color:#ffc47d}body.night-mode .mm-studio-menu-divider{background:rgba(255,255,255,.08)}
body.night-mode .mm-studio-gallery-card,body.night-mode .mm-studio-gallery{background:#202330!important}body.night-mode .mm-studio-modal-head,body.night-mode .mm-studio-modal-footer,body.night-mode .mm-studio-categories{background:#292c3a!important;border-color:rgba(255,255,255,.07)}body.night-mode .mm-studio-modal-title h3,body.night-mode .mm-studio-confirm-card h3{color:#f1f2f7!important}body.night-mode .mm-studio-modal-title p,body.night-mode .mm-studio-confirm-card p{color:#9da3b1!important}
body.night-mode .mm-studio-category{background:#303442;border-color:#444958;color:#c8ccd6}body.night-mode .mm-studio-category.active{background:rgba(232,132,20,.18);border-color:#d97a10;color:#ffc27b}body.night-mode .mm-studio-bg-card{background:#171923}body.night-mode .mm-studio-selection{color:#aeb3c0}body.night-mode .mm-studio-close-btn,body.night-mode .mm-studio-btn.secondary{background:#363a48;color:#d8dbe4}body.night-mode .mm-studio-controls label>span,body.night-mode .mm-reflection-switch strong{color:#daddE7}body.night-mode .mm-reflection-switch{background:#303340;border-color:#424653}body.night-mode .mm-reflection-switch small{color:#969cab}
body.night-mode .mm-reflection-blend>span{color:#c8ccd6}body.night-mode .mm-reflection-blend-options{background:#343745}body.night-mode .mm-reflection-blend-options button{color:#aeb3bf}body.night-mode .mm-reflection-blend-options button.active{background:#484c5c;color:#ffc27b}

/* Transform and reflection are floating inspectors, not blocking modals. */
#studioTransformModal,#studioReflectionModal{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;pointer-events:none!important;display:block!important}
#studioTransformModal.open,#studioReflectionModal.open{pointer-events:none!important}
#studioTransformModal .mm-studio-compact-card,#studioReflectionModal .mm-studio-compact-card{position:fixed;left:16px;top:96px;margin:0!important;pointer-events:auto!important;transform:none!important;opacity:0;transition:opacity .18s ease,box-shadow .18s ease;max-height:calc(100dvh - 24px);overflow-y:auto!important;box-shadow:0 18px 55px rgba(8,13,24,.28)!important}
#studioTransformModal.open .mm-studio-compact-card,#studioReflectionModal.open .mm-studio-compact-card{transform:none!important;opacity:1}
#studioTransformModal .mm-studio-modal-head,#studioReflectionModal .mm-studio-modal-head{cursor:move;user-select:none;touch-action:none}
#studioTransformModal .mm-studio-close-btn,#studioReflectionModal .mm-studio-close-btn{cursor:pointer}

@media(max-width:760px){
  .mm-photo-studio-trigger{min-width:112px;padding:0 10px}.mm-studio-gallery-card{width:96vw!important;height:92dvh;max-height:92dvh!important}.mm-studio-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:10px}.mm-studio-modal-head{align-items:flex-start;padding:11px 12px;min-height:70px}.mm-studio-head-actions{gap:5px}.mm-studio-upload-btn{padding:0 9px}.mm-studio-title-icon{display:none}.mm-studio-modal-title p{display:none}.mm-studio-categories{padding-inline:11px}.mm-studio-modal-footer{padding-inline:12px}.mm-studio-selection{max-width:36vw}.mm-studio-btn{min-width:70px;padding-inline:10px}.mm-reflection-blend{align-items:flex-start;flex-direction:column}.mm-reflection-blend-options{width:100%;box-sizing:border-box}.mm-reflection-blend-options button{flex:1;padding-inline:4px}
}
@media(max-width:440px){.mm-studio-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
