.configurator-form .form-group {
    display: grid;
}

.configurator-form .form-group .tab-elements .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.configurator-form .tab-title {
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    font-size: 2rem;
    font-weight: var(--e-global-typography-primary-font-weight);
    line-height: var(--e-global-typography-primary-line-height);
    color: var(--e-global-color-primary);
    text-decoration: var(--e-global-typography-primary-text-decoration);
}

.configurator-form .field-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 1rem;
}

@media(max-width: 767px) {
    .configurator-form .field-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
        align-items: stretch;
    }

    .configurator-form .field-group .label-box {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .configurator-form .field-group .field-label {
        flex: 1;
    }

    .configurator-form .field-group .field-input {
        width: 100%;
    }
}

.configurator-form .tab-elements {
    display: grid;
    gap: 8px;
}

.configurator-form .tab-group {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.configurator-form .field-input input,
.configurator-form .field-input select {
    border: 1px solid var(--e-global-color-secondary);
    border-radius: 50px;
    outline: none;
    padding: 12px 16px;
    width: 100%;
    height: 3rem;
}
.configurator-form .field-input input::placeholder {
    color: var(--e-global-color-secondary);
    font-size: 0.9rem;
}
form.configurator-form {
    width: 100%;
    max-width: 767px;
    color: var(--e-global-color-text);
    font-family: "Open Sans", Sans-serif;
    font-size: 1rem;
    font-weight: 400;
    text-decoration: none;
    margin: auto;
}
.configurator-form .field-input input select { 
    text-align: center;
    text-align-last: center;
}
.configurator-form .field-input input select option {
    text-align: center;
}

.label-box .label-info {
    display: block;
    border: 1px solid black;
    border-radius: 100%;
    width: 25px;
    height: 25px;
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    line-height: 23px;
}
.label-box {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 0.5rem;
}

/* gallery select */
.gallery-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-option {
    width: 80px;
    height: 80px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.gallery-option span {
  display: none;
}

.gallery-option[data-value=""] span {
  display: inline;
  font-size: 14px;
  color: #222;
  background: none;
  padding: 0 10px;
  text-align: center;
  width: 100%;
  display: block;
}
.picker-click-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.gallery-option:hover,
.gallery-option.selected {
    border-color: var(--e-global-color-primary);
}

.gallery-option.disabled {
    display: none !important;
}

/* color select */
.select.color-picker-container {
    position: relative;
    display: inline-block;
    width: 100%;
    cursor: pointer;
    font-size: 0;
}

/* Wybrana opcja */
.select.color-picker-container .selected-color {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--e-global-color-secondary);
    border-radius: 50px;
    height: 3rem;
}

/* Strzałka w dół */
.select.color-picker-container .selected-color::after {
    content: '▼';
    font-size: 12px;
    margin-left: 10px;
    color: #fff;
}

/* Lista opcji */
.select.color-picker-container .select-color-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto; /
}

/* Opcje */
.select.color-picker-container .color-option {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.select.color-picker-container .color-option .color-box {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
}

.select.color-picker-container.open .select-color-options {
    display: block;
}

/* gallery select */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-inline-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 50px;
    padding: 0.5rem;
}

.gallery-inline-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.select.gallery-picker-container {
    position: relative;
    display: inline-block;
    width: 100%;
    height: auto;
}

.select.gallery-picker-container .gallery-selected {
    position: relative; 
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: default;
    background-size: cover;
    background-position: center;
    border: 1px solid var(--e-global-color-secondary);
    border-radius: 50px;
    height: auto;
    min-height: 3rem;
    pointer-events: none;
}

