/* ==========================================================================
   Базовий макет калькулятора та Навігація
   ========================================================================== */
.pb-calc-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    font-family: sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}

.pb-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 10px;
    gap: 20px;
}

.pb-calc-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.pb-calc-main {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.pb-calc-left {
    flex: 1;
    min-width: 300px;
}

.pb-calc-right {
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.pb-tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.pb-tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.pb-step-counter {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.pb-nav-btn {
    padding: 10px 20px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    white-space: normal;
    text-align: left;
    max-width: 200px;
}

.pb-nav-btn:hover {
    background: #e9e9e9;
}

.pb-nav-btn.active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.pb-submit-btn {
    margin-top: 20px;
    width: 100%;
    padding: 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.pb-submit-btn:hover {
    background: #218838;
}

/* ==========================================================================
   Плитки вибору (Type Tiles & Size Cells)
   ========================================================================== */
.type-tile-grid, .size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    margin-top: 10px;
}

.type-tile-grid--cover {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.type-tile, .size-cell {
    border: 2px solid #ddd;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s;
}

.type-tile--checked, .size-cell--active {
    border-color: #007bff;
    background-color: #f8fbff;
}

.type-tile--blocked {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f9f9f9;
}

.type-tile__features {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

/* ==========================================================================
   Пігулки (Pills)
   ========================================================================== */
.option-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 25px 0;
}

.option-pills--equal .option-pill {
    flex: 1;
    text-align: center;
}

.option-pill {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
}

.option-pill--active {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.option-pill--blocked {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f4f4f4;
}

/* ==========================================================================
   Круглі кольори (Color Circles)
   ========================================================================== */
.option-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 25px;
}

.option-circle__wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px;
    text-align: center;
}

.option-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 2px;
    background: none;
    cursor: pointer;
    transition: all 0.2s;
}

.option-circle--active {
    border-color: #007bff;
}

.circle-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid #ccc;
}

.color-picker-trigger__rainbow {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
}

.option-circle__label {
    font-size: 10px;
    margin-top: 5px;
    color: #666;
    line-height: 1.2;
}

.option-circle__hex {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid #ccc;
}

/* ==========================================================================
   Картки з формами та зображеннями (Option Cards & SVG)
   ========================================================================== */
.option-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 25px;
}

.option-card {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    background: #fff;
    text-align: center;
    width: 120px;
}

.option-card--active {
    border-color: #007bff;
    background-color: #f8fbff;
}

.card-placeholder {
    width: 100%;
    height: 60px;
    background: #eee;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 12px;
    text-align: center;
    padding: 5px;
    box-sizing: border-box;
}

.shape-icon {
    width: 100%;
    height: 60px;
    display: block;
    margin: 0 auto;
}

.shape-icon__book, .shape-icon__window {
    transition: fill 0.2s, stroke 0.2s;
}

.option-card--active .shape-icon__book {
    fill: #e8f0fe;
    stroke: #007bff;
}

.option-card--active .shape-icon__window {
    fill: #fff;
    stroke: #007bff;
}

.option-card--blocked {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

/* ==========================================================================
   Вибір розташування (Placement Selector)
   ========================================================================== */
.placement {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 25px;
}

.placement__cover {
    position: relative;
    width: 160px;
    height: 220px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 4px;
}

.placement__spot {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.2s;
}

.placement__spot--active {
    background: #007bff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
}

.placement__spot--disabled {
    border-color: #ccc;
    background: #f4f4f4;
    cursor: not-allowed;
}

.placement__status {
    font-size: 14px;
}

.placement__status-value {
    font-weight: bold;
}

/* ==========================================================================
   Степер та повзунок (Range Slider)
   ========================================================================== */
.step {
    display: flex;
    align-items: center;
    gap: 15px;
}

.step__btn {
    width: 30px;
    height: 30px;
    background: #eee;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.step__value {
    width: 30px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}

.step__range {
    width: 100%;
    cursor: pointer;
}

/* ==========================================================================
   КРОК 7 - Текстові плитки, Посилання та Завантаження файлів
   ========================================================================== */
.text-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 25px;
}

.text-tile {
    border: 2px solid #ddd;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.text-tile--checked {
    border-color: #007bff;
    background-color: #f8fbff;
}

.text-tile__name {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.text-tile__divider {
    height: 1px;
    background: #eee;
    width: 100%;
}

.text-tile__desc {
    font-size: 12px;
    color: #666;
}

.client-link-field {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.client-link-field__label {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.client-link-field__input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.client-link-field__input:focus {
    border-color: #007bff;
    outline: none;
}

.client-link-field__hint {
    font-size: 12px;
    color: #666;
}

.upload-dock {
    margin-top: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.upload-dock__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 20px;
    background: #f4f4f4;
    border: none;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    text-align: left;
}

.upload-dock__caption {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upload-dock__caption-main {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    color: #333;
    letter-spacing: 0.5px;
}

.upload-dock__caption-sub {
    font-size: 12px;
    color: #666;
}

.upload-dock__body {
    padding: 20px;
    background: #fff;
}

.photo-upload__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.photo-upload__button {
    width: 100%;
    aspect-ratio: 1;
    border: 2px dashed #ccc;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.photo-upload__button:hover {
    border-color: #007bff;
    background: #f8fbff;
}

.photo-upload__add {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #666;
}

.photo-upload__add-text {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.photo-upload__add-hint {
    font-size: 11px;
    text-align: center;
    padding: 0 10px;
}

/* ==========================================================================
   КРОК 8 - Текстові поля (Textarea)
   ========================================================================== */
.option-text__input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    resize: vertical;
    margin-top: 10px;
}

.option-text__input:focus {
    outline: none;
    border-color: #007bff;
}

.option-text__counter {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* Інші текстові підказки */
.value-note {
    font-size: 12px;
    color: #666;
    margin-top: -15px;
    margin-bottom: 20px;
}

/* ==========================================================================
   Футер навігації вкладок (Назад / Далі)
   ========================================================================== */
.configurator__left-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.configurator__left-footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.configurator__left-footer-nav-info {
    flex: 1;
    font-size: 12px;
    color: #666;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.btn-back, .btn-next {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    background: #007bff;
    color: white;
}

.btn-back {
    background: #6c757d;
}

.btn-back:hover {
    background: #5a6268;
}

.btn-next:hover {
    background: #0056b3;
}
