﻿* {
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

html {
    font-size: 14px !important;
}

@media (max-width: 768px) {
    html {
        font-size: 13px !important;
    }
}

.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;*/
    font-family: 'Noto Serif' !important;
}

iframe {
    border: none;
    display: block;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    /*overflow: hidden;*/ /* hoặc auto nếu bạn cần cuộn nội dung bên trong main */
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ẩn hai nút tăng/giảm của thẻ input trên trình duyệt chrome, safari, edge */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* footer*/
.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius:5px;
    z-index: 99;
    border: 1px solid;
    border-radius: 5px;
    padding: 2px;
    height: 6vh;
}

/* Tooltip base */
.custom-tooltip {
    position: relative;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 125%; /* ⬅️ Đổi từ bottom sang top để xuống dưới */
    left: 50%;
    transform: translateX(-50%);
    background-color: inherit; /* mặc định đen, có thể sửa */
    color: #fff;
    padding: 3px 4px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-in-out;
    font-size: 12px;
    z-index: 9999;
}

/* Tooltip arrow */
.custom-tooltip::before {
    content: "";
    position: absolute;
    top: 120%; /* ⬅️ Đổi từ bottom sang top để xuống dưới */
    left: 50%;
    transform: translateX(-50%);
    border-width: 2px;
    border-style: solid;
    border-color: #000 transparent transparent transparent; /* mũi tên hướng lên */
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
}

/* Hover show tooltip */
.custom-tooltip:hover::after,
.custom-tooltip:hover::before {
    opacity: 1;
}

/* Hiệu ứng hover thêm viền và bóng */
.custom-tooltip:hover {
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px); /* tạo hiệu ứng mờ nền */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    pointer-events: all;
}

/* Box loading đẹp */
.loading-box {
    background: rgba(255, 255, 255);
    border-radius: 20px;
    padding: 40px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Spinner to + màu đẹp */
.loading-spinner {
    border-width: 6px;
    font-size:100px;
    width:100px !important;
    height:100px !important;
    color: #00d4ff; /* xanh neon */
}

/* Text loading */
.loading-text {
    margin-top: 15px;
    font-size: 1.3rem;
}

/* Khi loading thì không scroll */
body.loading-no-scroll {
    overflow: hidden;
}