/* Kwizoo WooCommerce Styles */
body.woocommerce-page {
    font-family: 'Nunito Sans', sans-serif;
    color: #2C2C2A;
}

.woo-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 32px 80px;
    overflow-x: hidden;
}

#primary,
#main {
    overflow-x: hidden;
    min-width: 0;
}

/* Przyciski */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button {
    background: #ED93B1 !important;
    color: #4B1528 !important;
    border: none !important;
    border-radius: 16px !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    padding: 10px 18px !important;
    cursor: pointer;
    font-size: 14px !important;
    text-decoration: none !important;
}
.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover {
    background: #D4537E !important;
    color: #FBEAF0 !important;
}
.woocommerce .button.alt,
.woocommerce button.button.alt,
.woocommerce #place_order {
    background: #5DCAA5 !important;
    color: #085041 !important;
}
.woocommerce .button.alt:hover,
.woocommerce #place_order:hover {
    background: #1D9E75 !important;
    color: #E1F5EE !important;
}

/* Formularze */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="password"],
.woocommerce input[type="tel"] {
    border: 0.5px solid #D3D1C7 !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    font-family: 'Nunito Sans', sans-serif !important;
    font-size: 15px !important;
    width: 100%;
    background: #fff !important;
    box-sizing: border-box !important;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce input:focus {
    border-color: #5DCAA5 !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(93,202,165,0.15) !important;
}

/* Tytuły */
.woocommerce div.product .product_title,
.woocommerce-account h2,
.woocommerce-cart h2,
.woocommerce-checkout h3 {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 800 !important;
    font-size: 28px !important;
    color: #2C2C2A !important;
    margin-bottom: 16px !important;
}

/* Ceny */
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce .price {
    color: #0F6E56 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    font-family: 'Nunito', sans-serif !important;
}

/* Layout Moje konto */
.woocommerce-MyAccount-navigation {
    width: 200px !important;
    float: left !important;
}
.woocommerce-MyAccount-content {
    float: right !important;
    width: calc(100% - 240px) !important;
    overflow-x: hidden !important;
    min-width: 0 !important;
}

/* Clearfix */
.woocommerce-account .woocommerce::after {
    content: '';
    display: table;
    clear: both;
}

/* WP Swings wrapper */
.wps_sfw_account_wrap,
.wps_sfw_account_additional_wrap {
    overflow: hidden !important;
    overflow-x: hidden !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Tabela subskrypcji - 6 kolumn: ID, Zamówienie, Status, Następna płatność, Łącznie, Akcja */
.woocommerce table.shop_table {
    border: 0.5px solid #D3D1C7 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    border-collapse: separate !important;
    width: 100% !important;
    table-layout: fixed !important;
    max-width: 100% !important;
}

/* Szerokości kolumn subskrypcji */
.woocommerce table.shop_table th:nth-child(1),
.woocommerce table.shop_table td:nth-child(1) { width: 8% !important; }   /* ID */
.woocommerce table.shop_table th:nth-child(2),
.woocommerce table.shop_table td:nth-child(2) { width: 18% !important; }  /* Zamówienie */
.woocommerce table.shop_table th:nth-child(3),
.woocommerce table.shop_table td:nth-child(3) { width: 16% !important; }  /* Status */
.woocommerce table.shop_table th:nth-child(4),
.woocommerce table.shop_table td:nth-child(4) { width: 22% !important; }  /* Następna płatność */
.woocommerce table.shop_table th:nth-child(5),
.woocommerce table.shop_table td:nth-child(5) { width: 20% !important; }  /* Łącznie */
.woocommerce table.shop_table th:nth-child(6),
.woocommerce table.shop_table td:nth-child(6) { width: 16% !important; }  /* Akcja */

.woocommerce table.shop_table th {
    background: #F1EFE8 !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 12px 8px !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: hidden !important;
}
.woocommerce table.shop_table td {
    padding: 12px 8px !important;
    font-size: 13px !important;
    border-top: 0.5px solid #E8E6DF !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: hidden !important;
}

/* Ukryj ikonki pluginu */
.woocommerce-info::before,
.wps-icon,
.wps-sfw-icon {
    display: none !important;
}

/* Wiadomości info */
.woocommerce-info {
    border-top: 4px solid #5DCAA5 !important;
    background: #E1F5EE !important;
    color: #085041 !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    font-size: 15px !important;
    list-style: none !important;
    margin-left: 0 !important;
}

/* Moje konto nawigacja */
.woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.woocommerce-MyAccount-navigation ul li {
    margin-bottom: 4px !important;
}
.woocommerce-MyAccount-navigation ul li a {
    display: block !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    color: #2C2C2A !important;
    text-decoration: none !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    transition: all 0.15s !important;
}
.woocommerce-MyAccount-navigation ul li a:hover {
    background: #E1F5EE !important;
    color: #0F6E56 !important;
}
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: #5DCAA5 !important;
    color: #fff !important;
}

/* Płatności */
.woocommerce #payment {
    background: #F1EFE8 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    border: none !important;
}

