/* ========================================================================== 
custom.bs5.css                                                           

color will be black if not flagged and not open 

I'm trying to use a custom icon inside of a bootstrap button, this is the html part:
<button class="btn btn-info pull-right toggle" data-pausetext="Break In" 
 data-resumetext="Resume" ><i class="icon-play"></i> Clock In</button>

and on the stylesheet have this:

.icon-play {
background-image : url(../img/Clock-Play.png) no-repeat;
background-position: center center;
}
but the icon is not showing inside the button...please help...thanks

First of all your <i> element doesn't have a height and width property.
But adding height and width alone wouldn't do what you want because <i> is an inline element 
so you want to add another property as well i-e. display: inline-block 
Then the last thing to make it perfect would be to add background-size: cover 
(to adjust icon exactly into its container element)

.icon-play{
  background-image : url(../img/Clock-Play.png);
  background-size: cover;
  display: inline-block;
  height: 15px;
  width: 15px;
}

https://dev.to/lissy93/super-useful-css-resources-1ba3
https://hianna.tistory.com/753   <== box-shadow 설명, 깔끔


<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8" />
  <title>class_menu 전체 구현</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
  <style>
    body {
      background: #121212;
      color: white;
    }

</head>
<body class="p-5">

  <h5>✅ 즉시 실행 모드</h5>
  <ul id="menu1" class="list-group son-list-group-dark mb-4">
    <li class="list-group-item">즉시 실행 1</li>
    <li class="list-group-item">즉시 실행 2</li>
    <li class="list-group-item">즉시 실행 3</li>
  </ul>

  <h5>✅ 선택 저장 모드 (son-action-lazy)</h5>
  <ul id="menu2" class="list-group son-list-group-dark son-action-lazy mb-3">
    <li class="list-group-item">선택 저장용 1</li>
    <li class="list-group-item">선택 저장용 2</li>
    <li class="list-group-item">선택 저장용 3</li>
  </ul>

  <button class="btn btn-outline-light" onclick="console.log(go_menu2.UI)">🔍 go_menu2.UI 확인</button>

  <script>
    class class_menu {
      constructor(selector, handler = null) {
        this.menu = document.querySelector(selector);
        this.items = this.menu.querySelectorAll(".list-group-item");
        this.UI = { source: null, index: -1, label: "" };

        const isLazy = this.menu.classList.contains("son-action-lazy");

        this.items.forEach((item, idx) => {
          item.addEventListener("click", () => {
            this._setActive(item);

            if (isLazy) {
              this.UI = {
                source: item,
                index: idx,
                label: item.textContent.trim()
              };
            } else if (typeof handler === "function") {
              handler(item, idx, item.textContent.trim());
            }
          });
        });
      }

      _setActive(target) {
        this.items.forEach(i => i.classList.remove("active"));
        target.classList.add("active");
      }

      getActive() {
        const active = this.menu.querySelector(".list-group-item.active");
        if (!active) return null;
        return {
          label: active.textContent.trim(),
          index: Array.from(this.items).indexOf(active)
        };
      }
    }

    // 즉시 실행 모드
    const go_menu = new class_menu("#menu1", (item, idx, label) => {
      alert(`즉시 실행: ${label} (index ${idx})`);
    });

    // 저장 전용 모드
    const go_menu2 = new class_menu("#menu2");
  </script>

</body>
</html>


/*========================================================================== */

:root {
 --bs-focus-ring-width   :  1px     ;
 --bs-focus-ring-opacity :  .75     ;
 --bs-focus-ring-blur    :  0       ;
 --bs-focus-ring-color   :  rgba(var(--bs-color-primary), var(--bs-focus-ring-opacity) );
 --bs-focus-ring-box-shadow: 0 0 var(--bs-focus-ring-blur) var(--bs-focus-ring-width) var(--bs-focus-ring-color) ;
}

--bs-nav-link-color: #14181d !important;       /*  적용되지 않는다, 여전히 파란색이 된다 */
/* --bs-nav-link-color: var(--bs-link-color); */

.nav-underline {
 --bs-nav-link-padding-y             : 0.08rem    ;  /* default = 0.2rem?? */ 
 --bs-nav-underline-gap              : 1rem       ;  /* default=1rem */
 --bs-nav-underline-border-width     : 0.1rem     ;  /* default=0.125rem */ 
 --bs-nav-underline-link-active-color: black      ;
}


