/* ================================
   Pdev Flexible Product Fields – FRONT
   ================================ */


/* Wersja z domyślną ramką (default_style = 1) */
.pdev-ff-wrapper--boxed {
    padding: 16px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #fafafa;
}

/* Tytuł "Dodatkowe opcje" */
.pdev-ff-wrapper > h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

/* Tytuł grupy (jeśli nie używasz akordeonu) */
.pdev-ff-group-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
}

/* Pojedyncze pole */
.pdev-ff-field {
    margin: 0 0 10px;
}

/* Label z gwiazdką, itd. */
.pdev-ff-field label strong {
    font-weight: 600;
}

/* Gwiazdka wymagania */
.pdev-ff-required {
    color: #d63638; /* WordPressowy czerwony */
}

/* Inputy / textarea – pełna szerokość */
.pdev-ff-input,
.pdev-ff-text,
.pdev-ff-textarea {
    width: 100%;
    max-width: 100%;
}

/* Podstawowe dostosowanie selecta (masz klasę mc-select na select) */
.pdev-ff-wrapper select.mc-select {
    width: 100%;
    max-width: 100%;
}

/* Checkbox i radio – trochę odstępu */
.pdev-ff-field input[type="checkbox"],
.pdev-ff-field input[type="radio"] {
    margin-right: 4px;
}

/* ================================
   Box z podsumowaniem "Twoje dodatki"
   ================================ */

.pdev-ff-summary-box {
    margin-top: 14px;
}

/* Wersja z ramką (default_style = 1) */
.pdev-ff-summary-box--boxed {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
}

/* Nagłówek "Twoje dodatki" */
.pdev-ff-summary-box > strong {
    display: block;
    margin-bottom: 6px;
}

/* Lista dodatków */
.pdev-ff-summary-list {
    margin: 0 0 4px 18px;
    padding: 0;
    list-style: disc;
}

/* Pojedyncza pozycja na liście */
.pdev-ff-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 2px;
}

/* Tekst "Etykieta: wartość" */
.pdev-ff-summary-item-label {
    flex: 1 1 auto;
}

/* Cena dopłaty po prawej */
.pdev-ff-summary-item-price {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 600;
}

/* Łączna dopłata */
.pdev-ff-summary-total {
    margin: 6px 0 0;
    font-weight: 700;
}


/* ================================
   Responsywność (prosty tweak)
   ================================ */