/* Powiadomienia */
.woocommerce-notices-wrapper .woocommerce-message {
    border-top: 4px solid #5DCAA5 !important;
    background: #E1F5EE !important;
    color: #085041 !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
    font-size: 15px !important;
}
.woocommerce-notices-wrapper .woocommerce-error {
    border-top: 4px solid #ED93B1 !important;
    background: #FBEAF0 !important;
    color: #993556 !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    margin-bottom: 20px !important;
}

/* Breadcrumbs */
.woocommerce-breadcrumb {
    font-size: 13px !important;
    color: #5F5E5A !important;
    margin-bottom: 24px !important;
}
.woocommerce-breadcrumb a {
    color: #5DCAA5 !important;
    text-decoration: none !important;
}

/* Checkout */
.woocommerce-checkout .form-row label {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    color: #2C2C2A !important;
}

/* Opis produktu */
.woocommerce-product-details__short-description {
    font-size: 16px !important;
    line-height: 1.7 !important;
    color: #5F5E5A !important;
}

/* Kategorie */
.posted_in {
    font-size: 13px !important;
    color: #5F5E5A !important;
}
.posted_in a {
    color: #5DCAA5 !important;
}


/* Przycisk Back - strzałka w stylu Kwizoo */
.woocommerce-MyAccount-content a.wps_sfw_back_button,
.woocommerce-MyAccount-content a[href*="subscriptions"],
.woocommerce .wps_sfw_back_button,
.wps_sfw_back_button {
    display: none !important;
}

/* Nadpisz "Back" na strzałkę przez JS w functions.php */
.kwizoo-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #F1EFE8 !important;
    color: #2C2C2A !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 8px 16px 8px 12px !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.15s !important;
    margin-bottom: 20px !important;
}
.kwizoo-back-btn:hover {
    background: #E1F5EE !important;
    color: #0F6E56 !important;
}

/* Mobile */
@media (max-width: 600px) {
    .woo-wrap {
        padding: 24px 16px 60px !important;
    }
    .woocommerce-MyAccount-navigation {
        width: 100% !important;
        float: none !important;
        margin-bottom: 24px !important;
    }
    .woocommerce-MyAccount-content {
        width: 100% !important;
        float: none !important;
    }
    .woocommerce table.shop_table th,
    .woocommerce table.shop_table td {
        padding: 8px 6px !important;
        font-size: 12px !important;
    }
    /* Koszyk mobile - stack zamiast tabeli */
    .woocommerce-cart .woocommerce {
        padding: 0 !important;
    }
    .woocommerce table.cart,
    .woocommerce table.cart thead,
    .woocommerce table.cart tbody,
    .woocommerce table.cart tfoot,
    .woocommerce table.cart tr,
    .woocommerce table.cart td,
    .woocommerce table.cart th {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .woocommerce table.cart thead {
        display: none !important;
    }
    .woocommerce table.cart tr {
        border: 0.5px solid #E8E6DF !important;
        border-radius: 12px !important;
        margin-bottom: 12px !important;
        padding: 12px !important;
        background: #fff !important;
    }
    .woocommerce table.cart td {
        border: none !important;
        padding: 6px 0 !important;
        text-align: left !important;
    }
    .woocommerce table.cart td::before {
        content: attr(data-title) ": ";
        font-weight: 700 !important;
        font-family: 'Nunito', sans-serif !important;
        color: #2C2C2A !important;
        display: inline !important;
    }
    .woocommerce table.cart td.product-remove::before,
    .woocommerce table.cart td.product-thumbnail::before {
        display: none !important;
    }
    .woocommerce table.cart td.product-thumbnail img {
        width: 60px !important;
        height: 60px !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }
    /* Podsumowanie koszyka */
    .woocommerce .cart-collaterals,
    .woocommerce .cart_totals {
        width: 100% !important;
        float: none !important;
    }
    .woocommerce table.shop_table {
        table-layout: auto !important;
    }
    .woocommerce table.shop_table th:nth-child(n),
    .woocommerce table.shop_table td:nth-child(n) {
        width: auto !important;
    }
}

/* Fieldset zmiana hasła - usuń ramkę */
.woocommerce fieldset {
    border: none !important;
    padding: 0 !important;
    margin: 0 0 20px !important;
    background: none !important;
}
.woocommerce fieldset legend {
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    color: #2C2C2A !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    float: none !important;
    width: 100% !important;
}

/* ── Ikony SVG w nawigacji konta ────────────────────────────── */
.woocommerce-MyAccount-navigation ul li a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}
.woocommerce-MyAccount-navigation ul li a::before {
    content: '' !important;
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    flex-shrink: 0 !important;
    background-size: 16px 16px !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    opacity: 0.55 !important;
}
.woocommerce-MyAccount-navigation ul li.is-active a::before,
.woocommerce-MyAccount-navigation ul li a:hover::before {
    opacity: 1 !important;
}


