/**
* 2007-2021 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* 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 http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2021 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/
/*
.product-flag .discount{
	z-index: 2;
}*/

.product-flags .js-product-flags{
	z-index: 1;
	display:none;
}

 /* The Modal (background) */
 
.modal-stock {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 9999; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
  color: #011638;
}

.modal-title-stock {
  margin-bottom: 1rem;
  font-size: 20px;
  font-weight: 600;
}

.modal-label-stock {
  display: block;
  font-weight: 500;
  margin-bottom: 4px;
}

.modal-stock select.modal-shops-select {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: 5px !important;
  padding-top: .3rem !important;
  padding-bottom: .3rem !important;
  padding-left: .5rem;
  padding-right: .4rem;
  background-color: #fff;
  box-sizing: border-box;
  font-size: 1.1rem;
  outline: none;
  box-shadow: none; 
}

/* Komunikaty błędu / info (np. brak informacji) */
.modal-error-stock {
  margin-top: 4px;
  color: #e97140 !important;
  font-size: 14px;
}

/* Kontener na wyniki pod selectem */
.stock-results {
  margin-top: 16px;
  max-height: 60vh;      /* żeby lista nie uciekła poza ekran */
  overflow-y: auto;
}

/* Tekst/wyniki */
.stock-info {
  font-size: 14px;
  line-height: 1.4;
  display: flex;
  justify-content: center;
}

/* Modal Content/Box */
.modal-stock .modal-content {
  background-color: #fefefe;
  margin: 5% auto; /* 15% from the top and centered */
  padding: 24px 32px 28px;
  border: 1px solid #888;
  width: 90%; /* Could be more or less, depending on screen size */
  max-width: 700px;
  border-radius: 4px;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* The Close Button */
.modal-stock .close {
  color: black;
  position: absolute;
  right: 16px;
  top: 8px;
  float: right;
  font-size: 34px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
} 
#label{
	margin-right: 10px;
}

.dot{
	height: 16px;
	width: 16px;
	border-radius: 50%;
    display: inline-block;

}
.dot_green {
  background-color: #129a7d;
}
.dot_yellow {
  background-color: #f0df93;
}
.dot_red {
  background-color: #e97140;
}
.stock-item {
  font-weight:  500;
  height: 40px;
  margin-top: 5px;
  border-bottom: 1px solid black;
  margin-bottom: 5px;
  font-size: 10px;
}
.product-stock-name{
	font-size: 10px;
}
.product-stock-legend-desc{
	font-size: 14px;
	font-weight: 500;
	width:95%;
	margin-left: 25px;
    margin-top: 0.1%;
}
.dot-top{
	margin-top: 10%;
}
#stock-top-item{
	margin-bottom: 25px;
}
#product_stock_button{
	background-color: white;
}

@media (max-width: 768px) { 
	.dot{
		position: absolute;
		top: -20px;
		right: 0px;
	}
	.stock-item {
	  margin-top: 0px;
	  height: auto;
	  padding: 5px;
	}
	.stock-empty{
		border: 0px;
	}
}
.stock-item-legend{
	  margin-top: 10px;
	  padding: 0px;
}
.dot-box-legend{
	max-width: 5%;
	float:left;
}
.legend-name{
	font-size: 18px;
}
@media (min-width: 577px) { 
	.legend-box{
		margin-top: 20px;
		margin-bottom: 10px;
	}
}
/**/
/*
.h1 {
  background-color: #777;
  color: white;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 15px;
}

.block-category-inner {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #f1f1f1;
}
*/

.modal-parcel {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
div.modal-parcel-content {
  background-color: #fefefe;
  margin: 15% auto; /* 15% from the top and centered */
  padding: 10px;
  border: 1px solid #888;
  width: 15%;/* Could be more or less, depending on screen size */
}

@media (max-width: 1700px) { 
	div.modal-parcel-content {
		width: 20%;
	}
}
@media (max-width: 1300px) { 
	div.modal-parcel-content {
		width: 25%;
	}
}
@media (max-width: 1200px) { 
	div.modal-parcel-content {
		width: 30%;
	}
}

@media (max-width: 1000px) { 
	div.modal-parcel-content {
		width: 35%;
	}
}
@media (max-width: 900px) { 
	div.modal-parcel-content {
		width: 40%;
	}
}
@media (max-width: 800px) { 
	 div.modal-parcel-content {
		width: 45%;/* Could be more or less, depending on screen size */
	 }
}
@media (max-width: 700px) { 
	 div.modal-parcel-content {
		width: 50%;/* Could be more or less, depending on screen size */
	 }
}
@media (max-width: 600px) { 
	 div.modal-parcel-content {
		width: 55%;/* Could be more or less, depending on screen size */
	 }
}

@media (max-width: 400px) { 
	 div.modal-parcel-content {
		width: 80%;/* Could be more or less, depending on screen size */
	 }
}

/* The Close Button */
.close {
  color: black;
  float: right;
  font-size: 12px;
  font-weight: bold;
  margin-bottom:20px;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
} 
#tooltip-phone {
    border: 1px solid #ffcf66;
    width: 48%;
    margin: -10px 0 1em 26%;
    padding: 5px;
    text-align: center;
    background-color: #fff7e6; 
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
	font-size: 10px;
}

