
/* Basit kopya engeli (seçim kapat) */
body.nocopy, body.nocopy *{
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* input/textarea/select içinde seçim serbest */
body.nocopy input,
body.nocopy textarea,
body.nocopy select{
  -webkit-user-select: text !important;
  user-select: text !important;
}

/* ---------- SOL MENU ---------- */
.export-menu{
  position: fixed;
  z-index: 999999;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  width: max-content;
  height: auto;
  pointer-events: auto;
} 
.left-menu{
 position:fixed;
 left:20px;
 top:20px;
 width:135px;
 background:#fff;
 border-radius:12px;
 box-shadow:0 10px 25px rgba(0,0,0,.15);
 overflow:hidden;
 z-index:999;
}

.menu-btn{
 padding: 2px 2px 2px 5px;
 text-align:center;
 border-bottom:1px solid #eee;
 cursor:pointer;
 font-size:13px;
 user-select:none;
 display:flex;
 flex-wrap:wrap;
}
.menu-btn:hover{ background:#f5f5f5; }

.menu-btn select,
.menu-btn input[type=range]{
 width:90%;
 margin-top:5px;
}

.uk-button{ border:none; padding:2px; }
.uk-icon{ margin-right:3px; }

.uk-container{ max-width: fit-content; }
.editor-layout{ margin-left:170px; }

@media (max-width: 768px){
  body{ margin:0; padding:0; overflow-x:hidden; }

  .left-menu{
    left:10px;
    right:10px;
    top:auto;
    bottom:10px;
    width:auto;
    height:92px;
    display:flex;
    flex-direction:row;
    align-items:stretch;
    gap:6px;
    padding:6px;
    overflow-x:auto;
    overflow-y:hidden;
    border-radius:14px;
    z-index:9999;
    -webkit-overflow-scrolling: touch;
  }

  .menu-btn{
    min-width:95px;
    border-bottom:none;
    border-right:1px solid #eee;
    padding:6px 8px;
    font-size:12px;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }
  .menu-btn:last-child{ border-right:none; }

  .menu-btn select,
  .menu-btn input[type=range]{ width:100%; margin-top:4px; }

  .editor-layout{
    margin-left:0 !important;
    padding:10px;
    padding-bottom:120px;
  }

  .uk-container{ max-width:100% !important; width:100% !important; }
  .uk-card{ overflow:auto; }
}

/* ---------- RIGHT CLICK MENU ---------- */
#contextMenu{
 position:fixed;
 display:none;
 background:#fff;
 border-radius:8px;
 box-shadow:0 5px 15px rgba(0,0,0,.2);
 z-index:9999999;
 width:170px;
}
#contextMenu .menu-row,
#contextMenu #groupBtn,
#contextMenu #ungroupBtn{
 padding:10px;
 cursor:pointer;
 border-bottom:1px solid #eee;
 font-size:13px;
}
#contextMenu .menu-row:hover,
#contextMenu #groupBtn:hover,
#contextMenu #ungroupBtn:hover{ background:#f0f0f0; }
#contextMenu input[type="color"],
#contextMenu input[type="range"]{ cursor:pointer; }

/* -------- LOCAL FONTS -------- */
@font-face { font-family:'Roboto'; src:url('/reditor/fonts/Roboto-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Oswald'; src:url('/reditor/fonts/Oswald-VariableFont_wght.woff2') format('woff2'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'Montserrat'; src:url('/reditor/fonts/Montserrat-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Lobster'; src:url('/reditor/fonts/Lobster-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'BungeeShade'; src:url('/reditor/fonts/BungeeShade-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Jacques'; src:url('/reditor/fonts/JacquesFrancoisShadow-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'NotoColorEmoji'; src:url('/reditor/fonts/NotoColorEmoji-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'GreatVibes'; src:url('/reditor/fonts/GreatVibes-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Charm'; src:url('/reditor/fonts/Charm-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Bruno'; src:url('/reditor/fonts/BrunoAceSC-Regular.woff2') format('woff2'); font-weight:400; font-style:normal; font-display:swap; }
.uk-card-body{ padding:20px; }
html{ background:#ececec; }
.uk-card.uk-card-default.uk-card-body.uk-margin{ display:flex; flex-wrap:wrap; }

/* ✅ Özel ölçü */
.custom-size{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:6px;
}
.custom-size .row{ width:100%; display:flex; gap:6px; }
.custom-size input{
  flex:1 1 0;
  height:32px;
  line-height:32px;
  padding:0 8px;
  font-size:13px;
}
.custom-size button{
  width:100%;
  height:32px;
  padding:0 10px;
  font-size:13px;
}

/* HEADER */
.editor-header{ padding:12px 20px; }
.header-inner{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; }
.header-left{ font-size:20px; }
.header-left .version{ font-size:12px; margin-left:8px; color:#888; }
.header-right{ display:flex; gap:8px; }

.left-menu{
  transform-origin: top left;
  will-change: transform;
}

/* ================= TEMPLATE MODAL (✅ POPUP 800x600 + 2'li grid + scroll) ================= */
#templateModal .uk-modal-dialog{
  width: 800px;
  max-width: calc(100vw - 20px);
  height: 600px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  border-radius: 12px;
}
#templateModal .tpl-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
#templateModal .tpl-scroll{
  height: calc(600px - 120px);
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding-right: 6px;
}
@media (max-width: 768px){
  #templateModal .uk-modal-dialog{
    width: calc(100vw - 20px);
    height: 600px;
    max-height: calc(100vh - 40px);
  }
  #templateModal .tpl-scroll{
    height: calc(600px - 130px);
    max-height: calc(100vh - 230px);
  }
}
#contextMenu{
  position:fixed;
  display:none;
  background:#fff;
  border-radius:8px;
  box-shadow:0 5px 15px rgba(0,0,0,.2);
  z-index:9999999;
  width:170px;

  max-height: calc(100vh - 16px);
  overflow: auto;
}
