/* ============================================================
   PLIK: assets/css/mce-style.css
   Style dla Widgetu Magicznej Wysyłki i Formularza
============================================================ */

:root {
    /* --- KOLORY GŁÓWNE (PALETA EZOTERYCZNA) --- */
    --lunaria-primary: #5e2a84;       /* Głęboki fiolet */
    --lunaria-primary-dark: #4b2c68;  /* Bardzo ciemny fiolet */
    --lunaria-secondary: #8e44ad;     /* Klasyczny fiolet */
    --lunaria-accent: #9b59b6;        /* Ametyst */
    --lunaria-highlight: #b05fa7;     /* Orchidea */
    --lunaria-fire: #c0392b;          /* Czerwień/Rdza */

    /* --- TŁA I NEUTRALNE --- */
    --lunaria-bg-white: #ffffff;
    --lunaria-bg-off-white: #f9f7fc;
    --lunaria-bg-hover: #fcfaff;
    
    /* --- TEKST --- */
    --lunaria-text-main: #333333;
    --lunaria-text-secondary: #4a4a4a;
    --lunaria-text-muted: #555555;

    /* --- OBRAMOWANIA --- */
    --lunaria-border-light: #e1e1e1;
    --lunaria-border-menu: #f0f0f5;
    
    /* --- GRADIENTY --- */
    --lunaria-gradient-magic: linear-gradient(135deg, var(--lunaria-primary-dark) 0%, var(--lunaria-secondary) 50%, var(--lunaria-fire) 100%);
    
    /* --- CIENIE --- */
    --lunaria-shadow-subtle: 0 5px 15px rgba(0, 0, 0, 0.08);
    --lunaria-shadow-glow: 0 8px 15px rgba(94, 42, 132, 0.1);
}

/* ========================================
   GŁÓWNY KONTENER WIDGETU
======================================== */
.mce-shipping-widget {
    background: #ffffff;
    border: 1px solid var(--lunaria-border-light);
    border-radius: 12px;
    padding: 0;
    margin: 20px 0;
    box-shadow: var(--lunaria-shadow-subtle);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.mce-shipping-widget:hover {
    box-shadow: var(--lunaria-shadow-glow);
}

/* ========================================
   1. NAGŁÓWEK PRODUKTU (Układ Pionowy)
======================================== */
.mce-product-header {
    display: flex;
    flex-direction: column; /* Układa elementy jeden pod drugim */
    align-items: center;    /* Centruje wszystko */
    justify-content: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--lunaria-border-light, #e1e1e1);
    padding-top: 15px;
    gap: 8px; /* Odstęp między etykietą, ceną a stanem */
}

/* Etykieta "Promocja" */
.mce-price-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--lunaria-text-muted, #999);
    font-weight: 700;
    margin: 0;
}

/* Kontener Ceny (Stara + Nowa obok siebie) */
.mce-main-price {
    display: flex;
    align-items: baseline; /* Wyrównuje ceny do dołu tekstu */
    justify-content: center;
    gap: 12px; /* Odstęp między starą a nową ceną */
    line-height: 1;
    margin: 5px 0 10px 0; /* Dodatkowy margines góra/dół dla ceny */
}

/* STARA CENA (Przekreślona) */
.mce-main-price del {
    color: #999;
    font-size: 16px; /* Mniejsza czcionka */
    text-decoration: line-through !important; /* Wymuszenie przekreślenia */
    opacity: 0.8;
    font-weight: 400;
    display: inline-block; /* Naprawia ucinanie w niektórych motywach */
}

/* Usunięcie domyślnego rozmycia opacity z WooCommerce */
.mce-main-price del .woocommerce-Price-amount {
    opacity: 1; 
}

/* NOWA CENA (Duża i Kolorowa) */
.mce-main-price ins {
    text-decoration: none;
    background: transparent;
}

