/* dassoXTR slide-out cart drawer */

#dassoCartOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 100000;
}

#dassoCartOverlay.dcd-open {
    opacity: 1;
    visibility: visible;
}

#dassoCartDrawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 92vw;
    background: #fff;
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.25);
    transform: translateX(105%);
    transition: transform 0.28s ease;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    font-family: inherit;
}

#dassoCartDrawer.dcd-open {
    transform: translateX(0);
}

.dcd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f8f8;
}

.dcd-title {
    font-size: 17px;
    font-weight: bold;
    color: #333;
}

.dcd-title .dcd-check {
    color: #5cb85c;
    margin-right: 6px;
}

.dcd-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
}

.dcd-close:hover {
    color: #333;
}

.dcd-status {
    display: none;
    padding: 10px 18px;
    font-size: 13px;
    line-height: 1.45;
}

.dcd-status.dcd-status-info {
    display: block;
    background: #d9edf7;
    color: #31708f;
}

.dcd-status.dcd-status-warn {
    display: block;
    background: #fcf8e3;
    color: #8a6d3b;
}

.dcd-items {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 8px 18px;
}

.dcd-empty {
    color: #777;
    text-align: center;
    padding: 30px 0;
}

.dcd-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.dcd-item:last-child {
    border-bottom: none;
}

.dcd-item-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    margin-right: 12px;
    flex-shrink: 0;
    background: #fafafa;
}

.dcd-item-info {
    flex: 1 1 auto;
    min-width: 0;
}

.dcd-item-name {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin: 0 0 3px;
    line-height: 1.35;
}

.dcd-item-meta {
    font-size: 12px;
    color: #777;
}

.dcd-item-price {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    margin-left: 10px;
    white-space: nowrap;
}

.dcd-item-sample-badge {
    display: inline-block;
    background: #5cb85c;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}

.dcd-footer {
    border-top: 1px solid #e5e5e5;
    padding: 14px 18px 16px;
    background: #fafafa;
}

.dcd-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
}

.dcd-subtotal-value {
    font-weight: bold;
}

.dcd-checkout {
    display: block;
    width: 100%;
    text-align: center;
    background: #5cb85c;
    border: 1px solid #4cae4c;
    color: #fff !important;
    font-size: 15px;
    font-weight: bold;
    padding: 10px 12px;
    border-radius: 4px;
    text-decoration: none !important;
    margin-bottom: 8px;
}

.dcd-checkout:hover,
.dcd-checkout:focus {
    background: #449d44;
    color: #fff;
}

.dcd-viewcart {
    display: block;
    width: 100%;
    text-align: center;
    background: #fff;
    border: 1px solid #ccc;
    color: #333 !important;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none !important;
    margin-bottom: 10px;
}

.dcd-viewcart:hover,
.dcd-viewcart:focus {
    background: #f0f0f0;
    color: #333;
}

.dcd-continue {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #5cb85c !important;
    text-decoration: underline;
    cursor: pointer;
}

/* pulse highlight for the terms checkbox when arriving via ?checkout=1 */
.cart-terms-attention {
    animation: dcdTermsPulse 1.2s ease-in-out 3;
    outline: 2px solid #f0ad4e;
    outline-offset: 3px;
    border-radius: 3px;
}

@keyframes dcdTermsPulse {
    0%, 100% { outline-color: #f0ad4e; }
    50% { outline-color: transparent; }
}

@media (max-width: 480px) {
    #dassoCartDrawer {
        width: 100vw;
        max-width: 100vw;
    }
}
