.sm-cart-loyalty-message {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(212, 168, 75, 0.12), rgba(255, 215, 0, 0.08));
    border: 1px solid rgba(212, 168, 75, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.sm-cart-loyalty-title {
    font-size: 13px;
    font-weight: 600;
    color: #d4a84b;
    text-transform: uppercase;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sm-cart-loyalty-title .sm-cart-loyalty-icon {
    font-size: 16px;
}

.sm-cart-loyalty-content {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.sm-cart-loyalty-rewards {
    color: #d4a84b;
    font-size: 13px;
    margin: 0;
}

.sm-reward-item {
    font-size: 13px;
}

.sm-reward-plus {
    color: #888;
    margin: 0 3px;
    font-size: 12px;
}

.bg-rewards-level-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 0 0 20px 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.bg_cart_form .bg-rewards-level-row {
    width: calc(100%);
}

.bg-rewards-level-row > .sm-cart-loyalty-message {
    flex: 1;
    min-width: 280px;
    margin: 0;
    box-sizing: border-box;
}

.bg-rewards-level-row > .bg-level-discount-section {
    flex: 1;
    box-sizing: border-box;
    min-width: 280px;
    margin: 0;
}

/* Media query spostata in bg-smartphone.css */

.sm-cart-free-event-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.12), rgba(70, 130, 180, 0.08));
    border: 1px solid rgba(100, 149, 237, 0.35);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
}

.sm-free-event-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(100, 149, 237, 0.2);
    border-radius: 50%;
    color: #6495ED;
    flex-shrink: 0;
}

.sm-free-event-icon svg {
    width: 20px;
    height: 20px;
}

.sm-free-event-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sm-free-event-title {
    font-weight: 600;
    color: #6495ED;
    font-size: 14px;
}

.sm-free-event-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.bg-tokens-section {
    background: #1e1e1e;
    border: 1px solid #3a3a3a;
    border-left: 3px solid #e6a817;
    border-radius: 6px;
    padding: 18px 20px;
    margin: 0;
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.bg-tokens-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.bg-tokens-icon {
    font-size: 22px;
}

.bg-tokens-title {
    font-size: 18px;
    font-weight: 600;
    color: #e6a817;
    text-transform: uppercase;
}

.bg-tokens-available {
    background: transparent;
    color: #888;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    margin-bottom: 15px;
}

.bg-tokens-slider-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.bg-tokens-slider-wrapper {
    flex: 1;
    min-width: 200px;
}

.bg-tokens-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.bg-tokens-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e6a817;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    transition: transform 0.15s;
}

.bg-tokens-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.bg-tokens-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e6a817;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.bg-tokens-slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.bg-tokens-label-min {
    color: #666;
    font-size: 12px;
    min-width: 20px;
}

.bg-tokens-label-max {
    color: #666;
    font-size: 12px;
    min-width: 20px;
    text-align: right;
}

.bg-tokens-selected {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bg-tokens-count {
    font-size: 32px;
    font-weight: 700;
    color: #e6a817;
    line-height: 1;
}

.bg-tokens-label {
    font-size: 14px;
    color: #999;
    align-self: center;
}

.bg-tokens-discount-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.bg-tokens-discount-preview {
    background: #2d7a2d;
    color: white;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bg-tokens-discount-preview.active {
    opacity: 1;
}

.bg-tokens-discount-value {
    font-weight: 600;
}

/* Media queries spostate in bg-smartphone.css e bg-tablet.css */

.bg-tokens-inactive {
    opacity: 0.85;
}

.bg-tokens-message.no-tokens {
    font-size: 13px;
    color: #999;
    text-align: center;
    padding: 10px;
    font-style: italic;
    line-height: 1.4;
}

.bg-level-discount-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #333;
    text-align: center;
}

.bg-level-discount-box-title {
    font-size: 18px;
    font-weight: 600;
    color: #a8d8b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bg-level-discount-box-icon {
    font-size: 22px;
}

.bg-level-discount-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.bg-level-discount-icon {
    font-size: 24px;
}

.bg-level-discount-title {
    font-size: 18px;
    font-weight: bold;
    color: #c0a060;
}

.bg-level-discount-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.bg-level-discount-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.bg-level-discount-amount {
    font-size: 28px;
    font-weight: bold;
    color: #4ade80;
}

.bg-level-discount-label {
    font-size: 14px;
    color: #888;
}

.bg-level-discount-info {
    font-size: 13px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.bg-level-bar-bonus {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 165, 0, 0.1);
    border-radius: 6px;
    color: #ffa500;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bg-level-bar-icon {
    font-size: 18px;
}

.bg-level-discount-message.no-discount {
    font-size: 13px;
    color: #999;
    font-style: italic;
    line-height: 1.4;
}

.bg-level-discount-message.already-used {
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #ffa500;
    font-size: 14px;
}

.bg-level-discount-inactive {
    opacity: 0.85;
}

/* Media query spostata in bg-smartphone.css */

.sm-referral-field-wrapper {
    margin: 20px 0;
}

.sm-referral-field {
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.15), rgba(65, 105, 225, 0.1));
    border: 1px solid rgba(100, 149, 237, 0.4);
    border-radius: 10px;
    padding: 15px 20px;
}