#tooltip-phone::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: transparent transparent #ffcf66 transparent;
}

/* DODANE 1.12.2025 – wersja poprawiona */

/* Żeby wrapper na treść tabeli był szeroki i nie „pływał” na środku */
#stock-info {
    display: block;
    justify-content: flex-start; /* na wszelki wypadek, gdyby coś jeszcze siedziało w .stock-info */
}

/* Nagłówek "Sklep KFD: ..." */
#stock-top-item {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Nazwa produktu pod nagłówkiem sklepu */
.stock-product-name {
    font-size: 15px;
    font-weight: 500;
    color: #555;
    margin-bottom: 12px;
}

/* ── Sekcja niedostępnych wariantów (zwijana) ── */
.stock-unavailable-section {
    margin-top: 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fdf2f2 0%, #fef8f6 100%);
    border: 1px solid #f0d5d0;
    overflow: hidden;
}

.stock-unavailable-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.stock-unavailable-toggle:hover {
    background: rgba(0,0,0,0.02);
}

.stock-unavailable-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #888;
}

.stock-unavailable-label .stock-unavailable-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f5dbd7;
    color: #c0392b;
    font-size: 13px;
    flex-shrink: 0;
}

.stock-unavailable-label .stock-unavailable-text {
    line-height: 1.3;
}

.stock-unavailable-label .stock-unavailable-text strong {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.stock-unavailable-label .stock-unavailable-text small {
    display: inline;
    font-weight: 400;
    color: #aaa;
    font-size: 12px;
}

.stock-unavailable-count {
    font-size: 12px;
    font-weight: 600;
    color: #c0392b;
    background: #f5dbd7;
    border-radius: 12px;
    padding: 2px 10px;
    white-space: nowrap;
}

.stock-unavailable-arrow {
    font-size: 14px;
    color: #bbb;
    transition: transform 0.25s ease;
    margin-left: 6px;
}

.stock-unavailable-section.open .stock-unavailable-arrow {
    transform: rotate(180deg);
}

.stock-unavailable-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    border-top: 0 solid transparent;
}

.stock-unavailable-section.open .stock-unavailable-list {
    max-height: 3000px;
    border-top: 1px solid #f0d5d0;
}

.stock-unavailable-list .stock-item {
    background: #fff;
}

.stock-unavailable-list .stock-item:nth-child(even) {
    background: #f7f7f8;
}

.stock-item-unavailable .product-stock-name {
    color: #aaa;
}

/* Wrapper na listę produktów */
#modal-stock-content {
    margin-top: 8px;
    width: 100%; /* żeby zajmował pełną szerokość modala */
}

/* Każdy element listy – jeden „wiersz” */
.stock-item {
    display: flex;                 /* nazwa + ikonka obok siebie */
    align-items: center;
    padding: 8px 10px;
    margin: 4px 0;
    border-radius: 4px;
    background: #f7f9fc;           /* delikatne tło */
    border: 1px solid #e1e5ee;
    font-size: 0.9rem;
    height: auto;                  /* nadpisuje stare 40px */
    border-bottom: none;           /* na wszelki wypadek, gdyby gdzieś jeszcze był border-bottom */
}

/* Lekka „zebra” */
.stock-item:nth-child(odd) {
    background: #f1f4fa;
}

/* Nazwa produktu */
.product-stock-name {
    flex: 1;
    padding-right: 8px;
    line-height: 1.3;
    font-size: 0.9rem;             /* nadpisuje stare 10px */
}

/* Numer pozycji */
.product-stock-name b {
    margin-right: 4px;
}

/* Kolumna z ikonką */
.dot-box {
    width: 40px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
}

/* Ikona baterii – trochę większa */
.dot-box i.fa {
    font-size: 18px;
}

/* Legenda */
.legend-box {
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid #e1e5ee;
}

.stock-item-legend {
    display: flex;
    align-items: center;
    margin: 4px 0;
    padding: 0; /* jasno nadpisujemy stare padding:0 (bez zmian) */
}

.legend-name {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 18px; /* zachowujemy starą wielkość, ale można zmniejszyć */
}

.dot-box-legend {
    width: 24px;
    max-width: none;               /* nadpisuje stare max-width:5% */
    display: flex;
    justify-content: center;
    margin-right: 8px;
    float: none;                   /* dla porządku, choć jako flex-item i tak ignoruje float */
}

.product-stock-legend-desc {
    font-size: 0.85rem;
    font-weight: 400;
    width: auto;                   /* nadpisuje stare 95% */
    margin: 0;                     /* kasuje margin-left:25px itd. */
}

/* Alert pod tabelą */
#stock-info .alert {
    margin-top: 16px;
    font-size: 0.85rem;
    line-height: 1.4;
    background: #fef7e5;
    border: 1px solid #f5d58a;
    border-radius: 4px;
    padding: 8px 10px;
}

/* Jeśli w PHP dodasz wrapper .stock-list wokół elementów .stock-item,
   to ten grid ładnie ułoży je w kolumny na desktopie */
.stock-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 8px;
}
