/**
* 2010-2026 SwissGeek | Web Developer Freelance
*
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https:// opensource.org/licenses/OSL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https:// devdocs.prestashop.com/ for more information.
*
* @Module		SGK Stick Labels
* @Description	Show badges, stickers and labels on your product images and product pages.
* @Version		1.0.0
* @Copyright	SwissGeek | Web Developer Freelance <https://swissgeek.dev/>
* @support		Support Requests <https://admin.swissgeek.dev/forms/ticket?styled=1&with_logo=1>
* @Blog			Breaking News <https://news.swissgeek.dev/> <https://news.prestageek.ch/>
* @Addons		Developments <https://prestageek.ch/> <https://add.swissgeek.dev/>
*
* @license		http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*				Valid for 1 website (or project) for each purchase of license International Registered 
*				Trademark & Property of SwissGeek. More information on <https://swissgeek.dev/license/>
*/

/* Front-office structure of SGK Stick Labels.
   Colours, sizes, fonts and placement of each label are generated per shop in the page head;
   this sheet only carries what is the same for every label. */

/* The host is a pass-through: the labels must lay out as if the theme had written them itself.
   `display:inline` rather than `display:contents`, which several screen readers used to drop
   from the accessibility tree along with everything inside it. */
.sgksl-host{
    display: inline;
}

.sgksl-label{
    display: inline-block;
    box-sizing: border-box;
    max-width: 100%;
    padding: 3px 8px;
    border-style: none;
    border-color: transparent;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.sgksl-label .sgksl-img{
    display: block;
    height: auto;
    max-width: 100%;
}

/* Inline positions: they live in the flow of the product block, where the theme called us. */
.sgksl-inline{
    margin: 2px 4px 2px 0;
    vertical-align: middle;
}

/* The two flow positions the script relocates inside the product block: their own line, but
   hugging their content rather than stretching across the card. A label that declares a fixed
   width overrides this from the generated style sheet. */
.sgksl-block{
    display: block;
    margin: 6px 0 0;
    width: -moz-fit-content;
    width: fit-content;
}

/* Overlay positions. Until the script has anchored them on the product image they must not be
   painted anywhere else: an absolutely positioned label resolved against the wrong ancestor
   lands in the middle of the page. */
.sgksl-overlay{
    position: absolute;
    visibility: hidden;
}

.sgksl-overlay.sgksl-placed{
    visibility: visible;
}

/* The element the script anchors labels on has to establish a containing block. */
.sgksl-anchor{
    position: relative;
}

/* Only added when the anchor computes to display:inline, where the containing block would
   otherwise come from the line boxes rather than from the border box. */
.sgksl-anchor--block{
    display: inline-block;
}

@media print{
    .sgksl-overlay{
        display: none;
    }
}
