/**
 * Multi Accessories Pro - Mobile Sticky Checkout Bar Stylesheet
 * Scoped to #hsma_mobile_sticky_bar and .hsma_sticky_bar
 */

:root {
    --hsma-sticky-bottom-offset: 0px;
    --hsma-sticky-bg: #ffffff;
    --hsma-sticky-border: #e1e6eb;
    --hsma-sticky-shadow: 0 -3px 12px rgba(0, 0, 0, 0.1);
}

#hsma_mobile_sticky_bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--hsma-sticky-bottom-offset, 0px);
    width: 100%;
    z-index: 999;
    background: var(--hsma-sticky-bg);
    border-top: 1px solid var(--hsma-sticky-border);
    box-shadow: var(--hsma-sticky-shadow);
    box-sizing: border-box;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

#hsma_mobile_sticky_bar.is_visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 768px) {
    #hsma_mobile_sticky_bar {
        display: none !important;
    }
}

.hsma_sticky_container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    max-width: 768px;
    margin: 0 auto;
    box-sizing: border-box;
    min-height: 56px;
}

/* Summary & Dynamic Price */
.hsma_sticky_summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    flex: 1 1 auto;
}

.hsma_selected_count_label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hsma_sticky_prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.hsma_sticky_total_price {
    font-size: 16px;
    font-weight: 700;
    color: #232323;
    line-height: 1.2;
}

.hsma_sticky_old_price {
    font-size: 12px;
    text-decoration: line-through;
    color: #8c8c8c;
    line-height: 1.2;
}

.hsma_sticky_savings_badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, #f03e3e 0%, #d32f2f 100%);
    color: #ffffff !important;
    padding: 2px 7px 2px 5px;
    border-radius: 3px;
    line-height: 1.2;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 3px rgba(211, 47, 47, 0.3);
    white-space: nowrap;
}

.hsma_sticky_savings_badge::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 7z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* 1-Click Action CTA */
.hsma_sticky_action {
    flex-shrink: 0;
}

#hsma_btn_buy_combo {
    min-height: 44px;
    min-width: 120px;
    font-weight: 700;
    font-size: 14px;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border: none;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

#hsma_btn_buy_combo:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Visually Hidden Helper for Screen Readers */
.hsma_visually_hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    #hsma_mobile_sticky_bar {
        transition: none !important;
    }
}

/* RTL Support */
[dir="rtl"] #hsma_mobile_sticky_bar {
    text-align: right;
}
