/* =========================================================
   KANO — Tasarla Start Modal (Spreadshirt-like)
   Uses existing HTML in tasarla.html (#kanoStartModal)
   Load AFTER style.css
   ========================================================= */

/* Scroll lock when modal open */
body.kano-modal-open{ overflow: hidden; }

/* Hidden by default; JS toggles .is-open */
.kano-start-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.kano-start-modal.is-open{ display: flex; }

.kano-start-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}

.kano-start-modal-card{
  position: relative;
  width: min(560px, calc(100vw - 48px));
  background: #fff;
  border-radius: 14px;
  padding: 30px 34px 28px;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}

@media (max-width: 520px){
  .kano-start-modal{ padding: 16px; }
  .kano-start-modal-card{ width: calc(100vw - 32px); padding: 24px 22px 22px; }
}

.kano-start-modal-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  color: #444;
}
.kano-start-modal-close:hover{
  background: rgba(0,0,0,.05);
  color: #111;
}

#kanoStartModalTitle{
  margin: 0 0 18px 0;
  text-align: center;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .2px;
}

.kano-start-actions{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
}

@media (max-width: 420px){
  .kano-start-actions{ grid-template-columns: 1fr; }
}

.kano-start-action{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 18px 14px 16px;
  min-height: 132px;
  border: 1px solid #e7e7e7;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  user-select: none;
}

.kano-start-action::before{
  content: "";
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #f2f2f2;
  display: block;
  margin-bottom: 6px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28px 28px;
}

.kano-start-action:hover{
  transform: translateY(-1px);
  border-color: #d6d6d6;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

.kano-start-action:active{
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
}

.kano-start-action-title{
  font-weight: 600;
  font-size: 14px;
  color: #111;
}

.kano-start-action-sub{
  font-size: 12px;
  color: #666;
}

/* Icons (inline SVG) */
.kano-start-action[data-action="product"]::before{
  background-image: url("../img/icons/tshirt.svg");
}

.kano-start-action[data-action="design"]::before{
  background-image: url("../img/icons/design.svg");
}

.kano-start-action[data-action="text"]::before{
  background-image: url("../img/icons/text.svg");
}

.kano-start-action[data-action="upload"]::before{
  background-image: url("../img/icons/upload.svg");
}

/* =========================================================
   KANO — START MODAL CENTER HARD FIX (paste at bottom)
   Amaç: modalın sağ alta kaymasını tamamen bitirmek
   ========================================================= */

/* Modal wrapper kesin viewport'a kilit */
.kano-start-modal.is-open{
  position: fixed !important;
  inset: 0 !important;
  display: block !important;     /* flex vs. etkilenmesin */
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
}

/* Backdrop kesin tam ekran */
.kano-start-modal.is-open .kano-start-backdrop{
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
}

/* Kartı matematiksel merkez: kayma ihtimali sıfır */
.kano-start-modal.is-open .kano-start-modal-card{
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
}

/* (opsiyonel) scrollbar genişliği yüzünden mikro kayma olmasın */
body.kano-modal-open{
  overflow: hidden !important;
}
/* =========================================================
   KANO — Sidebar Undo/Redo: Yükle'nin altına sabitle + hafif gri
   HTML: .designer-sidebar-bottom + #btnUndo/#btnRedo
   ========================================================= */

/* Sidebar'ı kolon flex yap, alt bloğu dibe it */
.designer-editor .designer-sidebar{
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;        /* parent height varsa çalışır */
  min-height: 100% !important;
}

.designer-editor{
  min-height: 100vh !important;   /* sidebar dibe otursun diye */
}

/* Alt blok: gerçekten en altta dursun */
.designer-sidebar .designer-sidebar-bottom{
  margin-top: auto !important;
  padding: 14px 10px 16px !important;
  background: #f6f7f8 !important;           /* hafif gri */
  border-top: 1px solid #e7e7ea !important; /* ince ayraç */
}

/* Undo/Redo butonları */
.designer-sidebar-bottom .designer-history-btn{
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 10px 10px !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 10px !important;
  color: #9aa0a6 !important;      /* gri yazı */
  font-weight: 600 !important;
  cursor: default !important;
}

/* İkonlar img olduğu için griye çek */
.designer-sidebar-bottom .designer-history-img{
  width: 22px !important;
  height: 22px !important;
  filter: grayscale(1) brightness(0.75) !important;
  opacity: .85 !important;
}

/* Disabled iken daha soluk */
.designer-sidebar-bottom .designer-history-btn:disabled{
  opacity: .75 !important;
}

/* Enabled olunca biraz daha belirgin + hover */
.designer-sidebar-bottom .designer-history-btn:not(:disabled){
  color: #6f767d !important;
  cursor: pointer !important;
}
.designer-sidebar-bottom .designer-history-btn:not(:disabled):hover{
  background: rgba(0,0,0,.04) !important;
}
.designer-sidebar-bottom .designer-history-btn:not(:disabled) .designer-history-img{
  filter: grayscale(1) brightness(0.55) !important;
  opacity: 1 !important;
}


/* =========================================================
   KANO START MODAL SAFETY OVERRIDE
   - Single source of truth: aria-hidden
   - Prevent invisible modal from blocking clicks
   ========================================================= */
.kano-start-modal[aria-hidden="true"]{
  display: none !important;
}
.kano-start-modal[aria-hidden="false"]{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.kano-start-modal.is-open{
  /* keep class for animation hooks, but DO NOT override display anymore */
}

/* ============ Kano Mobile Text Modal (MOBILE ONLY) ============ */
@media (max-width: 900px){

  .kanoTextModalBackdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 2147482790; /* dock: 2147482700 */
  }

  .kanoTextModal{
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-height: 62vh;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 60px rgba(0,0,0,.22);
    z-index: 2147482800;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .kanoTextModalHeader{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }
  .kanoTextModalHeader .ttl{
    font-weight: 700;
    font-size: 14px;
  }
  .kanoTextModalHeader .close{
    width: 38px;
    height: 38px;
    border: 1px solid rgba(0,0,0,.12);
    background:#fff;
    border-radius: 12px;
    font-size: 18px;
    line-height: 1;
  }

  .kanoTextModalBody{
    padding: 12px 14px 14px;
    overflow:auto;
  }

  .kanoRow{
    display:flex;
    gap:10px;
    align-items:center;
    margin-bottom: 10px;
  }
  .kanoRow label{
    width: 86px;
    font-size: 12px;
    color: rgba(0,0,0,.68);
  }
  .kanoRow select,
  .kanoRow input[type="number"],
  .kanoRow input[type="range"]{
    flex:1;
  }

  .kanoBtns{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
  }
  .kanoBtn{
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.12);
    background:#fff;
    font-weight: 700;
    font-size: 12px;
  }
  .kanoBtn.isOn{
    border-color: rgba(0,0,0,.5);
  }

}
