/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
    /*flex:1;*/
    text-align:left;
}
#shopcardiv{
    flex-grow:1;
}
/* Provide sufficient contrast against white background */
/* Sticky footer styles
-------------------------------------------------- */
html {
    font-size: 100%; /* 通常為 16px */
}
/*
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}
*/

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .2);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
}


body {
    /* Margin bottom by footer height */
    margin-bottom: 60px;
    padding-top: 4rem;
    /*font-size: 1.2rem;*/ /* 相當於 16px * 1.2 = 19.2px */
    font-size: clamp(1rem, 1.2vw, 1.5rem);
}

body.bg-theme-bg {
    transform: rotate(270deg);
}

span.text-theme-product-ansi-red {
    transform: rotate(90deg);
}

footer {
    background-color: rgba(255,255,255,0.8);
}

main > h1 {
    color: #008ebf;
}

.sticky-top {
    top: 4rem;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px; /* Vertically center the text there */
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

a {
    color: #007bff;
    text-decoration: none;
    background-color: transparent;
}

.gotop a {
    position: fixed;
    right: 10px;
    bottom: 50px;
    font-size: 2rem;
}

    .gotop a:focus {
        box-shadow: none;
    }

.gotop div {
    position: fixed;
    right: 10px;
    bottom: 85px;
    background: rgba(0, 192, 239, 0.14);
    border-radius: 99em;
    display: block;
    padding: 10px;
    font-size: 24px;
}

.badge {
    padding-left: 9px;
    padding-right: 9px;
    -webkit-border-radius: 9px;
    -moz-border-radius: 9px;
    border-radius: 30px;
}

.label-warning[href],
.badge-warning[href] {
    background-color: #c67605;
}

.lblCartCount {
    font-size: 11px;
    background: #ff0000;
    color: #fff;
    padding: 1px 4px;
    border-radius: 50%;
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
    z-index: 10;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* 新的購物車數量徽章樣式 - 不使用相對定位 */
.lblCartCount2 {
    font-size: 12px;
    background: #ff0000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
    margin-left: 4px;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    vertical-align: middle;
}

.navbar {
    background-color: #40beea;
}
body.role-a .navbar {
    background-color: #1BAFA0;
}
body.role-b .navbar {
    background-color: #e07062;
}
body.role-c .navbar {
    background-color: #a17bdf;
}
body.role-d .navbar {
    background-color: #5c93cc;
}
body.role-e .navbar {
    background-color: #67b767;
}

.navbar-brand {
    padding-left: 2.4rem;
    /*background-image: url(../images/favicons/android-chrome-192x192.png);*/
    background-image: url(../images/UULOGO.svg);
    background-size: 2rem;
    background-repeat: no-repeat;
    background-position: left center;
}

.navbar-dark .navbar-nav .nav-link {
    color: #FFF;
}

.list-group-item > .nav-link {
    padding: 0;
}

#pd_class .btn {
    padding: .375rem;
}

.prod-filter .col-12 {
    padding: 0 4px;
}

/* 統一圖示樣式 - 所有螢幕尺寸 */
.navbar .d-flex .material-icons {
    font-size: 28px;
}

.navbar .d-flex .nav-link {
    padding: 0.25rem;
}

@media screen and (max-width:768px) {
    body.order input[type=number] {
        max-width: 5rem;
    }
}

.navbar,
.card-header {
    background-image: url('../images/svg/bg2.svg');
    background-position: right 20%;
    background-size: 100px;
    background-repeat: no-repeat;
}

.navbar-toggler {
    background-color: rgba(34, 163, 208, 0.9);
}

.card-header h5 i {
    margin-right: 5px;
}

.card-header .btn-toggle {
    width: 2rem;
    height: 2rem;
}

    .card-header .btn-toggle .fa {
        transition: .3s transform ease-in-out;
    }

.card-header.on .btn-toggle .fa {
    transform: rotate(90deg);
}

i.material-icons {
    font-size: inherit;
}

body.home {
    background-color: #FFD274;
    background-image: url('../images/svg/yoyo-bg-2.svg'),url('../images/svg/yoyo-bg-1.svg');
    background-position: center top, center 30px;
    background-size: 400px;
    /*background-position: center bottom 100px, center 100px;*/
    background-repeat: no-repeat;
}

    body.home::before {
        content: " ";
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background-image: url('../images/svg/bg1.svg');
        background-size: 1440px;
        z-index: -1;
    }

@media screen and (min-width:768px) {
    body.home {
        background-size: contain;
        background-position: center bottom 100px, center 30px;
    }
}

@media screen and (min-width:1200px) {
    body.home {
        background-size: auto;
    }
}

body.home main {
    margin-top: 5rem;
}

@media screen and (min-width:768px) {
    body.home main {
        margin-top: 4rem;
    }
}

/* 样式表中的样式规则 */
input[type="number"] {
    text-align: right; /* 将文本对齐方式设为右对齐 */
}

.no-padding {
    padding: 0 !important;
}

.no-margin {
    margin: 0 !important;
}

.no-border {
    border: 0 !important;
}

.list-group-item {
    padding: .70rem 1rem;
    /*font-size: 20px;*/
}


/* 原生合約彈窗樣式 - 統一版本 */
.native-contract-modal .contract-content {
    max-height: 300px !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(0, 0, 0, 0.6) rgba(0, 0, 0, 0.1) !important;
    /* 強制顯示捲軸 */
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
}

/* 原生彈窗捲軸樣式 */
.native-contract-modal .contract-content::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 12px;
    background-color: transparent;
}

