/* ---------------------------------------------------
   🎛 toolbar.css v10 — FINAL CLEAN RIBBON
   Ha-Bin Studio • Excel / HWP Style Toolbar
   ※ ID / CLASS 100% 유지 · 역할 정리 완료
---------------------------------------------------- */
/* ============================
   Toolbar Containers
============================ */
#hb-toolbar-basic,
#hb-toolbar-advanced {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 20px;
  padding: 4px 10px;
  margin-bottom: 0;
  background: #FFFFFF;
  position: relative;
  z-index: 300;
}
/* BASIC / ADVANCED 위치 고정 */
#hb-toolbar-basic {
  position: sticky;
  top: 0;
}
#hb-toolbar-advanced {
  position: sticky;
  top: 24px; /* BASIC 높이 */
}
/* ============================
   Common Button Style
============================ */
.hb-btn {
  height: 24px;
  line-height: 24px; 
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1px solid #8F9EBB;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #2B2B2B;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease,
              border-color 0.15s ease,
              color 0.15s ease,
              transform 0.1s ease;
}
/* Hover */
.hb-btn:hover {
  background: #FFE6EE;
  border-color: #FF69B4;
  color: #3558A8;
}
/* Active */
.hb-btn:active {
  background: #FFD1E3;
  border-color: #FF69B4;
  color: #3558A8; 
  transform: scale(0.95);
}
/* Focus */
.hb-btn:focus-visible {
  outline: 2px solid rgba(255,105,180,0.55);
  outline-offset: 2px;
}
/* ============================
   BASIC Toolbar
============================ */
#hb-toolbar-basic .hb-btn {
  min-width: 72px;
}
/* ============================
   ADVANCED Toolbar
============================ */
#hb-toolbar-advanced .hb-btn {
  width: 72px;
  min-width: 72px;
}
/* Dropdowns */
#hb-toolbar-advanced .hb-select {
  min-width: 99px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 500;
  background: #FFFFFF;
  border: 1px solid #B8C2D6;
  border-radius: 6px;
}
/* ============================
   Icon / Emoji Buttons
============================ */
.hb-btn.icon {
  font-size: 18px;
}
#hb-btn-img-left,
#hb-btn-img-center,
#hb-btn-img-right {
  font-size: 16px;
}
#hb-btn-ul,
#hb-btn-ol {
  font-size: 15px;
}
#hb-btn-undo,
#hb-btn-redo {
  font-size: 18px;
}
/* ============================
   Color Button (JS Color Wins)
============================ */
.hb-color-btn {
  background: transparent;
}
.hb-color-btn:hover,
.hb-color-btn:active {
  background: inherit;
}
/* ============================
   Popup Select (Excel Style)
============================ */
#hb-font-family,
#hb-font-size,
#hb-line-height {
  display: none;
}
/* popup container */
#hb-popup {
  padding: 4px 0;
  border: none;
  box-shadow: none;
  background: #FFFFFF;
}
/* popup items */
#hb-popup .hb-btn {
  all: unset;
  display: block;
  padding: 3px 8px;
  line-height: 1.25;
  font-size: 13px;
  cursor: pointer;
  color: #2B2B2B;
}
#hb-popup .hb-btn:hover {
  background: #EAF2FF;
  color: #3558A8;
}
.hb-color-chip {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-left: 4px;
  border: 1px solid #999;
  border-radius: 2px;
  vertical-align: middle;
  background: #ffffff;
}
#hb-font-family-btn {
  font-size: 13px;
}
/* =========================
   MOBILE TOOLBAR
   Basic 10개 = 5개 x 2줄
   Advanced 10개 = 5개 x 2줄
========================= */
@media (max-width:480px){
  #hb-toolbar-basic,
  #hb-toolbar-advanced{
    display:grid;
    grid-template-columns: repeat(5, 1fr);
    gap:5px;
    padding:5px 0;
  }
  #hb-toolbar-basic .hb-btn,
  #hb-toolbar-advanced .hb-btn{
    width:100%;
    min-width:60px;
  }
  #hb-toolbar-basic{
    top:0;
  }
  #hb-toolbar-advanced{
    top:68px;
  }
}