/* Tekst wyświetlany gdy nie ma tła */
.select.gallery-picker-container .gallery-selected .gallery-selected-text {
    display: none;
    font-size: 14px;
    color: var(--e-global-color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    z-index: 1;
}

.select.gallery-picker-container .gallery-selected:not([style*="background-image"]) .gallery-selected-text,
.select.gallery-picker-container .gallery-selected[style=""] .gallery-selected-text {
    display: block;
}

/* Lista opcji - ukryta na desktop */
.select.gallery-picker-container .gallery-options {
    display: none;
}
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

.select.gallery-picker-container .gallery-options.open {
    display: block;
}
.select.gallery-picker-container .gallery-selected::after {
    content: '▼';
    font-size: 12px;
    margin-left: 10px;
    color: var(--e-global-color-secondary);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.select.gallery-picker-container .gallery-option {
    display: flex;
    align-items: center;
    justify-content: center;
    /* height: 50px; */
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    border-bottom: 1px solid #eee;
    width: 100%;
    height: 3rem;
}

.select.gallery-picker-container .gallery-option:last-child {
    border-bottom: none;
}

.select.gallery-picker-container .gallery-option:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Przycisk "Lupa" */
.gallery-info {
    border: 1px solid black;
    border-radius: 100%;
    width: min-content;
    padding: 8px;
}

.gallery-info:hover {
    background-color: #005f7f;
}





div#add-product-action {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
/* add to cart */
#add-custom-product.disabled {
    position: relative;
    cursor: not-allowed;
}

#add-custom-product {
    background-color: var(--e-global-color-primary);
    color: var(--e-global-color-e9420c8);
    border-color: var(--e-global-color-primary);
    font-family: "Amatic SC", Sans-serif;
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.25em;
    border-style: none;
    border-radius: 35px 35px 35px 35px;
    padding: 0.65rem 2.25rem 0.65rem 2.25rem;
    display: flex;
    flex-direction: column;
    position: relative;
}
#add-custom-product.disabled {
    background-color: #a2a2a28c;
}

#add-custom-product.disabled::after {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    background: #f8d7da;
    padding: 5px;
    font-size: .85rem;
    text-align: center;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    color: var(--e-global-color-text);
    font-family: "Open Sans", Sans-serif;
    font-weight: 400;
    line-height: 1.25em;
    width: 100%;
}

#add-custom-product.disabled:hover:after {
    content: "Wszystkie pola muszą zostać uzupełnione";
}

#add-custom-product:not(.disabled):hover:after {
    background-color: var(--e-global-color-accent);
    color: #ffffff;
    border-color: var(--e-global-color-accent);
}

div#config-price-display p {
    font-family: 'Open Sans';
    font-weight: 500;
}
div#config-price-display ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: 'Open Sans';
    font-weight: 500;
    margin-top: 1rem;
}

div#config-price-display p span.price,
div#config-price-display ul span.price {
    color: var( --e-global-color-text );
    font-size: 1.15rem;
}

div#add-product-action p {
    font-family: 'Amatic SC';
    font-size: var(--e-global-typography-primary-font-size);
    font-weight: 600;
    color: rgb(132, 125, 161);
}
div#add-product-action p span {
    color: rgb(78, 68, 60);
}
#add-custom-product:not(.disabled) {
    transition: .3s;
}
#add-custom-product:not(.disabled):hover {
    transform: scale(1.1);
}


/* yes no toggle */
.toggle-circle {
    display: inline-block;
    cursor: pointer;
}

.toggle-circle input[type="checkbox"] {
    display: none;
}

.toggle-circle .circle {
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--e-global-color-secondary);
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
}

.toggle-circle input[type="checkbox"]:checked + .circle::after {
    content: '';
    width: 2.5rem;
    height: 2.5rem;
    background-color: #D093AA;
    border-radius: 50%;
    position: absolute;
    top: 3px;
    left: 3px;
}

/* etykieta dla true_false obok toggle-circle */
.true-false-label {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    font-size: 1rem;
    color: #333;
}


/* configurator, new css to gallery field */
.gallery-inline-wrapper {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
    align-items: center;
    gap: 1rem;
}
.gallery-dots {
    display: none;
}

/* Mobile Tooltip Bottom Sheet */
.tooltip-bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    pointer-events: all;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.tooltip-bottom-sheet.active {
    opacity: 1;
}

.tooltip-sheet-content {
    background: white;
    width: 100%;
    max-height: 70vh;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

.tooltip-bottom-sheet.active .tooltip-sheet-content {
    transform: translateY(0);
}

.tooltip-sheet-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #F0F0F0;
}

.tooltip-sheet-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tooltip-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}