.native-contract-modal .contract-content::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    margin: 2px;
}

.native-contract-modal .contract-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    min-height: 40px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.native-contract-modal .contract-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 手機模式下的原生彈窗調整 */
@media screen and (max-width: 767px) {
    .native-contract-modal {
        padding: 10px !important;
    }
    
    .native-contract-modal .modal-content {
        max-height: 95vh !important;
    }
    
    .native-contract-modal .contract-content {
        max-height: 250px !important;
        font-size: 0.9rem !important;
        padding: 8px !important;
    }
    
    .native-contract-modal .modal-header h4 {
        font-size: 16px !important;
    }
    
    .native-contract-modal .modal-header {
        padding: 15px 15px 8px 15px !important;
    }
    
    .native-contract-modal .modal-footer {
        padding: 10px 15px 15px 15px !important;
    }
}

/* 平板模式調整 */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .native-contract-modal .contract-content {
        max-height: 350px !important;
    }
}

/* 桌面模式調整 */
@media screen and (min-width: 992px) {
    .native-contract-modal .contract-content {
        max-height: 400px !important;
    }
    
    .native-contract-modal .modal-content {
        max-width: 600px !important;
    }
}

/* === 共用表單樣式 === */

/* 驗證錯誤樣式 - 通用 */
.is-invalid {
    border-color: #dc3545 !important;
}

.is-invalid.qty {
    background-color: #fff5f5;
}

/* 唯讀欄位樣式 - 通用 */
.readonly-field {
    background-color: #e9ecef !important;
    cursor: not-allowed;
    color: #6c757d;
}

/* 數量輸入框樣式 - 通用 */
.qty {
    font-weight: bold;
    font-size: 1.1em;
    padding: 0.5rem 0.75rem;
}

/* 可編輯欄位強調 - 通用 */
.qty:not(.readonly-field):not([readonly]) {
    background-color: #fff;
    border: 2px solid #0d6efd;
}

.qty:not(.readonly-field):not([readonly]):focus {
    border-color: #0a58ca;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 警告訊息動畫 - 通用 */
.alert {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 產品篩選器隱藏/顯示動畫 */
.prod-filter {
    transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease;
    overflow: hidden;
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
}

/* 輸入框焦點時隱藏篩選器（支援舊的 prod-filter 和新的 filter-sticky-bar）*/
.prod-filter.filter-hidden,
.filter-sticky-bar.filter-hidden {
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}