.mce-main-price ins .woocommerce-Price-amount,
.mce-main-price .woocommerce-Price-amount bdi {
    font-size: 32px; /* Duża, wyraźna cena */
    font-weight: 800;
    
    /* Magiczny gradient na cenie */
    background: var(--lunaria-gradient-magic, linear-gradient(135deg, #4b2c68, #c0392b));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Symbol waluty dla nowej ceny */
.mce-main-price ins .woocommerce-Price-currencySymbol {
    color: var(--lunaria-primary-dark, #4b2c68);
    -webkit-text-fill-color: initial;
    font-size: 0.7em; /* Symbol waluty nieco mniejszy */
    vertical-align: super;
}

/* Kapsułka stanu magazynowego (Osobna linia) */
.mce-stock-pill {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-top: 5px; /* Dodatkowy odstęp od ceny */
}

/* Warianty kapsułki */
.mce-stock-ok {
    background: var(--lunaria-bg-off-white, #f9f7fc);
    color: var(--lunaria-secondary, #8e44ad);
    border: 1px solid var(--lunaria-highlight, #b05fa7);
}

.mce-stock-low {
    background: #fff5f5; 
    color: var(--lunaria-fire, #c0392b);
    border: 1px solid var(--lunaria-fire, #c0392b);
    box-shadow: 0 2px 5px rgba(192, 57, 43, 0.15);
}

/* ========================================
   2. BANNER CZASOWY I PASEK
======================================== */
.mce-timer-banner {
    background: var(--lunaria-bg-off-white);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid var(--lunaria-border-light);
    font-size: 13px;
    color: var(--lunaria-text-secondary);
}

.mce-timer-text strong {
    color: var(--lunaria-fire);
    font-weight: 800;
}

.mce-shipping-header {
    padding: 20px 20px 10px 20px;
    text-align: center;
}

.mce-promo-text {
    font-size: 14px;
    color: var(--lunaria-text-secondary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.mce-promo-text strong {
    color: var(--lunaria-primary);
}

.mce-promo-text.mce-success strong {
    color: #27ae60;
}

.mce-progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #f0f0f5;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.mce-progress-bar-fill {
    height: 100%;
    background: var(--lunaria-gradient-magic);
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(142, 68, 173, 0.5);
}

/* ========================================
   3. LISTA METOD WYSYŁKI (Wersja Informacyjna)
======================================== */
.mce-shipping-groups {
    padding: 10px;    
    width: 100%;
}

.mce-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* Pojedynczy wiersz metody */
.mce-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    padding: 12px 15px;
    /* Nieco więcej oddechu */
    border-radius: 8px;
    color: var(--lunaria-text-main);

    /* ZMIANA: Stała, szara ramka dla wszystkich */
    background: #fff;
    border: 1px solid var(--lunaria-border-light, #e1e1e1);

    /* Wyłączenie wrażenia klikalności */
    cursor: default;
    transition: none;
    /* Brak animacji przy najechaniu */
}

/* Usunięcie efektów Hover */
.mce-item:hover {
    background: #fff;
    border-color: var(--lunaria-border-light, #e1e1e1);
    /* Ramka nie zmienia koloru */
    box-shadow: none;
    transform: none;
}

/* Wyróżnienie tańszych metod (Tylko tło, bez akcji) */
.mce-item.mce-highlight {
    background-color: #fbf6ff;
    /* Bardzo jasny fiolet */
    border-color: rgba(142, 68, 173, 0.2);
    /* Nieco ciemniejsza ramka dla wyróżnionych */
}

/* Etykieta daty i ceny pozostają bez zmian */
.mce-method-name {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.mce-price {
    font-weight: 700;
    color: var(--lunaria-text-secondary);
    white-space: nowrap;
    /* Cena nie spadnie do nowej linii */
}

/* ========================================
   4. KLUB EZOTERYCZNY
======================================== */
.mce-club-box {
    margin: 20px;
    background: linear-gradient(135deg, var(--lunaria-secondary), var(--lunaria-primary-dark));
    border-radius: 12px;
    padding: 18px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(94, 42, 132, 0.25);
}

.mce-club-box::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg);
    animation: shine 3s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.mce-club-content {
    display: flex; align-items: center; gap: 12px; z-index: 1;
}

.mce-club-icon {
    font-size: 26px;
    background: rgba(255, 255, 255, 0.15);
    width: 45px; height: 45px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

.mce-club-text {
    display: flex; flex-direction: column; font-size: 12px; line-height: 1.3;
}

.mce-club-text strong {
    font-size: 14px; margin-bottom: 3px; color: #fff;
}

.mce-club-btn {
    background: white;
    color: var(--lunaria-primary);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 13px; font-weight: 800;
    text-decoration: none; white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.mce-club-btn:hover {
    transform: scale(1.05);
    color: var(--lunaria-primary-dark);
}

/* ========================================
   5. FORMULARZ I PPOM (Naprawy i Style)
======================================== */
.mce-form-container {
    padding: 0 20px 20px 20px;
}

/* Nagłówek Intencji */
.mce-ppom-wrapper label[for="intencja"] {
    font-size: 0 !important;
    display: block; margin-bottom: 10px;
}
.mce-ppom-wrapper label[for="intencja"]::after {
    content: "Czy chcesz dodać intencję?";
    font-size: 15px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 15px; margin-top: 10px;
    background: var(--lunaria-gradient-magic);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #5e2a84;
    text-align: center; display: block;
}

/* Przyciski Radio TAK/NIE */
.ppom-input-intencja {
    display: flex; flex-direction: column !important; gap: 12px;
}
.ppom-input-intencja .form-check {
    margin: 0 !important; padding: 0 !important; width: 100%;
}
.ppom-input-intencja input[type="radio"] { display: none; }

.ppom-input-intencja label.form-check-label {
    display: flex; justify-content: center; align-items: center;
    width: 100%; padding: 16px 20px;
    background: #fff;
    border: 1px solid var(--lunaria-border-light, #e1e1e1);
    border-radius: 50px;
    font-size: 14px !important; font-weight: 600;
    color: var(--lunaria-text-secondary, #555);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.ppom-input-intencja label.form-check-label:hover {
    border-color: var(--lunaria-secondary);
}

/* Stan zaznaczony TAK/NIE */
.ppom-input-intencja .form-check:has(input:checked) label.form-check-label {
    background: var(--lunaria-primary, #5e2a84);
    color: #fff !important;
    border-color: var(--lunaria-primary);
    box-shadow: 0 8px 20px rgba(94, 42, 132, 0.3);
    transform: translateY(-2px);
}

/* Lista intencji (Kafelki) */
.ppom-field-wrapper.czy_doda__intencje_ {
    display: none; padding-top: 10px;
    border-top: 1px dashed var(--lunaria-border-light);
    margin-top: 10px;
    animation: fadeInSlide 0.4s ease forwards;
}
@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ppom-input-czy_doda__intencje_ .form-check-inline {
    display: block !important; margin: 0 0 8px 0 !important; padding: 0 !important;
}
.ppom-input-czy_doda__intencje_ input[type="checkbox"] { display: none; }

.ppom-input-czy_doda__intencje_ label.form-check-label {
    display: flex !important; justify-content: space-between; align-items: center;
    width: 100%; padding: 12px 15px;
    background: #fff;
    border: 1px solid var(--lunaria-border-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px !important;
    color: var(--lunaria-text-main);
    transition: all 0.2s ease;
}

/* Zaznaczona intencja */
.ppom-input-czy_doda__intencje_ .form-check-inline:has(input:checked) label.form-check-label {
    border-color: var(--lunaria-secondary);
    background: #fdfaff;
    color: var(--lunaria-primary-dark);
    box-shadow: inset 0 0 0 1px var(--lunaria-secondary);
}

.ppom-option-label-price {
    font-weight: 700; color: var(--lunaria-secondary);
    background: var(--lunaria-bg-off-white);
    padding: 2px 8px; border-radius: 4px; font-size: 11px;
}

/* ========================================
   6. AKCJE KOSZYKA (Stylizacja Twojego HTML)
======================================== */

.mce-action-row {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Odstęp między ilością a przyciskiem */
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f5;
}

/* --- KONTENER ILOŚCI (Pigułka) --- */
.mce-quantity-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 140px;
    /* Stała szerokość */
    height: 54px;
    /* Wysokość pigułki */

    background: #ffffff;
    border: 1px solid var(--lunaria-border-light, #ddd);
    border-radius: 50px;
    /* Zaokrąglenie */
    overflow: hidden;
    /* Ważne: przycina dzieci do kształtu pigułki */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: border-color 0.3s;
}

.mce-quantity-wrapper:hover {
    border-color: var(--lunaria-secondary, #8e44ad);
}

/* --- PRZYCISKI PLUS / MINUS --- */
.mce-qty-btn {
    width: 45px;
    /* Szerokość strefy kliknięcia */
    height: 100%;
    /* Na pełną wysokość */
    background: transparent;
    border: none;
    color: var(--lunaria-primary, #5e2a84);
    font-size: 20px;
    font-weight: 400;
    /* Lżejszy font wygląda nowocześniej */
    cursor: pointer;

    /* Centrowanie znaku */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 3px 0;
    /* Lekka korekta optyczna znaku w pionie */

    transition: background 0.2s, color 0.2s;
}

.mce-qty-btn:hover {
    background: #f9f7fc;
    color: var(--lunaria-fire, #c0392b);
}

/* --- INPUT (Liczba w środku) --- */
/* Targetujemy input bardzo precyzyjnie, żeby nadpisać style motywu */
.mce-quantity-wrapper input.input-text.qty {
    flex-grow: 1;
    /* Wypełnij środek */
    width: auto !important;
    height: 100% !important;
    border: none !important;
    /* Usuwamy ramkę */
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;

    text-align: center;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--lunaria-text-main, #333) !important;

    /* Ukrywamy standardowe strzałki w Firefox */
    -moz-appearance: textfield;
}

/* Ukrywamy strzałki w Chrome/Safari/Edge */
.mce-quantity-wrapper input.qty::-webkit-inner-spin-button,
.mce-quantity-wrapper input.qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Usuwamy outline przy kliknięciu */
.mce-quantity-wrapper input.qty:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* --- PRZYCISK DODAJ DO KOSZYKA --- */
button.mce-btn-add {
    flex-grow: 1;
    /* Zajmij resztę miejsca w rzędzie */
    height: 54px;
    /* Ta sama wysokość co ilość */

    border-radius: 50px;
    border: none;

    /* Magiczny gradient */
    background: var(--lunaria-gradient-magic, linear-gradient(135deg, #4b2c68, #c0392b));
    background-size: 200% auto;

    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;

    box-shadow: 0 8px 20px rgba(94, 42, 132, 0.25);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Flex dla ikonki i tekstu */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button.mce-btn-add:hover {
    background-position: right center;
    /* Animacja gradientu */
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(142, 68, 173, 0.4);
}

.mce-cart-icon {
    font-size: 18px;
    margin-top: -2px;
}

/* --- RESPONSYWNOŚĆ (Telefon) --- */
@media (max-width: 480px) {
    .mce-action-row {
        flex-direction: column;
        /* Jeden pod drugim */
        align-items: stretch;
    }

    .mce-quantity-wrapper {
        width: 100%;
        /* Pigułka na całą szerokość */
    }

    button.mce-btn-add {
        width: 100%;
    }
}

/* ========================================
   7. ZAKŁADKI METOD WYSYŁKI (Pełna szerokość)
======================================== */

.mce-shipping-title {
    text-align: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--lunaria-text-muted);
    margin: 20px 0 10px 0;
    font-weight: 700;
}

.mce-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 5px;
    /* Mniejszy odstęp między guzikami */

    /* Rozciągnięcie na pełną szerokość */
    margin-left: auto;
    margin-right:auto;
    width: 95%;

    padding: 10px;
    background: #f0f0f5;
    border-radius: 50px;
    box-sizing: border-box;
    /* Ważne, żeby padding nie rozepchał */
}

.mce-tab-btn {
    flex: 1;
    /* Każdy przycisk zajmuje 50% */
    border: none;
    background: transparent;
    padding: 10px 0;
    /* Większe pole */
    border-radius: 40px;
    font-size: 13px;
    /* Nieco większa czcionka */
    font-weight: 600;
    color: var(--lunaria-text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.mce-tab-btn.active {
    background: #fff;
    color: var(--lunaria-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 700;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Usuwamy stare nagłówki h5, bo teraz zakładki pełnią tę rolę */
.mce-group-title {
    display: none;
}

/* ========================================
   8. DISCLAIMER (Stopka informacyjna)
======================================== */
.mce-shipping-disclaimer {
    margin-top: 15px;
    margin-bottom: 5px;
    padding: 10px 15px;
    background: #fcfaff;
    /* Bardzo jasne tło */
    border-radius: 8px;
    border: 1px dashed var(--lunaria-border-light);

    display: flex;
    gap: 10px;
    align-items: flex-start;

    font-size: 11px;
    line-height: 1.5;
    color: var(--lunaria-text-muted);
    text-align: left;
}

.mce-disclaimer-icon {
    font-size: 14px;
    margin-top: 1px;
    /* Wyrównanie z pierwszą linią tekstu */
}