/*
 * Header mini-cart (resources/views/frontend/layouts/tudor/partials/card-noti.blade.php)
 * for the main (Rolex) and UTP headers.
 *
 * The partial's markup is the Tudor header's, and only the Tudor stylesheets
 * style it; the main site's style.css and UTP's header.css each style an
 * older, different copy of this dropdown, so on those pages the shared
 * partial came out broken (stacked totals, missing photo, "REMOVE" text,
 * empty gap). This file reproduces the Tudor look for those two layouts.
 * !important is deliberate: it has to win over both themes' own, more
 * specific mini-cart rules. Show/hide and positioning of the dropdown are
 * left to each theme.
 */

.card-noti-wrapper {
    width: 370px !important;
    max-width: calc(100vw - 20px) !important;
    padding: 25px !important;
    background: #fff !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, .1) !important;
    border: 0 !important;
    box-sizing: border-box !important;
    color: #000 !important;
    font-family: "PT Sans", sans-serif !important;
    font-size: 14px !important;
    line-height: 21px !important;
    text-align: left !important;
}

.card-noti-wrapper *,
.card-noti-wrapper *::before,
.card-noti-wrapper *::after {
    box-sizing: border-box;
}

.card-noti-wrapper .no-cart {
    color: #000 !important;
    text-align: center !important;
}