@media (max-width: 480px) {
    .pdev-ff-wrapper--boxed {
        padding: 10px 12px;
    }

    .pdev-ff-summary-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .pdev-ff-summary-item-price {
        margin-left: 0;
    }
}
    .pdev-ff-accordion {
        --bs-accordion-bg: transparent !important;
        --bs-accordion-border-color: none !important;
    }

    /* Kontener pojedynczej opcji */
    .pdev_ff_radio_type {
        position: relative;
        display: inline-flex;
        align-items: center;
        margin: 4px 6px 4px 0;
        cursor: pointer;
        font-size: 0.7rem;
    }

    /* Ukrywamy natywne kółko radia */
    .pdev_ff_radio_type input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    /* „Pigułka” z tekstem */
    .pdev_ff_radio_type span {
        display: inline-flex;
        align-items: center;
        padding: 6px 12px;
        border-radius: 999px;
        border: 1px solid #d1d5db;
        background-color: #f9fafb;
        color: #111827;
        white-space: nowrap;
        transition:
            background-color 0.15s ease,
            border-color 0.15s ease,
            color 0.15s ease,
            box-shadow 0.15s ease,
            transform 0.1s ease;
    }

    /* Hover */
    .pdev_ff_radio_type:hover span {
        border-color: #2563eb;
        box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
        transform: translateY(-1px);
    }

    /* Zaznaczone */
    .pdev_ff_radio_type input[type="radio"]:checked+span {
        background-color: #2563eb;
        border-color: #2563eb;
        color: #ffffff;
        box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
    }

    /* Focus z klawiatury */
    .pdev_ff_radio_type input[type="radio"]:focus-visible+span {
        outline: 2px solid #2563eb;
        outline-offset: 2px;
    }

    /* Mobile */
    @media (max-width: 640px) {
        .pdev_ff_radio_type {
            font-size: 13px;
        }

        .pdev_ff_radio_type span {
            padding: 4px 10px;
        }
    }

    /* SELECT – niedostępne opcje */
    .pdev-ff-option--disabled {
        color: #9ca3af;
        font-style: italic;
    }

    /* RADIO – niedostępne „pigułki” */
    .pdev_ff_radio_type--disabled span {
        opacity: 0.5;
        cursor: not-allowed;
        text-decoration: line-through;
    }

    /* Żeby kliknięcie nie wyglądało jak aktywne */
    .pdev_ff_radio_type--disabled:hover span {
        box-shadow: none;
        transform: none;
    }

    .pdev-ff-field-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .pdev-ff-field-label-text {
        flex: 1 1 auto;
    }

    .pdev-ff-base-extra {
        margin-left: 8px;
        white-space: nowrap;
        /* żeby +10,00 zł nie łamało się w dół */
        font-weight: 200;
        opacity: 0.9;
        color: #527e00ff;
        font-size: 0.85rem;
    }

    .dropdown-item.active .mc-option-extra {
       
    }
    .mc-dropdown-label-extra,
    .mc-option-extra {
        margin-left: 8px;
        white-space: nowrap;
        /* żeby +10,00 zł nie łamało się w dół */
        font-weight: 400;
        opacity: 0.9;
        font-size: 0.85rem;
    }

    /* Ukrywamy techniczne pole "mockup" – klient go nie widzi */
.pdev-ff-field[data-pdev-ff-field-name="mockup"] {
    display: none !important;
}

/* Panel mockupu */
.pdev-mockup-panel {
    margin-top: 15px;
    padding: 12px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    display: none; /* pokażemy JS-em */
}

.pdev-mockup-panel h5 {
    margin-top: 0;
    margin-bottom: 8px;
}

.pdev-mockup-canvas {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 3 / 2; /* proporcje kartki, zmień jak chcesz */
    margin-bottom: 10px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
}

/* Obrazek z logiem klienta na kartce */
.pdev-mockup-upload {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    transform: translate(-50%, -50%) scale(1);
    max-width: 80%;
    max-height: 80%;
    pointer-events: none; /* sterujemy sliderami, nie drag&drop na razie */
}

.pdev-mockup-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 400px;
}

.pdev-mockup-controls label {
    font-size: 13px;
}

.pdev-mockup-controls input[type="range"] {
    width: 100%;
}
/* Mockup – responsywny canvas w accordionie */
.pdev-ff-mockup {
    max-width: 100%;
    overflow: hidden;
}

.pdev-ff-mockup-canvas {
    width: 100%;
}

/* Konva generuje swój wrapper .konvajs-content i <canvas> – 
   zmuszamy je do trzymania się szerokości kontenera */
.pdev-ff-mockup .konvajs-content {
    width: 100% !important;
}

.pdev-ff-mockup .konvajs-content canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
}

/* Panel przycisków */
.pdev-ff-mockup-controls {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

/* Dwie linijki przycisków */
.pdev-ff-mockup-controls-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

/* Nadpisanie Woo/tematu dla przycisków TYLKO w mockupie */
.pdev-ff-mockup .button.button-small {
    min-width: 32px;
    height: 32px;
    padding: 0;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #007bff;
    background: #ffffff;
    color: #007bff;
    box-shadow: none;
    cursor: pointer;
}

.pdev-ff-mockup .button.button-small:hover {
    background: #007bff;
    color: #ffffff;
}

/* Podpowiedź pod przyciskami */
.pdev-ff-mockup-hint {
    display: block;
    width: 100%;
    font-size: 12px;
    color: #666;
    text-align: center;
    margin: 0;
}
