
/* CAROMY_BALL_TOOLBAR_V01 */
.table-panel .practice-table-toolbar {
  position: relative !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 5px !important;
  min-width: 0 !important;
}

/* Old controls remain in DOM for JS compatibility */
.practice-table-toolbar .view-tools,
.practice-table-toolbar .zoom-tools {
  display: none !important;
}

.practice-table-toolbar .caromy-ball-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.practice-table-toolbar .caromy-ball-picker {
  position: relative;
  flex: 0 0 auto;
}

.table-panel .practice-table-toolbar .caromy-ball-toolbar button {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 2px !important;
  margin: 0 !important;
  font-size: 19px !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.practice-table-toolbar .caromy-ball-select {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
}

.practice-table-toolbar .caromy-ball-select .caromy-ball-dot {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: block;
  border: 1px solid rgba(0,0,0,.16);
  box-shadow: inset -3px -4px 5px rgba(0,0,0,.15),
              inset 3px 3px 4px rgba(255,255,255,.75);
}

.practice-table-toolbar .caromy-ball-select .caromy-chevron {
  font-size: 10px;
}

.practice-table-toolbar .caromy-ball-menu {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 5px);
  left: 0;
  display: flex;
  gap: 5px;
  padding: 6px;
  border: 1px solid #c9d8d3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(0,0,0,.16);
  white-space: nowrap;
}

.practice-table-toolbar .caromy-ball-menu[hidden] {
  display: none !important;
}

.practice-table-toolbar .caromy-ball-menu button[aria-pressed="true"] {
  outline: 2px solid #0d9b80;
  outline-offset: -2px;
}

.practice-table-toolbar .caromy-nudge-pairs {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  flex: 0 0 auto;
}

.practice-table-toolbar .caromy-nudge-pair {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
}

@media (max-width: 390px) {
  .practice-table-toolbar .caromy-ball-toolbar {
    gap: 3px !important;
  }
  .practice-table-toolbar .caromy-nudge-pairs {
    gap: 5px !important;
  }
  .table-panel .practice-table-toolbar
  .caromy-ball-toolbar button {
    width: 30px !important;
    min-width: 30px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    font-size: 17px !important;
  }
}


/* CAROMY LANDSCAPE TOOLBAR FIX V02 */
html body .table-panel .practice-table-toolbar .view-tools,
html body .table-panel .practice-table-toolbar .zoom-tools,
html body .table-panel .practice-table-toolbar #rotate90Btn,
html body .table-panel .practice-table-toolbar #flipHorizontalBtn,
html body .table-panel .practice-table-toolbar #flipVerticalBtn,
html body .table-panel .practice-table-toolbar #zoomInBtn,
html body .table-panel .practice-table-toolbar #zoomOutBtn {
  display: none !important;
}

html body .table-panel .practice-table-toolbar .caromy-ball-toolbar {
  display: flex !important;
  width: 100% !important;
  flex: 1 1 100% !important;
  min-width: 0 !important;
  align-items: center !important;
  justify-content: space-between !important;
}

html body .table-panel .practice-table-toolbar {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  min-height: 40px !important;
}


/* CAROMY TOOLBAR POLISH V03 */
html body .practice-table-toolbar .caromy-chevron {
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

html body .practice-table-toolbar .caromy-ball-select {
  gap: 3px !important;
}

html body .practice-table-toolbar .caromy-ball-menu {
  display: none !important;
}

body .caromy-ball-menu-portal {
  position: fixed !important;
  z-index: 2147483000 !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 8px !important;
  width: max-content !important;
  border: 1px solid #b8d0c8 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.2) !important;
}

body .caromy-ball-menu-portal[hidden] {
  display: none !important;
}

body .caromy-ball-menu-portal button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 4px !important;
  border-radius: 9px !important;
  border: 1px solid #d4e0db !important;
  background: #f9fcfb !important;
}

body .caromy-ball-menu-portal .caromy-ball-dot {
  display: block !important;
  width: 27px !important;
  height: 27px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(0,0,0,.2) !important;
  box-shadow: inset -3px -4px 5px rgba(0,0,0,.16),
              inset 3px 3px 4px rgba(255,255,255,.75) !important;
}

