/* GoodDiscount Frontend v2.4.2 */

/* ============================================================
 * 迷你購物車折扣提示
 * ============================================================ */
.gd-mini-cart-notice{
    padding:8px 12px;
    margin:8px 0 0;
    border-radius:6px;
    font-size:13px;
    line-height:1.5;
    text-align:center;
}

.gd-mini-discount-active{
    color:#46B450;
    font-weight:600;
    padding:4px 0;
}

.gd-mini-discount-hint{
    color:#F4A100;
    font-weight:500;
    padding:6px 10px;
    background:#FFF8EC;
    border-radius:4px;
    margin-top:4px;
}

.gd-mini-discount-exclude{
    font-size:12px;
    margin-top:4px;
    padding:2px 0;
}

.gd-mini-discount-exclude a{
    color:#999;
    text-decoration:none;
}

.gd-mini-discount-exclude a:hover{
    color:#666;
    text-decoration:underline;
}

/* ============================================================
 * 贈品 badge（cart item）
 * ============================================================ */
.gd-gift-badge{
    display:inline-block;
    margin-left:6px;
    padding:2px 8px;
    background:#E8F5E9;
    color:#2E7D32;
    border-radius:3px;
    font-size:12px;
    font-weight:600;
    line-height:1.4;
}

/* ============================================================
 * 紅利折抵 - Checkout only (v2.4.2)
 * Navy (#1E3A5F) primary, div-based, theme-agnostic
 * ============================================================ */
.gd-rw-box{
    margin:16px 0;
    padding:16px 18px;
    background:#F7F9FC;
    border:1px solid #E1E7F0;
    border-left:4px solid #1E3A5F;
    border-radius:6px;
    box-sizing:border-box;
}

.gd-rw-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:8px;
    margin-bottom:12px;
}

.gd-rw-title{
    font-size:15px;
    font-weight:700;
    color:#1E3A5F;
    line-height:1.4;
}

.gd-rw-badge{
    font-size:12px;
    color:#5A6B82;
    line-height:1.4;
}

.gd-rw-badge strong{
    color:#1E3A5F;
    font-weight:700;
}

.gd-rw-balance{
    font-size:13px;
    color:#5A6B82;
    margin-bottom:8px;
}

.gd-rw-balance strong{
    color:#1E3A5F;
    font-weight:700;
    font-size:15px;
}

.gd-rw-row{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:8px;
}

.gd-rw-input{
    flex:0 0 120px;
    width:120px !important;
    height:36px;
    padding:6px 10px !important;
    text-align:center;
    font-size:14px !important;
    font-weight:600;
    border:1px solid #C5D0E0 !important;
    border-radius:4px !important;
    background:#fff;
    color:#1E3A5F;
    box-shadow:none !important;
    /* hide spinner */
    -moz-appearance:textfield;
    appearance:textfield;
}
.gd-rw-input::-webkit-outer-spin-button,
.gd-rw-input::-webkit-inner-spin-button{
    -webkit-appearance:none;
    margin:0;
}
.gd-rw-input:focus{
    outline:none;
    border-color:#1E3A5F !important;
    box-shadow:0 0 0 2px rgba(30,58,95,0.15) !important;
}

.gd-rw-btn-apply,
.gd-rw-btn-clear{
    height:36px;
    padding:0 14px !important;
    font-size:13px !important;
    font-weight:600;
    border-radius:4px !important;
    cursor:pointer;
    line-height:34px !important;
    box-sizing:border-box;
}

.gd-rw-btn-apply{
    background:#1E3A5F !important;
    color:#fff !important;
    border:1px solid #1E3A5F !important;
}
.gd-rw-btn-apply:hover{
    background:#2A4A75 !important;
    border-color:#2A4A75 !important;
}

.gd-rw-btn-clear{
    background:#fff !important;
    color:#5A6B82 !important;
    border:1px solid #C5D0E0 !important;
}
.gd-rw-btn-clear:hover{
    background:#F0F4FA !important;
    color:#1E3A5F !important;
}

.gd-rw-hint{
    font-size:12px;
    color:#7A8AA0;
    line-height:1.5;
    margin-top:6px;
}

.gd-rw-msg{
    display:block;
    margin-top:6px;
    font-size:13px;
    font-weight:500;
    min-height:18px;
}

.gd-rw-empty{
    font-size:13px;
    color:#999;
    padding:4px 0;
}

/* Reward fee in cart totals — green to indicate discount */
.fee .amount[data-title*="紅利"]{
    color:#46B450;
    font-weight:600;
}

/* ============================================================
 * Mobile
 * ============================================================ */
@media (max-width:600px){
    .gd-rw-head{
        flex-direction:column;
        align-items:flex-start;
    }
    .gd-rw-row{
        gap:6px;
    }
    .gd-rw-input{
        flex:0 0 96px;
        width:96px !important;
    }
    .gd-rw-btn-apply,
    .gd-rw-btn-clear{
        padding:0 10px !important;
        font-size:12px !important;
    }
}
