/*******************************************************************************************
*   ___  _          ______                     _ _                _                        *
*  / _ \| |         | ___ \                   | (_)              | |              © 2026   *
* / /_\ | | _____  _| |_/ /_ __ __ _ _ __   __| |_ _ __   __ _   | |_ ___  __ _ _ __ ___   *
* |  _  | |/ _ \ \/ / ___ \ '__/ _` | '_ \ / _` | | '_ \ / _` |  | __/ _ \/ _` | '_ ` _ \  *
* | | | | |  __/>  <| |_/ / | | (_| | | | | (_| | | | | | (_| |  | ||  __/ (_| | | | | | | *
* \_| |_/_|\___/_/\_\____/|_|  \__,_|_| |_|\__,_|_|_| |_|\__, |  \___\___|\__,_|_| |_| |_| *
*                                                         __/ |                            *
*                                                        |___/                             *
* ---------------------------------------------------------------------------------------- *
* This is commercial software, only users who have purchased a valid license and accept    *
* to the terms of the License Agreement can install and use this program.                  *
* ---------------------------------------------------------------------------------------- *
* website: https://cs-cart.alexbranding.com                                                *
*   email: info@alexbranding.com                                                           *
*******************************************************************************************/

.js-counter {
    display: flex;
    box-sizing: border-box;
    visibility: hidden;
    margin: 10px 0;
    padding: 10px;
    width: 100%;
    max-width: 240px;
    line-height: 1;
    border-radius: 0;

	.checkColor() when (@pd_block_background = @content_bg) {
    	background: lighten(@base, 3%);
    }
    .checkColor() when not (@pd_block_background = @content_bg) {
    	background: @content_bg;
    }
    .checkColor();   

    .jc_round(@round: 4px) when (@abt__ut2_general_use_rounding = little) {
		border-radius: @round;
	}
	.jc__round(@round: 8px) when (@abt__ut2_general_use_rounding = full) {
		border-radius: @round;
	}
	.jc__round();
    
    > div {
        position: relative;
        flex: 1;
        flex-wrap: nowrap;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        font-size: 11px;
        padding: 0 5px;

        .color-is() when (iscolor(@lighten-font)) {
            color: @lighten-font;
        }
        .color-is() when not (iscolor(@lighten-font)) {
            color: contrast(@content_bg, lighten(@font, 30%), #999);
        }
        .color-is();

        > span {
            display: flex;
            justify-content: space-between;
        }
        
        &:first-of-type {

        }
        &:not(:last-of-type) {
            border-right: 1px solid @base;
        }

        > span {
            padding-bottom: 2px;
            font-size: x-large;
            font-weight: bold;
            color: contrast(@content_bg, @font, #333);
        }
    }
    .ab-dotd-js-counter {
        &_days, &_hours, &_minutes, &_seconds {

        }
        &_seconds > span {
            color: @pd_color_bright_elements;
            
            .color-is() when (iscolor(@lighten-font)) {
                color: @lighten-font;
            }
            .color-is() when not (iscolor(@lighten-font)) {
                color: contrast(@content_bg, lighten(@font, 30%), #999);
            }
            .color-is();
        }
    }
}

.ty-product-block {
    .js-counter {
        margin: 5px 0 0;
        background: @content_bg;
    }
}
.ty-product-bigpicture {
    @media (max-width: 1024px) and (min-width: 768px) {
        .js-counter {
            margin-left: 0;
            margin-right: 0;
        }
    }
}

html[dir="rtl"] {
    .js-counter {
        direction: rtl;
        
        > div:not(:last-of-type) {
            border-right: 0 !important;
            border-left: 1px solid @base;
        }
    }
}