.sm-referral-field label {
    display: block;
    color: #fff !important;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1em;
}

.sm-referral-icon {
    font-size: 1.2em;
}

.sm-referral-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.sm-referral-input-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #1a1a1a !important;
    color: #fff !important;
    font-size: 1em;
}

.sm-referral-input-row button {
    padding: 8px 15px;
    background: linear-gradient(135deg, #6495ED, #4169E1);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.sm-referral-input-row button:hover {
    background: linear-gradient(135deg, #7BA3EF, #5179F1);
}

.sm-referral-hint {
    color: #888;
    font-size: 0.85em;
    margin: 0;
}

#sm_referral_result {
    margin-bottom: 10px;
}

#sm_referral_result.success {
    color: #5cb85c;
    font-weight: 600;
}

#sm_referral_result.error {
    color: #d9534f;
}

.sm-referral-applied {
    color: #5cb85c;
    font-size: 1.1em;
    padding: 10px 0;
}

.sm-referral-applied .sm-referral-icon {
    font-size: 1.3em;
    margin-right: 5px;
}

/* Layout 3 colonne - definito in bg-cart.css con display: grid */
/* Qui solo override minimi se necessari */

/* Media query spostata in bg-tablet.css */

.bg-loyalty-history-page {
    max-width: 800px;
}

.bg-loyalty-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.bg-loyalty-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 30px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-width: 120px;
}

.bg-loyalty-summary-item .bg-loyalty-icon {
    font-size: 2em;
    margin-bottom: 5px;
}

.bg-loyalty-summary-item .bg-loyalty-value {
    font-size: 2em;
    font-weight: bold;
}

.bg-loyalty-summary-item .bg-loyalty-label {
    font-size: 0.9em;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bg-loyalty-tokens {
    background: linear-gradient(135deg, #d4a84b 0%, #b8860b 100%) !important;
}

.bg-loyalty-stars {
    background: linear-gradient(135deg, #6495ED 0%, #4169E1 100%) !important;
}

.bg-loyalty-history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bg-loyalty-history-row {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 8px 12px;
    border-radius: 6px;
    background: #fff;
    border-left: 5px solid #ccc;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 4px; 
    transition: transform 0.2s ease;
}

.bg-loyalty-row-revoke {
    border-left-color: #e74c3c;
    background: #fdedec; 
}
.bg-loyalty-row-revoke .bg-loyalty-row-type { color: #c0392b; }

.bg-loyalty-row-discount {
    border-left-color: #e67e22;
    background: #fef5e7; 
}
.bg-loyalty-row-discount .bg-loyalty-row-type { color: #d35400; }

.bg-loyalty-row-referral {
    border-left-color: #9b59b6;
    background: #f4ecf7; 
}
.bg-loyalty-row-referral .bg-loyalty-row-type { color: #8e44ad; }

.bg-loyalty-row-referral-created {
    border-left-color: #ff79c6;
    background: #fce4ec; 
}
.bg-loyalty-row-referral-created .bg-loyalty-row-type { color: #d81b60; }

.bg-loyalty-row-level {
    border-left-color: #f1c40f;
    background: #fef9e7; 
}
.bg-loyalty-row-level .bg-loyalty-row-type { color: #b7950b; }

.bg-loyalty-row-manual {
    border-left-color: #34495e;
    background: #ebedef; 
}
.bg-loyalty-row-manual .bg-loyalty-row-type { color: #2c3e50; }

.bg-loyalty-row-negative {
    border-left-color: #e74c3c;
    background: #fdedec;
}
.bg-loyalty-row-neutral {
    border-left-color: #95a5a6;
    background: #f4f6f7;
}

.bg-loyalty-row-icon {
    font-size: 1.4em; 
    margin-right: 10px; 
    line-height: 1;
}

.bg-loyalty-row-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column; 
    gap: 4px;
}

.bg-loyalty-row-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.bg-loyalty-row-type {
    font-weight: 600;
    color: #333;
}

.bg-loyalty-row-date {
    font-size: 0.85em;
    color: #666;
}

.bg-loyalty-row-details {
    display: flex;
    flex-direction: row; 
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85em; 
    color: #555;
    margin-top: 0; 
    align-items: center;
}

.bg-loyalty-row-values {
    display: flex;
    flex-direction: row; 
    align-items: center;
    gap: 8px; 
    flex-shrink: 0;
    margin-left: auto; 
}

.bg-loyalty-row-tokens {
    align-items: center;
    border-radius: 4px;
    display: inline-flex;
    font-size: 0.9em;
    font-weight: 600;
    gap: 4px;
    padding: 4px 8px;
    white-space: nowrap;
}

.bg-loyalty-row-stars {
    align-items: center;
    border-radius: 4px;
    display: inline-flex;
    font-size: 0.9em;
    font-weight: 600;
    gap: 4px;
    padding: 4px 8px;
    white-space: nowrap;
}

.bg-loyalty-row-tokens.positive {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.bg-loyalty-row-stars.positive {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.bg-loyalty-row-tokens.negative {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.bg-loyalty-row-stars.negative {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.bg-loyalty-no-history {
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

/* Media query spostata in bg-smartphone.css */