/* "1 item" | "Net amount in shopping cart : HKD 1.00" */
.card-noti-wrapper .c-counttotal-wrapper {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.card-noti-wrapper .items-total,
.card-noti-wrapper .subtotal .label {
    color: #000 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    margin: 0 !important;
}

.card-noti-wrapper .items-total .count {
    font-weight: 700 !important;
}

.card-noti-wrapper .subtotal {
    text-align: right !important;
    margin: 0 !important;
}

.card-noti-wrapper .subtotal .label {
    display: inline !important;
}

.card-noti-wrapper .subtotal .amount,
.card-noti-wrapper .subtotal .price-wrapper {
    display: block !important;
}

.card-noti-wrapper .subtotal .price {
    color: #000 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 27px !important;
}

/* PROCEED TO CHECKOUT */
.card-noti-wrapper .c_checkout_actions {
    margin: 15px 0 !important;
}

.card-noti-wrapper .c_checkout_actions .primary {
    margin: 0 !important;
}

.card-noti-wrapper .c_checkout_actions button {
    display: block !important;
    width: 100% !important;
    height: 50px !important;
    padding: 7px 20px !important;
    border: 0 !important;
    border-radius: 2px !important;
    background: #e2ad65 !important;
    color: #000 !important;
    font-family: "PT Sans", sans-serif !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 21px !important;
    letter-spacing: 0 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    cursor: pointer;
}

.card-noti-wrapper .c_checkout_actions button:hover {
    opacity: .9;
}

/* Item list, between the two dividers */
.card-noti-wrapper .minicart-items-wrapper {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 315px !important;
    overflow-y: auto !important;
    resize: none !important;
    margin: 0 -23px !important;
    padding: 15px !important;
    border-top: 1px solid #ccc !important;
    border-bottom: 1px solid #ccc !important;
}

.card-noti-wrapper .minicart-items {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.card-noti-wrapper .minicart-items > li {
    display: block !important;
    margin: 0 !important;
    padding: 0 0 16px !important;
    border: 0 !important;
}

.card-noti-wrapper .minicart-items > li:last-child {
    padding-bottom: 0 !important;
}

.card-noti-wrapper .minicart-items .product {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.card-noti-wrapper .product-item-photo {
    display: block !important;
    flex: 0 0 100px !important;
    width: 100px !important;
    float: none !important;
}

.card-noti-wrapper .product-image-container {
    display: block !important;
    width: 100px !important;
}

.card-noti-wrapper .product-image-wrapper {
    display: block !important;
    position: relative !important;
    height: auto !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
}

.card-noti-wrapper .product-image-photo {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 !important;
}

.card-noti-wrapper .product-item-details {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.card-noti-wrapper .product-item-name {
    display: block !important;
    margin: 0 0 6px !important;
    font-weight: 400 !important;
}

.card-noti-wrapper .product-item-name a {
    color: #b59c65 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 21px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
}

.card-noti-wrapper .product-item-pricing,
.card-noti-wrapper .price-container {
    margin: 0 !important;
}

.card-noti-wrapper .minicart-price .price,
.card-noti-wrapper .price-container .price {
    color: #000 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

/* quantity [1]            [trash] */
.card-noti-wrapper .c_qty_action_wrapper {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 8px 0 0 !important;
}

.card-noti-wrapper .details-qty {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 0 !important;
}

.card-noti-wrapper .details-qty .label {
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
    color: #000 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    white-space: nowrap !important;
    text-transform: none !important;
}

.card-noti-wrapper .details-qty .label::after {
    content: " :" !important;
    display: inline !important;
    position: static !important;
    font-size: inherit !important;
    color: inherit !important;
    visibility: visible !important;
    margin: 0 !important;
}

.card-noti-wrapper .details-qty input {
    display: inline-block !important;
    width: 45px !important;
    height: 36px !important;
    padding: 0 9px !important;
    margin: 0 !important;
    border: 1px solid #eee !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #666 !important;
    font-size: 14px !important;
    text-align: center !important;
    -moz-appearance: textfield;
}

.card-noti-wrapper .details-qty input::-webkit-outer-spin-button,
.card-noti-wrapper .details-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.card-noti-wrapper .product.actions {
    margin: 0 !important;
    float: none !important;
}

/* Trash icon; the Tudor theme draws it with an icon font that the other
   themes don't load, so it's an inline SVG here. */
.card-noti-wrapper .action.delete {
    display: inline-block !important;
    width: 28px !important;
    height: 28px !important;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23303030' viewBox='0 0 16 16'%3E%3Cpath d='M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z'/%3E%3Cpath d='M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z'/%3E%3C/svg%3E") center / 16px 16px no-repeat !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-decoration: none !important;
    vertical-align: middle;
}

.card-noti-wrapper .action.delete::before,
.card-noti-wrapper .action.delete::after {
    content: none !important;
    display: none !important;
}

.card-noti-wrapper .action.delete > span {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    padding: 0 !important;
}

/* VIEW OR MODIFY SHOPPING CART */
.card-noti-wrapper .c_footer_actions {
    margin: 15px 0 0 !important;
}

.card-noti-wrapper .c_footer_actions .secondary {
    margin: 0 !important;
    float: none !important;
}

.card-noti-wrapper .c_footer_actions .viewcart {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 40px !important;
    padding: 4px 10px !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: #ddd !important;
    color: #111 !important;
    font-family: "PT Sans", sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
}

/* UTP colours everything inside a menu link gold (.rolexmainmenu .ui-menu-item a *) */
.card-noti-wrapper .c_footer_actions .viewcart span,
.card-noti-wrapper .c_checkout_actions button span {
    color: inherit !important;
    font-weight: inherit !important;
}

.card-noti-wrapper .c_footer_actions .viewcart:hover {
    background: #ccc !important;
}

/* Mobile/tablet: the fixed 370px above (and its !important) beat the
   themes' own "fit the container" rule, so inside UTP's slide-out menu --
   narrower than 370px on a phone -- the dropdown hung off the left edge,
   cutting off the item count and product photos. Same sizing as the Tudor
   header's @media (max-width: 1278px) rule. */
@media (max-width: 1278px) {
    .cart-icon-wrapper + .card-noti-wrapper {
        width: calc(100% - 40px) !important;
        max-width: none !important;
    }

    /* UTP keeps the cart icon inside the slide-out menu itself, which is
       already narrow -- use its full width and less inner padding there so
       the photo, name/price and delete icon still fit on one row. */
    .mobile-login-wrapper .cart-icon-wrapper + .card-noti-wrapper {
        width: 100% !important;
        margin-inline: 0 !important;
        padding: 20px 15px !important;
    }
}

/* Sale price: the Rolex stylesheet has no .old-price rule, so the old
   amount showed as a plain second price. Strike through the amount only
   (same as the Tudor theme / tudor/css/custom.css). */
.card-noti-wrapper .old-price .price {
    text-decoration: line-through !important;
}

/* Smallest phones: the 100px photo left too little room for the
   name/price/qty column and pushed the delete icon off the edge. */
@media (max-width: 374px) {
    .card-noti-wrapper .product-item-photo,
    .card-noti-wrapper .product-image-container {
        flex-basis: 70px !important;
        width: 70px !important;
    }
}

/* Opened by a click on the cart icon (public/frontend/js/mini-cart.js)
   rather than hover -- touch screens have no hover. */
.cart-icon-wrapper + .card-noti-wrapper.c-open {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 50 !important;
}