html body .practice-table-toolbar .caromy-sensory-card
#practiceToolbarMute,
html body .practice-table-toolbar .caromy-sensory-card
#practiceToolbarVibrate {
  box-sizing: border-box !important;
  flex: 0 0 34px !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  font-size: 19px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media(max-width:390px) {
 html body .practice-table-toolbar .caromy-sensory-card
 #practiceToolbarMute,
 html body .practice-table-toolbar .caromy-sensory-card
 #practiceToolbarVibrate {
   flex-basis: 30px !important;
   width: 30px !important;
   min-width: 30px !important;
   max-width: 30px !important;
   height: 32px !important;
   min-height: 32px !important;
   max-height: 32px !important;
 }
}

/* CAROMY BALL PERFECT CIRCLE V04 */
html body .caromy-ball-dot,
html body .practice-table-toolbar .caromy-ball-dot,
html body .caromy-ball-menu-portal .caromy-ball-dot {
  box-sizing: border-box !important;
  display: block !important;
  width: 23px !important;
  min-width: 23px !important;
  max-width: 23px !important;
  height: 23px !important;
  min-height: 23px !important;
  max-height: 23px !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 23px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: none !important;
}

html body .caromy-ball-menu-portal .caromy-ball-dot {
  width: 27px !important;
  min-width: 27px !important;
  max-width: 27px !important;
  height: 27px !important;
  min-height: 27px !important;
  max-height: 27px !important;
  flex: 0 0 27px !important;
}


/* CAROMY TOOLBAR V05 */
html body .practice-table-toolbar .caromy-ball-select-group {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
  flex: 0 1 auto !important;
}

html body .practice-table-toolbar .caromy-nudge-label {
  display: inline-block !important;
  white-space: nowrap !important;
  font-size: clamp(10px, 1.15vw, 14px) !important;
  font-weight: 700 !important;
  color: #194a3e !important;
}

html body .practice-table-toolbar .caromy-ball-select {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 4px 7px !important;
}

html body .practice-table-toolbar .caromy-chevron {
  font-size: 23px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  color: #164b40 !important;
}

html body .practice-table-toolbar .caromy-sensory-card
#practiceToolbarMute,
html body .practice-table-toolbar .caromy-sensory-card
#practiceToolbarVibrate {
  box-sizing: border-box !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  flex: 0 0 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 19px !important;
}



@media (max-width: 600px) {
  html body .practice-table-toolbar .caromy-ball-select-group {
    gap: 4px !important;
  }

  html body .practice-table-toolbar .caromy-nudge-label {
    font-size: 10px !important;
  }

  html body .practice-table-toolbar .caromy-ball-select {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    padding: 3px 4px !important;
  }

  html body .practice-table-toolbar .caromy-sensory-card
  #practiceToolbarMute,
  html body .practice-table-toolbar .caromy-sensory-card
  #practiceToolbarVibrate {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    flex-basis: 30px !important;
  }
}


/* CAROMY TOOLBAR V06 - SINGLE SELECTION CARD */
html body .practice-table-toolbar .caromy-ball-select-group {
  display: flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
}

html body .practice-table-toolbar .caromy-ball-select {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 150px !important;
  max-width: none !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 3px 9px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  white-space: nowrap !important;
}

html body .practice-table-toolbar .caromy-ball-select
.caromy-nudge-label {
  display: inline-block !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

html body .practice-table-toolbar .caromy-ball-select
.caromy-chevron {
  font-size: 22px !important;
  margin-left: auto !important;
}

@media(max-width:600px) {
  html body .practice-table-toolbar .caromy-ball-select {
    min-width: 132px !important;
    padding: 3px 6px !important;
    gap: 5px !important;
  }
  html body .practice-table-toolbar .caromy-ball-select
  .caromy-nudge-label {
    font-size: 10px !important;
  }
}


/* CAROMY COMPACT BALL SELECT V07 */
html body .practice-table-toolbar .caromy-ball-select {
  box-sizing: border-box !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 3px 6px !important;
  gap: 4px !important;
  overflow: hidden !important;
}

html body .practice-table-toolbar .caromy-ball-select
.caromy-nudge-label {
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: auto !important;
  font-size: 11px !important;
  white-space: nowrap !important;
}

html body .practice-table-toolbar .caromy-ball-select
.caromy-ball-dot {
  flex: 0 0 20px !important;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  border-radius: 50% !important;
}

html body .practice-table-toolbar .caromy-ball-select
.caromy-chevron {
  flex: 0 0 auto !important;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1 !important;
}


/* CAROMY TOOLBAR V08 - FIX CLIPPED BALL SELECT */
html body .table-panel .practice-table-toolbar
.caromy-ball-select-group,
html body .table-panel .practice-table-toolbar
.caromy-ball-picker {
  box-sizing: border-box !important;
  display: flex !important;
  flex: 0 0 128px !important;
  width: 128px !important;
  min-width: 128px !important;
  max-width: 128px !important;
  overflow: visible !important;
}

html body .table-panel .practice-table-toolbar
button#caromySelectedBall {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex: 0 0 128px !important;
  width: 128px !important;
  min-width: 128px !important;
  max-width: 128px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 3px 7px !important;
  gap: 5px !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

html body .table-panel .practice-table-toolbar
button#caromySelectedBall .caromy-nudge-label {
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: auto !important;
  font-size: 12px !important;
  white-space: nowrap !important;
}