/*--------------------------------------------------------------------
 list-group 
----------------------------------------------------------------------*/
/*--------------------------------------------------------------------
list-group-item:hover {
  z-index: 1;
  text-decoration: none;
  background-color: #f8f9fa;
}

여기서 background-color: #f8f9fa는 연한 회색.
/*-------------------------------------------------------------------- */

.list-group-item:hover {        /* 진하게 customizing  */
  background-color: #e0b13c;
  color: #fff;
  cursor: pointer;
}

.list-group.son-list-group-dark {
   border: 1px solid #6c757d;
   background-color: #212529;
   color: #fff;
   width: max-content;
 }

 .list-group.son-list-group-dark .list-group-item {
   border: none;
   border-radius: 0;
   padding: 0.375rem 1rem;
   white-space: nowrap;
   background-color: transparent;
   color: #fff;
   transition: background-color 0.2s ease;
   user-select: none;
 }

 .list-group.son-list-group-dark .list-group-item:hover {
   background-color: #6c757d;
   color: #fff;
 }

 .list-group.son-list-group-dark .list-group-item.active {
   background-color: #0d6efd;
   color: #fff;
 }

 .list-group.son-list-group-dark .list-group-divider {
   height: 0;
   margin: 0.5rem 0;
   border-top: 1px solid #6c757d;
 }


/*--------------------------------------------------------------------
/* dropdown-menu-dark 에서 hover 시 배경색이 너무 희미해서 좀더 밝게 만듬.
/*-------------------------------------------------------------------- */
.dropdown-menu.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu.dropdown-menu-dark .dropdown-item:focus {
   background-color: #888 ;
   color: #fff;
}


/*--------------------------------------------------------------------
 menu 
----------------------------------------------------------------------*/
.son-menu-item {
    --bs-btn-padding-y: 0.2rem;
    --bs-btn-padding-x: 0.75rem;
    --bs-btn-font-size: 0.875rem;
    --bs-btn-bg: var(--bs-light);
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-border-radius: var(--bs-border-radius-sm);
    --son-hover-bg: #bee4a9;

    display: inline-block;
    width: 100%;
    text-align: left;
    background-color: var(--bs-btn-bg);
    color: var(--bs-btn-color);
    padding: var(--bs-btn-padding-y) var(--bs-btn-padding-x);
    font-size: var(--bs-btn-font-size);
    border: none;
    border-radius: var(--bs-btn-border-radius);
    transition: background-color 0.2s ease;
  }

  .son-menu-item:hover {
    background-color: var(--son-hover-bg);
  }

  .son-menu-item:disabled {
    opacity: 0.65;
    cursor: not-allowed;
  }


