/* Savings Tab Styles (כמה חסכתי?) */

.savings-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.savings-header {
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.savings-subtitle {
    font-size: 20px;
    font-weight: 500;

    color: #0B0427;
    text-align: right;
    margin: 0;
}

.savings-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Savings Amount */
.savings-amount-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.savings-amount-label {
    font-size: 27px;
    font-weight: 500;
    line-height: 50px;
    color: #0B0427;
}

.savings-amount-value {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.savings-amount-value .amount {
    font-size: 27px;
    font-weight: 700;
    line-height: 50px;
    color: #0B0427;
}

.savings-amount-value .currency {
    font-size: 25px;
    font-weight: 700;
    line-height: 18px;
    color: #000;
}

/* Month Selector */
.month-selector {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    justify-content: center;
    width: 213px;
    padding: 20px 0;
    background: #fff;
}

.month-selector-label {
    font-size: 18px;
    font-weight: 500;
    line-height: 18px;
    color: #000;
    text-align: right;
    display: block;
    margin-bottom: 8px;
}

.month-selector-dropdown {
    width: 100%;
    height: 40px;
    padding: 8px 12px;

    font-size: 18px;
    font-weight: 500;
    line-height: 16px;
    color: #000;
    text-align: right;
    background-color: #fff;
    border: none;
    border-bottom: 1px solid #000;
    border-radius: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='7' viewBox='0 0 14 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L7 6L13 1' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 4px center;
    background-size: 14px 7px;
}

.month-selector-dropdown:focus {
    outline: none;
    border-bottom-color: #2020B3;
}

.month-selector-dropdown option {

    font-size: 16px;
    padding: 8px;
    direction: rtl;
}

/* Savings List */
.savings-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 20px;
}

.savings-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    padding-left: 60px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0px 2px 7px 0px rgba(0, 0, 0, 0.08);
}

.savings-item-divider {
    width: 1px;
    height: 32px;
    background: #D9D9D9;
    flex-shrink: 0;
}

/* Product Section */
.savings-item-product {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
}

.savings-item-name {
    font-size: 18px;
    font-weight: 700;
    line-height: 18px;
    color: #000;
    text-align: right;
}

.savings-item-image {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Utility classes for responsive visibility */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* Prices Section - contains price rows */
.savings-item-prices {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

.savings-item-prices.column {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;

}

/* Hide dividers inside prices on desktop */
.savings-item-prices .savings-item-divider {
    display: none;
}

/* Individual row in prices section */
.savings-item-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.savings-item-label {
    font-size: 18px;
    font-weight: 500;
    line-height: 18px;
    color: #000;
}

.savings-badge {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 16px;
    background: #F8F8F8;
    border-radius: 38px;
}

.savings-saved-text.savings-badge {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    padding: 0;
    background: transparent;

}

.savings-badge .currency {
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

.savings-badge .amount {
    font-size: 18px;
    font-weight: 500;
    color: #000;
}

.savings-badge.strikethrough span {
    font-size: 18px;
    font-weight: 500;
    color: #000;
    text-decoration: line-through;
}

.savings-badge.bold span {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

/* Saved Section */
.savings-item-saved {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 4px;
}

.savings-saved-text {
    font-size: 18px;
    font-weight: 700;
    line-height: 18px;
    color: #000;
}

/* Club Section (only shown on item 1) */
.savings-item-club {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    /* Utility classes for responsive visibility */
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none !important;
    }

    .savings-container {
        gap: 16px;
    }

    .savings-subtitle {
        font-size: 16px;
        line-height: 24px;
    }

    .savings-content {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 20px;
    }

    .savings-amount-label {
        font-size: 20px;
        line-height: 30px;
    }

    .savings-amount-value .amount {
        font-size: 20px;
        line-height: 30px;
    }

    .savings-amount-value .currency {
        font-size: 18px;
    }

    .month-selector {
        width: 100%;
    }

    .savings-list {
        gap: 8px;
        margin-top: 16px;
    }

    .savings-item {
        flex-direction: column;
        align-items: center;
        gap: 13px;
        padding: 20px;
    }

    /* Horizontal dividers on mobile */
    .savings-item-divider {
        width: 100%;
        height: 1px;
        background: #D9D9D9;
    }

    /* Product section - image left, name right, space-between */
    .savings-item-product {
        width: 100%;
        justify-content: space-between;
        flex-direction: row;
    }

    .savings-item-name {
        font-size: 14px;
        font-weight: 700;
        line-height: 20px;
        width: 126px;
        text-align: right;
    }

    .savings-item-image {
        width: 80px;
        height: 60px;
    }

    /* Prices section - column with full width rows */
    .savings-item-prices {
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }



    /* Show dividers inside prices on mobile */
    .savings-item-prices .savings-item-divider {
        display: block;
    }

    /* Each row - space between, label right, badge left */
    .savings-item-row {
        width: 100%;
        justify-content: space-between;
        flex-direction: row;
    }

    .savings-item-label {
        font-size: 18px;
        font-weight: 500;
        line-height: 18px;
    }

    .savings-badge .currency {
        font-size: 16px;
    }

    .savings-badge .amount {
        font-size: 18px;
    }

    .savings-badge.strikethrough span {
        font-size: 18px;
    }

    .savings-badge.bold span {
        font-size: 18px;
        font-weight: 700;
    }

    /* Saved section on mobile */
    .savings-item-saved {
        width: 100%;
        justify-content: space-between;
        flex-direction: row;
        padding: 0;
    }

    .savings-item-saved .savings-saved-text.savings-badge {
        font-size: 16px;
        font-weight: 500;
        color: #000;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 4px 16px;
        background: #F8F8F8;
        border-radius: 38px;
    }

    /* Show mobile-only badge in saved section */
    .savings-item-saved .savings-badge.mobile-only {
        display: flex;
    }

    /* Club section on mobile - show for items with class */
    .savings-item-with-club .savings-item-club {
        display: flex;
        width: 100%;
        justify-content: flex-start;
    }
}
