﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none !important;
    box-shadow: none !important;
}

.setting-icon.rotate {
    transition: transform 0.3s ease;
    transform: rotate(90deg);
}

.setting-icon {
    transition: transform 0.3s ease;
}

.nav-tabs .nav-link {
    color: #9d9d9d;
}

.nav-tabs .nav-link.active {
    color: #00b0ae !important;
    font-weight: bold;
}

.top-75 {
    top: 75% !important;
}



.loader {
    width: 40px;
    height: 20px;
    --c: no-repeat radial-gradient(farthest-side,#00b0ae 93%,#0000);
    background: var(--c) 0 0, var(--c) 50% 0;
    background-size: 8px 8px;
    position: relative;
    clip-path: inset(-200% -100% 0 0);
    animation: l6-0 1.5s linear infinite;
}

    .loader:before {
        content: "";
        position: absolute;
        width: 8px;
        height: 12px;
        background: #00b0ae;
        left: -16px;
        top: 0;
        animation: l6-1 1.5s linear infinite, l6-2 0.5s cubic-bezier(0,200,.8,200) infinite;
    }

    .loader:after {
        content: "";
        position: absolute;
        inset: 0 0 auto auto;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #00b0ae;
        animation: l6-3 1.5s linear infinite;
    }


@keyframes l6-0 {
    0%,30% {
        background-position: 0 0,50% 0
    }

    33% {
        background-position: 0 100%,50% 0
    }

    41%,63% {
        background-position: 0 0,50% 0
    }

    66% {
        background-position: 0 0,50% 100%
    }

    74%,100% {
        background-position: 0 0,50% 0
    }
}

@keyframes l6-1 {
    90% {
        transform: translateY(0)
    }

    95% {
        transform: translateY(15px)
    }

    100% {
        transform: translateY(15px);
        left: calc(100% - 8px)
    }
}

@keyframes l6-2 {
    100% {
        top: -0.1px
    }
}

@keyframes l6-3 {
    0%,80%,100% {
        transform: translate(0)
    }

    90% {
        transform: translate(26px)
    }
}



/*===========gradient-text================ */

.gradient-text {
    background: linear-gradient( to right, #0078C9 10%, #00b0ae 40%, #ff0000 100% );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

/*====================bell-icon =========================== */
.bell-icon {
    color: #00b0ae;
    cursor: pointer;
    position: relative;
}

.badge-notification {
    position: absolute;
    top: -5px;
    left: -2px;
    background-color: red;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    height: 20px;
    min-width: 20px;
    padding: 0 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 0 2px white;
    cursor: pointer;
}

.bell-shake {
    animation: bellShake 5s ease-in-out; /* 5 giây */
}

@keyframes bellShake {
    0% {
        transform: rotate(0);
    }

    5% {
        transform: rotate(-20deg);
    }

    10% {
        transform: rotate(20deg);
    }

    15% {
        transform: rotate(-15deg);
    }

    20% {
        transform: rotate(15deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    30% {
        transform: rotate(10deg);
    }

    35% {
        transform: rotate(-5deg);
    }

    40% {
        transform: rotate(5deg);
    }

    45% {
        transform: rotate(0);
    }

    50% {
        transform: rotate(-20deg);
    }

    55% {
        transform: rotate(20deg);
    }

    60% {
        transform: rotate(-15deg);
    }

    65% {
        transform: rotate(15deg);
    }

    70% {
        transform: rotate(-10deg);
    }

    75% {
        transform: rotate(10deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    85% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0);
    }
}


.badge-blink {
    animation: badgeBlink 1s ease-in-out 3;
}

@keyframes badgeBlink {
    0%, 100% {
        background-color: red;
    }

    50% {
        background-color: orange;
    }
}


/*==============custom summary deviceType ==================*/

.device-type-card {
    min-width: 120px;
    background: linear-gradient(135deg, #e6f9f9, #f8fdfd);
    border: 1px solid #cceaea;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    text-align: center;
}

    .device-type-card:hover {
        background: linear-gradient(135deg, #d6f2f2, #eefafa);
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

.type-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 3px;
}

.type-count {
    font-weight: 500;
    font-size: 14px;
    color: #1f7d7c;
}

.modal-body {
    border-top: none !important;
    border-bottom: none !important;
}

.card-body {
    border-top: none !important;
    border-bottom: none !important;
}

table thead th {
    border-bottom: none !important;
}

/*===========================*/
.select2-container--default .select2-selection--single {
    height: 38px !important;
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        color: #6c757d;
        line-height: 26px;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 36px;
        right: 10px;
    }
/* Căn giữa dọc mũi tên trong Select2 */
.select2-selection__arrow {
    position: absolute;
    top: 100%;
    right: 10px; /* điều chỉnh khoảng cách mép phải */
    transform: translateY(20%);
    pointer-events: none; /* để click không bị cản */
}

/* Đảm bảo vùng select đủ cao và căn giữa text */
.select2-selection--single {
    height: 38px !important; /* hoặc chiều cao bạn đang dùng cho form-select */
    display: flex !important;
    align-items: center !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
}


/* Căn chỉnh icon X trong tag Select2 */
.select2-selection__choice__remove {
    position: absolute !important;
    left: 0px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    line-height: 1; /* ✅ đảm bảo căn giữa theo chiều dọc */
    margin-right: 10px;
}

.select2-selection__choice {
    display: flex !important; /* ✅ căn chỉnh nội dung trong tag */
    align-items: center !important; /* ✅ icon và text cùng hàng */
    background-color: #00b0ae !important;
    color: #fff !important;
    border: none !important;
    font-weight: 500;
    border-radius: 6px !important;
    padding: 2px 8px 2px 22px !important;
    margin-top: 3px; /* giúp các tag không chạm nhau */

}

    .select2-selection__choice:hover {
        background-color: #009b99 !important;
    }
    .select2-selection__clear{
        margin-left: 5px;
    }
.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    cursor: default;
    padding-left: 10px;
    padding-right: 5px;
}

#deviceTypeSelect + .select2-container {
    width: 410px !important;
}
@media (max-width: 768px) {
    #deviceTypeSelect + .select2-container {
        width: 80% !important; /* tự co theo màn hình */
        max-width: 80% !important;
    }
}
@media (max-width: 480px) {
    #deviceTypeSelect + .select2-container {
        width: 90% !important;
        font-size: 14px; /* thu nhỏ chữ cho gọn */
    }
}