/*--------------------------------------------------------------------
 gradient 
----------------------------------------------------------------------*/
.bg-gradient-dark-brown {
  background: linear-gradient(to right, #3e2a1f, #705642)  !important ;
  color: #f5f5f5  !important ;                          /* 텍스트 대비 */
}

.bg-gradient-primary-deep {
  background: linear-gradient(to right, #0d6efd, #0a58ca);
  color: white;
}

.bg-gradient-secondary-soft {
  background: linear-gradient(to right, #6c757d, #adb5bd);
  color: white;
}

.bg-gradient-success-rich {
  background: linear-gradient(to right, #198754, #145c3b);
  color: white;
}

.bg-gradient-danger-deep {
  background: linear-gradient(to right, #dc3545, #a71d2a);
  color: white;
}

.bg-gradient-warning-warm {
  background: linear-gradient(to right, #ffc107, #d39e00);
  color: #212529;
}

.bg-gradient-info-fresh {
  background: linear-gradient(to right, #0dcaf0, #0a95b0);
  color: #fff;
}

/*--------------------------------------------------------------------
 callout

  <div class="callout-left-border">
    <h5>📌 기본 Callout</h5>
    <p>이 callout은 진한 왼쪽 보더를 사용하여 시각적 강조를 줍니다.</p>
  </div>

  <div class="callout-left-border callout-info">
    <h5>💡 Info</h5>
    <p>이건 정보 메시지입니다. 사용자에게 유용한 팁을 제공할 때 사용하세요.</p>
  </div>

  <div class="callout-left-border callout-warning">
    <h5>⚠️ Warning</h5>
    <p>주의가 필요한 작업이나 위험 요소를 알릴 때 적합합니다.</p>
  </div>

  <div class="callout-left-border callout-success">
    <h5>✅ Success</h5>
    <p>작업이 성공적으로 완료되었음을 알립니다.</p>
  </div>

  <div class="callout-left-border callout-danger">
    <h5>⛔ Danger</h5>
    <p>문제 발생 또는 중대한 경고 메시지에 사용됩니다.</p>
  </div>
----------------------------------------------------------------------*/

.callout-left {
   border-left: 10px solid #343a40; /* 진한 왼쪽 보더 */
   background-color: #f8f9fa;       /* 연한 배경 */
   padding: 1rem;
   border-radius: 4px;
   margin-bottom: 1rem;
 }

 .callout-info {
   border-left-color: #0dcaf0;
   background-color: #eaf9fd;
 }

.callout-warning {
   border-left-color: #ffc107;
   background-color: #fff8e1;
 }

 .callout-success {
   border-left-color: #198754;
   background-color: #e6f4ea;
 }

 .callout-danger {
   border-left-color: #dc3545;
   background-color: #fbe9eb;
 }


/*--------------------------------------------------------------------
 button 
 버튼을 가져올때, 부트스트랩에서 설정해 놓은 효과때문에 클릭할때 테두리가 생김 제거코드:
 !important를 붙히면, 우선순위로 지정되어 해당 CSS가 1순위로 적용됨
----------------------------------------------------------------------*/

.btn-xs {
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1;
  border-radius: 0.2rem;
  position: relative;
  overflow: visible;
}

.btn.son-btn:focus,
.btn.son-btn:active:focus,
.btn.son-btn.active:focus,
.btn.son-btn.focus,
.btn.son-btn:active.focus,
.btn.son-btn.active.focus {
   outline   : none  !important ;
   box-shadow: none  !important ;
}

.btn:hover {
  border: 1px solid ; 
}

.son-btn-menu {
  --bs-btn-padding-y: 0.2rem ;      /* default = 0.375rem; */
  --bs-btn-hover-bg : #bee4a9 ;    
}

.son-menu-item {
  --bs-btn-padding-y: 0.2rem ;      /* default = 0.375rem; */
  --bs-btn-hover-bg : #bee4a9 ;    
}

-----------------------------------------------------------
https://github.com/exacti/floating-labels                
https://github.com/tkrotoff/bootstrap-floating-label
https://webdesign.tutsplus.com/recreate-material-design-floating-label--cms-37326t
-----------------------------------------------------------
https://www.appsloveworld.com/reactjs/200/214/how-can-i-decrease-input-height-with-floating-labels ==> 58px to 42px                                             
*/

/* ORG
.form-floating>.form-control, .form-floating>.form-control-plaintext, .form-floating>.form-select {
    height: calc(3.5rem + calc(var(--bs-border-width) * 2));
    min-height: calc(3.5rem + calc(var(--bs-border-width) * 2)); 
    line-height: 1.25;
*/

.form-floating>.form-control, .form-floating>.form-control-plaintext, .form-floating>.form-select {
   height: calc(2.7rem + calc(var(--bs-border-width) * 2));
   min-height: calc(2.9rem + calc(var(--bs-border-width) * 2)); 
   line-height: 1;
   padding: 3px 1px 2px 5px ; 
}

.form-floating>label {
  top  : 4px ; 
  left : 8px ; 
  padding: 1px ; 
  padding: 0.1rem 0.1rem;
}

.form-floating>.form-control-plaintext:focus, .form-floating>.form-control-plaintext:not(:placeholder-shown), .form-floating>.form-control:focus, .form-floating>.form-control:not(:placeholder-shown) {
   padding-top: 1rem;
   padding-bottom: 0.3rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-control-plaintext ~ label,
.form-floating > .form-select ~ label {
  opacity: 0.65;
  transform: scale(0.85) translate(-4%, -20%);
}

.form-floating>.form-control-plaintext~label::after, .form-floating>.form-control:focus~label::after, .form-floating>.form-control:not(:placeholder-shown)~label::after, .form-floating>.form-select~label::after {
    position: absolute;
    inset: 1rem 0.375rem;
    z-index: -1;
    height: 0em ;         /* <== 편법 */
	content: "";
    background-color: var(--bs-body-bg);
    border-radius: var(--bs-border-radius);
}


/*
https://bbbootstrap.com/snippets/floating-label-input-custom-design-36128852 : border선위에 label 
input-group{
    position: relative;
}

.input{
    padding: 1px 6px;
    height: 44px;
    border: none;
    border-radius: 4px;
    font: inherit;
    color: #fff;
    background-color: transparent;
    outline: 2px solid #fff;
}

.input-label{
    position: absolute;
    color: #fff;
    top:4px;
    left: 0;
    transform: translate(10px,10px);
    transition: transform .25s;
}

.input:focus+.input-label,.input:valid+.input-label{
    transform: translate(2px,-14px) scale(.8);
    color: #fff;
    padding-inline: 5px;
    background-color:red;
    border-right: 4px;
    border:3px solid #fff;
    border-top: none;
    border-bottom: none;
}

.input:is(:valid,:focus){
    outline-color: #d1c5fc;
}
*/


/*-----------------------------------------------------------*/
/* form-control-focus                                        */
/*-----------------------------------------------------------*/
.form-control:focus {
  outline    : none !important  ;
  box-shadow : none !important  ;

/*border-color: #ff90aa       ; 
  box-shadow: 1px 1px         ; 
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset, 0px 0px 0px rgba(255, 100, 255, 0.5) ; 
*/
}

/*--------------------------------------------------------------------*/
/* table
/*--------------------------------------------------------------------*/
/* bootstrap condensed 테이블의 row-margin 을 4로 줄인다 (default=5px)  */
 .table-sm>thead>tr>th, .table-sm>tbody>tr>th, .table-sm>tfoot>tr>th, 
 .table-sm>thead>tr>td, .table-sm>tbody>tr>td, .table-sm>tfoot>tr>td 
 { padding: 4px; }


/*--------------------------------------------------------------------*/
/* offcanvas
/*--------------------------------------------------------------------*/
/*
<div class="offcanvas offcanvas-top show">
  <div class="offcanvas-header bg-danger">
    <h5 id="offcanvas-lb-2">Offcanvas TOP</h5>
    <button type="button" class="btn-close text-reset" data-bs-dismiss="offcanvas" aria-label="Close"></button>
  </div>
  <div class="offcanvas-body">
*/


/*--------------------------------------------------------------------*/
/* floating-label                                                       
/*--------------------------------------------------------------------*/
/*
.form-floating>.form-control, .form-floating>.form-select {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
}
*/

/*
.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label,
.form-floating>.form-select~label {
  opacity: 1 ;
  transform: scale(.8) translateY(-2rem) translateX(.18rem);   
  background: white ;
}
*/

/* set translateY(-.5rem) to -2rem or -20px or whatever fit's your layout. You can also set background: white; */


.son-btn-tiny{                    /*  의도대로, 제대로, 작동안한다 */
  --bs-btn-padding-x: 6 ; 
  --bs-btn-padding-y: 6 ; 
  --bs-btn-font-weight: 600;
}

.son-d-menu { z-index: 100000000 ; }

/*--------------------------------------------------------------------
 tab : no-border, just underline 
 http://frontendfreecode.com/bootstrap-tabs-with-underline-effect
 https://stackoverflow.com/questions/42319309/remove-some-borders-from-bootstrap-son-nav-tabs
-------------------------------------------------------------------- */
.son-nav-tabs {
   border: none;
}

.son-nav-tabs li {
  margin: 1px 3px;   
  padding: 2px; 
}

/* html 에서 a 에 class="border-0" 를 넣어야 한다, 안넣으면 hovering시 tab 모양이 나타난다 */
.son-nav-tabs li a{
  padding: 2px 4px;; 
}

.son-nav-tabs .nav-link:hover {
  color: #1d627c;
  background: #fff;
  border-bottom: solid black 3px !important; 
}

.son-nav-tabs .nav-link.active {
  background: #fff;
  border-bottom: solid red 3px !important;
}

/*--------------------------------------------------------------------
 checkbox & radio-box 
 버튼 사이즈가 너무 작다 , 그래서 size 를 키운다 
-------------------------------------------------------------------- */
.form-check {
    display: flex;
    align-items: center;
}

.form-check label {
    margin-left: 3px  ;
    font-size  : 1rem ;
    font-weight: 500  ;
}

.form-check .form-check-input[type=checkbox] {
    border-radius: .25em;
    border: 2px solid  black ; /* #bbbbbb; */
    height: 16px;
    width : 16px;
}

.form-check .form-check-input[type=radio] {
    border-radius: 100%;
    border: 2px solid  black ; /* #bbbbbb; */
    height: 16px;
    width : 16px;
}

/* appearance for checked radiobutton */
input[type="radio"]:checked {
 /* background-color: #93e026; */
}


/*
.form-switch .form-check-input[type=checkbox] {
    border-radius: 2em;
    height: 22px;
    width: 45px;
}

input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-block;
  width: 25px;
  height: 25px;
  padding: 6px;
  background-clip: content-box;
  background-color: #e7e6e7;
  border-radius: 50%;
}
*/

