/**
* 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		SGKUnityProd
* @Description	Sell products by length, weight or volume: customers enter the exact dimension they need and the price is calculated live.
* @Version		1.1.10
* @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 stylesheet.
 *
 * Deliberately minimal: the block lives inside the merchant's theme and must inherit its
 * typography, its colours and its form controls. Only layout and spacing are set here, and
 * every selector is prefixed `sgkup-` so no theme rule and no other module can collide.
 * No fixed width anywhere.
 */

.sgkup-host {
    display: block;
    width: 100%;
}

.sgkup-container {
    display: block;
    clear: both;
    width: 100%;
    margin: 0 0 14px;
}

.sgkup-container__label {
    display: block;
    margin: 0 0 5px;
    font-weight: 600;
}

.sgkup-container__fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.sgkup-container__fields .sgkup-value,
.sgkup-container__fields .sgkup-decimals {
    flex: 1 1 120px;
    min-width: 0;
    max-width: 220px;
}

.sgkup-container__fields .sgkup-unit {
    flex: 0 0 auto;
    opacity: .8;
}

.sgkup-legend {
    margin: 6px 0 0;
    font-size: .85em;
    line-height: 1.4;
}

.sgkup-legend.is-caution {
    /* Measured, not chosen by eye. The previous #b00020 scored 7.33:1 on a white theme but
       only 2.87:1 on a dark one — a live shop on a near-black background rendered these lines
       unreadable, below the 4.5:1 WCAG AA needs. A single colour cannot be ideal on both, since
       the two requirements pull in opposite directions; #e03131 is the one that clears AA on
       white (4.51:1) AND on black (4.65:1). The weight carries part of the emphasis so the
       meaning does not rest on colour alone. */
    color: #e03131;
    font-weight: 600;
}

.sgkup-calculate {
    display: inline-block;
    margin: 10px 0;
    min-height: 40px;
}

.sgkup-calculate[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

.sgkup-status {
    display: block;
    margin: 6px 0;
    font-size: .9em;
    /* The line reserves its height even when empty. Without it, clearing the message on the
       first keystroke shrinks the block and the Calculate button jumps upwards under the
       cursor: measured in the browser, the click then landed on nothing at all and the
       customer had to press twice. */
    min-height: 1.4em;
}

.sgkup-status.is-error {
    color: #b00020;
}

.sgkup-status.is-busy {
    opacity: .7;
}

.sgkup-unitprice {
    margin: 4px 0 8px;
    font-size: .9em;
    opacity: .85;
}

.sgkup-unitprice__unit {
    margin-left: 2px;
}

/* Attribute rows the module replaces stay in the DOM for the theme scripts, but must not be
   seen or reachable. `[hidden]` alone is not enough: the user-agent rule it relies on is beaten
   by any author `display` declaration on the same element, silently. */
.sgkup-hidden,
.sgkup-container [hidden],
.sgkup-container__fields [hidden] {
    display: none !important;
}

@media (max-width: 480px) {
    .sgkup-container__fields .sgkup-value,
    .sgkup-container__fields .sgkup-decimals {
        flex: 1 1 100%;
        max-width: none;
    }

    .sgkup-calculate {
        display: block;
        width: 100%;
    }
}