/* Dashboard / Kokpit */
.woocommerce-MyAccount-navigation-link--dashboard a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232C2C2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E");
}
.woocommerce-MyAccount-navigation-link--dashboard.is-active a::before,
.woocommerce-MyAccount-navigation-link--dashboard a:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23085041' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3C/svg%3E");
}

/* Zamówienia */
.woocommerce-MyAccount-navigation-link--orders a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232C2C2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E");
}

/* Subskrypcje */
.woocommerce-MyAccount-navigation-link--subscriptions a::before,
.woocommerce-MyAccount-navigation-link--wps-subscriptions a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232C2C2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpolyline points='1 20 1 14 7 14'/%3E%3Cpath d='M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15'/%3E%3C/svg%3E") !important;
}
.woocommerce-MyAccount-navigation-link--subscriptions.is-active a::before,
.woocommerce-MyAccount-navigation-link--subscriptions a:hover::before,
.woocommerce-MyAccount-navigation-link--wps-subscriptions.is-active a::before,
.woocommerce-MyAccount-navigation-link--wps-subscriptions a:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23085041' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='23 4 23 10 17 10'/%3E%3Cpolyline points='1 20 1 14 7 14'/%3E%3Cpath d='M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15'/%3E%3C/svg%3E") !important;
}
.woocommerce-MyAccount-navigation-link--subscriptions.is-active a::before,
.woocommerce-MyAccount-navigation-link--subscriptions a:hover::before,
.woocommerce-MyAccount-navigation-link--wps-subscriptions.is-active a::before,
.woocommerce-MyAccount-navigation-link--wps-subscriptions a:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23085041' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3C/svg%3E") !important;
}

/* Metody płatności */
.woocommerce-MyAccount-navigation-link--payment-methods a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232C2C2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='4' width='22' height='16' rx='2' ry='2'/%3E%3Cline x1='1' y1='10' x2='23' y2='10'/%3E%3C/svg%3E");
}

/* Szczegóły konta / edit-account */
.woocommerce-MyAccount-navigation-link--edit-account a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232C2C2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
.woocommerce-MyAccount-navigation-link--edit-account.is-active a::before,
.woocommerce-MyAccount-navigation-link--edit-account a:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23085041' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

/* Panel szkoły */
.woocommerce-MyAccount-navigation-link--kwizoo-szkola a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232C2C2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E");
}
.woocommerce-MyAccount-navigation-link--kwizoo-szkola.is-active a::before,
.woocommerce-MyAccount-navigation-link--kwizoo-szkola a:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23085041' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E");
}

/* Moje postępy (uczeń) */
.woocommerce-MyAccount-navigation-link--kwizoo-progress a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232C2C2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='20' x2='18' y2='10'/%3E%3Cline x1='12' y1='20' x2='12' y2='4'/%3E%3Cline x1='6' y1='20' x2='6' y2='14'/%3E%3C/svg%3E");
}

/* Graj z klasą (uczeń) */
.woocommerce-MyAccount-navigation-link--kwizoo-multiplayer a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232C2C2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2' width='14' height='20' rx='2'/%3E%3Ccircle cx='12' cy='18' r='1'/%3E%3C/svg%3E");
}

/* Wyloguj */
.woocommerce-MyAccount-navigation-link--customer-logout a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232C2C2A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpolyline points='16 17 21 12 16 7'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3C/svg%3E");
}

/* Ukryj emoji jeśli przypadkowo w tekście menu */
.woocommerce-MyAccount-navigation-link--kwizoo-szkola a,
.woocommerce-MyAccount-navigation-link--kwizoo-progress a,
.woocommerce-MyAccount-navigation-link--kwizoo-multiplayer a {
    font-family: 'Nunito', sans-serif !important;
}

/* Usuń domyślne ikony WP z custom linków w menu konta */
.woocommerce-MyAccount-navigation-link--kwizoo-szkola a,
.woocommerce-MyAccount-navigation-link--kwizoo-progress a,
.woocommerce-MyAccount-navigation-link--kwizoo-multiplayer a {
    font-variant-emoji: text !important;
}
/* Ukryj emoji przez przepisanie jako tekst */
.woocommerce-MyAccount-navigation-link--kwizoo-szkola a *:not(::before),
.woocommerce-MyAccount-navigation-link--kwizoo-progress a *:not(::before),
.woocommerce-MyAccount-navigation-link--kwizoo-multiplayer a *:not(::before) {
    font-family: 'Nunito', sans-serif !important;
}

.woocommerce-breadcrumb { display: none !important; }