html body .table-panel .practice-table-toolbar
button#caromySelectedBall .caromy-ball-dot {
  display: block !important;
  flex: 0 0 21px !important;
  width: 21px !important;
  min-width: 21px !important;
  max-width: 21px !important;
  height: 21px !important;
  min-height: 21px !important;
  max-height: 21px !important;
  aspect-ratio: 1 !important;
  border-radius: 50% !important;
}

html body .table-panel .practice-table-toolbar
button#caromySelectedBall .caromy-chevron {
  display: inline-block !important;
  flex: 0 0 auto !important;
  font-size: 14px !important;
  margin: 0 !important;
}




/* CAROMY TOOLBAR RIGHT GROUP ALIGNMENT V10 */
html body .table-panel .practice-table-toolbar .caromy-ball-toolbar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

html body .table-panel .practice-table-toolbar
.caromy-sensory-card > #practiceToolbarMute,
html body .table-panel .practice-table-toolbar
.caromy-sensory-card > #practiceToolbarVibrate {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: static !important;
  flex: 0 0 34px !important;
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  align-items: center !important;
  justify-content: center !important;
}

@media(max-width:390px) {
  html body .table-panel .practice-table-toolbar
  .caromy-sensory-card > #practiceToolbarMute,
  html body .table-panel .practice-table-toolbar
  .caromy-sensory-card > #practiceToolbarVibrate {
    flex-basis: 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
  }
}

/* CAROMY MOBILE LANDSCAPE MUTE ICON FIX */

@media (orientation:landscape) and (pointer:coarse) {
}

/* CAROMY LANDSCAPE TOOLBAR SPACE FIX V01 */

@media (orientation:landscape) and (pointer:coarse) and (max-height:900px) {
  html body .table-panel .practice-table-toolbar > .view-tools,
  html body .table-panel .practice-table-toolbar > .zoom-tools {
    display:none!important;
  }

  html body .table-panel .practice-table-toolbar > .caromy-ball-toolbar {
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    flex:1 1 auto!important;
    align-items:center!important;
  }
}


/* CAROMY PORTRAIT PICKER SPACING V01 */
@media (orientation: portrait) and (pointer: coarse) {
  html body .table-panel .practice-table-toolbar
  button#caromySelectedBall {
    justify-content: center !important;
    gap: 3px !important;
  }

  html body .table-panel .practice-table-toolbar
  button#caromySelectedBall .caromy-nudge-label,
  html body .table-panel .practice-table-toolbar
  button#caromySelectedBall .caromy-ball-dot,
  html body .table-panel .practice-table-toolbar
  button#caromySelectedBall .caromy-chevron {
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex-shrink: 0 !important;
  }
}

/* CAROMY PORTRAIT TOOLBAR TUNE V01 START */
@media (orientation: portrait) and (pointer: coarse) {

  /* 미세조절 버튼 폭 축소 */
  html body .table-panel .practice-table-toolbar
  .caromy-ball-select-group,
  html body .table-panel .practice-table-toolbar
  .caromy-ball-picker {
    flex: 0 0 103px !important;
    width: 103px !important;
    min-width: 103px !important;
    max-width: 103px !important;
  }

  html body .table-panel .practice-table-toolbar
  button#caromySelectedBall {
    box-sizing: border-box !important;
    width: 103px !important;
    min-width: 103px !important;
    max-width: 103px !important;
    justify-content: center !important;
    gap: 3px !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
  }

  /* 진동 버튼을 화면 안쪽으로 이동 */
  html body .table-panel .practice-table-toolbar
  .caromy-sensory-card {
    margin-right: 0 !important;
  }
}
/* CAROMY PORTRAIT TOOLBAR TUNE V01 END */

/* CAROMY PORTRAIT SYMMETRIC MARGINS V01 */
@media (orientation:portrait) and (pointer:coarse) {
  html body .table-panel .practice-table-toolbar
  .caromy-sensory-card {
    margin-right: 0 !important;
  }
}
