/* ── Strefa klienta: komunikat "wkrótce" (gdy rejestracja wyłączona) ── */
.an-account-coming-soon { max-width: 640px; margin: 80px auto; text-align: center; }
.an-account-coming-soon h1 { font-size: 40px !important; font-family: bodoni-pt-variable, sans-serif !important; font-variation-settings: 'opsz' 56, 'wght' 500 !important; margin: 0 0 20px; line-height: 1.15; }
.an-account-coming-soon p { font-size: 16px; font-family: "Source Sans Pro", sans-serif !important; color: #1D1D1D; line-height: 1.6; margin: 0 0 32px; }
.an-account-coming-soon__link { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-family: "Source Sans Pro", sans-serif !important; color: #1D1D1D; text-decoration: underline; }
.an-account-coming-soon__link:hover { color: #1D1D1D; }
.an-account-coming-soon__link-icon { font-family: 'Theme' !important; font-style: normal; font-weight: normal; font-size: 12px; speak: none; -webkit-font-smoothing: antialiased; line-height: 1; display: inline-block; transition: transform 0.3s ease; }
.an-account-coming-soon__link-icon::before { content: "\e915"; -webkit-text-stroke: 0.25px currentColor; }
.an-account-coming-soon__link:hover .an-account-coming-soon__link-icon { transform: translateX(3px); }

@media (max-width: 600px) {
    .an-account-coming-soon { margin: 50px auto; padding: 0 20px; }
    .an-account-coming-soon h1 { font-size: 30px !important; }
}

/* Logowanie/Rejestracja */

.an-auth-wrap { float: none !important; width: 100% !important; max-width: 400px !important; margin: 60px auto !important; }
.an-auth-header h1 { font-size: 22px !important; font-family: 'Source Sans Pro' !important; font-weight: 700; margin: 0 0 8px; }
.an-auth-header p { font-family: 'Source Sans Pro' !important; font-size: 14px; color: #1D1D1D; margin: 0 0 24px; }
.an-auth-form { background: transparent !important; padding: 0 !important; border: none !important; border-radius: 0 !important; margin-bottom: 0 !important; }
.an-auth-form .form-row { margin: 0 0 15px !important; }
.an-auth-form .form-row label { background: #fff !important; }
.an-auth-form .form-row input.input-text { background: #fff !important; }
.an-auth-wrap .an-auth-password-row.form-row { margin-bottom: 0 !important; }

.an-btn.an-btn--block { display: block; width: 100%; text-align: center; padding: 15px 14px !important; font-size: 15px; box-sizing: border-box; margin-bottom: 0; }
.an-btn.an-btn--solid { font-weight: 400 !important; background: #1D1D1D !important; color: #fff !important; border: 1px solid #1D1D1D !important; border-radius: 0 !important; }
.an-btn.an-btn--solid:hover { background: #000 !important; }
.an-auth-register-link { display: inline-block; margin-top: 16px; padding: 0 !important; }

.an-auth-lost-password { font-size: 13px; margin: 10px 0 20px; }
.an-auth-lost-password a { color: #6F6F6F; text-decoration: underline; }
.an-auth-lost-password a:hover { color: #1D1D1D; }
.an-auth-privacy { font-size: 13px; color: #6F6F6F; margin-top: 20px; }
.an-auth-privacy a { color: #6F6F6F; text-decoration: underline !important; }
.an-auth-privacy a:hover { color: #666; }
.an-auth-note { font-size: 14px; color: #6F6F6F; margin: 0 0 20px; }

.woocommerce-invalid input.input-text, .woocommerce-invalid select { border-color: #dc3545 !important; }
.an-field-error-message { display: block; font-size: 13px; color: #dc3545; margin-top: 6px; }
.an-field-error-generic { font-size: 13px; color: #dc3545; margin: 12px 0 0; }

/* ── Podsumowanie zamówienia (thank you page) ── */
.an-order-confirmation { max-width: 700px; margin: 60px auto; }
.an-order-confirmation__header { text-align: center; margin-bottom: 40px; }
.an-order-confirmation__header h1 { font-size: 32px !important; font-family: bodoni-pt-variable, sans-serif !important; font-variation-settings: 'opsz' 56, 'wght' 500 !important; margin: 0 0 12px; }
.an-order-confirmation__header p { font-family:'Source Sans Pro'; font-size: 15px; color: #1D1D1D; margin: 0; padding: 0 25px; }
.an-order-details__title { font-size: 22px !important; font-family: "Source Sans Pro", sans-serif !important; font-weight: 700; margin: 0 0 20px; }
.an-order-details-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.an-order-details-title-row .an-order-details__title { margin-bottom: 0; }
.an-order-confirmation__notice { display: flex; width: fit-content; align-items: center; flex-direction: row-reverse; gap: 8px; font-size: 13px; margin: 8px auto 28px; padding: 8px 16px; border-radius: 5px; }
.an-order-confirmation__notice--pending { background: #eff6ff; color: #1d4ed8; }
.an-order-confirmation__notice--failed { background: #FEE2E2; color: #B91C1C; }
.an-spinner { width: 14px; height: 14px; border: 2px solid rgba(0, 0, 0, 0.2); border-top-color: currentColor; border-radius: 50%; animation: an-spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes an-spin { to { transform: rotate(360deg); } }

/* ── Skeleton loading przy przełączaniu zakładek ── */
.an-account-layout.an-loading .woocommerce-MyAccount-content { position: relative; pointer-events: none; }
.an-account-layout.an-loading .woocommerce-MyAccount-content > *:not(.an-skeleton) { opacity: 0; }
.an-skeleton { position: absolute; inset: 0; overflow: hidden; }
.an-skel-block { border-radius: 3px; background: linear-gradient(90deg, #e8e8e8 25%, #f2f2f2 37%, #e8e8e8 63%); background-size: 400% 100%; animation: an-skeleton-pulse 1.4s ease-in-out infinite; height: 14px; flex-shrink: 0; }
@keyframes an-skeleton-pulse { 0% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.an-skel-card, form { background: #FBFBFB; border-radius: 5px; padding: 30px; margin-bottom: 24px; }
.an-skel-card:last-child { margin-bottom: 0; }
.an-skel-row { display: flex; align-items: center; gap: 24px; padding: 16px 0; border-bottom: 1px dashed #DEDEDE; min-width: 0; }
.an-skel-row:last-child { border-bottom: none; }
.an-skel-row .an-skel-block { min-width: 0; }
.an-skel-pill { height: 20px; border-radius: 2px; }
.an-skel-btn { height: 28px; margin-left: auto; }
.an-skel-columns { display: flex; gap: 24px; }
.an-skel-columns .an-skel-card { flex: 1; margin-bottom: 0; min-width: 0; }
.an-skel-input { height: 50px; border-radius: 5px; margin-bottom: 28px; }
.an-skel-input:last-of-type { margin-bottom: 24px; }
.an-skel-save-btn { height: 46px; width: 160px; }

/* ── Układ ogólny / typografia ── */
.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content, .an-account-greeting, .an-order-confirmation { font-family: "Source Sans Pro", sans-serif; color: #1D1D1D; }
.an-account-layout { display: flex; gap: 40px; align-items: flex-start; }
.woocommerce-MyAccount-navigation { flex: 0 0 280px; position: relative; }
.woocommerce-MyAccount-content { flex: 1; min-width: 0; }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0; background: #FBFBFB; border-radius: 5px; overflow: hidden; }
.woocommerce-MyAccount-navigation li { margin: 0 20px; border-bottom: 1px solid #DEDEDE; }
.woocommerce-MyAccount-navigation li:last-child { border-bottom: none; }
.woocommerce-MyAccount-navigation li a { display: block; padding: 20px 0; color: #1D1D1D; text-decoration: none; font-size: 15px; }
.woocommerce-MyAccount-navigation li.is-active a { font-weight: 700; }
.woocommerce-MyAccount-navigation li a:hover { color: #666; }

/* ── Powitanie ── */
.an-account-greeting { text-align: center; margin-bottom: 50px; }
.an-account-eyebrow { display: inline-block; font-size: 12px; font-family: "Source Sans Pro", sans-serif !important; text-transform: uppercase; letter-spacing: 0.5px; color: #1D1D1D; margin-bottom: 8px; }
.an-account-greeting h1 { font-size: 32px !important; font-family: bodoni-pt-variable, sans-serif !important; font-variation-settings: 'opsz' 56, 'wght' 500 !important; margin: 0 0 12px; }
.an-account-greeting p { font-size: 15px; font-family: "Source Sans Pro", sans-serif !important; color: #1D1D1D; margin: 0; }

/* ── Karty (Kokpit) ── */
.an-account-card { background: #FBFBFB; border-radius: 5px; padding: 30px; margin-bottom: 24px; }
.an-account-card h2, form h2, .an-orders-wrapper h2 { font-size: 18px !important; font-family: "Source Sans Pro", sans-serif !important; font-weight: 700; margin: 0 0 20px; }
.an-account-columns { display: flex; gap: 24px; }
.an-account-columns .an-account-card { flex: 1; margin-bottom: 0; display: flex; flex-direction: column; }
.an-account-columns address { font-style: normal; font-size: 15px; line-height: 1.7; margin-bottom: 20px; flex: 1; }
.an-account-columns .an-btn { align-self: flex-start; margin-top: auto; }

/* ── Tabela zamówień (Kokpit + zakładka Zamówienia) ── */
.an-orders-table tbody > tr > td, .an-orders-table tbody > tr > th { background: transparent !important; }
.an-orders-table { width: 100%; border-collapse: collapse; }
.an-orders-table th, .an-orders-table td { border: none !important; }
.an-orders-table th { text-align: left; font-size: 13px; font-weight: 400; letter-spacing: 0.3px; color: #1D1D1D; padding: 0 16px 12px 0 !important; border-bottom: 1px solid #DEDEDE !important; }
.an-orders-table td { padding: 16px 16px 16px 0 !important; border-bottom: 1px dashed #DEDEDE !important; font-size: 14px; vertical-align: middle !important; }
.an-orders-table tr:last-child td { border-bottom: none !important; }
.an-orders-table tr[data-href] { cursor: pointer; }
.an-order-link { color: #1D1D1D !important; text-decoration: underline !important; }
.an-order-link:hover { color: #666 !important; }

/* ── Statusy zamówień ── */
.an-order-status { display: inline-block; padding: 4px 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; background: transparent; color: #1D1D1D; border: 1px solid #1D1D1D; }

/* ── Szczegóły zamówienia (view-order) ── */
.an-order-intro { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; margin: 0 0 20px; }
.an-order-details-table .wc-item-meta { list-style: none; margin: 4px 0 0; padding: 0; }
.an-order-details-table .wc-item-meta-label { font-weight: 400; }
.an-order-details-table .wc-item-meta li { font-size: 13px; color: #1D1D1D; line-height: 1.3; }
.an-order-details-table { width: 100%; border-collapse: collapse; }
.an-order-details-table .product-name { width: 70%; }
.an-order-details-table .product-total { width: 30%; white-space: nowrap; }
.an-order-details-table th, .an-order-details-table td { border: none; padding: 16px 0; font-size: 14px; text-align: left; font-weight: 400; }
.an-order-details-table th:last-child, .an-order-details-table td:last-child { text-align: right; }
.an-order-details-table tbody tr { border-bottom: 1px dashed #DEDEDE; }
.an-order-details-table tbody tr:last-child { border-bottom: 1px solid #DEDEDE; }
.an-order-details-table tbody > tr > td, .an-order-details-table tbody > tr > th { background: transparent !important; }
.an-order-details-table .product-name a { color: #1D1D1D; }
.an-order-details-table .product-quantity { font-weight: 400; }
.an-order-details-table tfoot td { white-space: nowrap; }
.an-order-details-table tfoot tr.an-order-total-row--subtotal th, .an-order-details-table tfoot tr.an-order-total-row--subtotal td { font-weight: 700; }
.an-order-details-table tfoot tr.an-order-total-row--subtotal td small { font-weight: 400; }
.an-order-details-table tfoot tr.an-order-total-row--grand th, .an-order-details-table tfoot tr.an-order-total-row--grand td { border-top: 1px solid #DEDEDE; font-weight: 700; font-size: 16px; padding-top: 16px; }
.an-btn--solid { background: #1D1D1D; color: #fff !important; padding: 10px 15px; font-size: 14px; font-weight: 400; text-decoration: none !important; }
.an-btn--solid:hover { background: #000; color: #fff !important; }
.an-order-note-label { display: block; font-weight: 700; margin-bottom: 6px; }
.an-order-note-text { display: block; }
.an-order-details-table tr.an-order-note-row td { text-align: left !important; }
.order-again a.button,
.woocommerce-MyAccount-content .woocommerce-info .woocommerce-Button,
.woocommerce-MyAccount-content .woocommerce-info a.button,
.woocommerce-MyAccount-content .woocommerce-info button.button { display: inline-block; background: #1D1D1D !important; color: #fff !important; border: 1px solid #1D1D1D !important; border-radius: 0 !important; padding: 10px 15px !important; font-size: 14px !important; font-weight: 400 !important; text-transform: none !important; text-decoration: none !important; cursor: pointer; transition: background-color 0.2s ease; }
.order-again a.button:hover,
.woocommerce-MyAccount-content .woocommerce-info .woocommerce-Button:hover,
.woocommerce-MyAccount-content .woocommerce-info a.button:hover,
.woocommerce-MyAccount-content .woocommerce-info button.button:hover { background: #000 !important; }
.an-account-card .order-again { margin-top: 24px; }
.an-account-card .an-order-actions { margin-top: 24px; display: flex; gap: 12px; }
.an-order-addresses { display: flex; gap: 24px; margin-top: 24px; }
.an-order-address-block { flex: 1; }
.an-order-address-block h2 { font-size: 16px !important; }
.an-order-address-block address { font-style: normal; font-size: 15px; line-height: 1.7; border: none; padding: 0; margin: 0; }

/* ── Przyciski ── */
.an-btn { display: inline-block; padding: 5px 12px; font-size: 13px; font-family: "Source Sans Pro", sans-serif !important; letter-spacing: 0.3px; border-radius: 0; transition: background-color 0.2s ease, color 0.2s ease; }
.an-btn--dark { padding: 0; color: #1D1D1D !important; text-decoration: underline !important; }
.an-btn--dark:hover, .an-btn--ghost:hover { background: transparent; color: #666 !important; }
.an-btn--ghost { background: transparent; color: #1D1D1D !important; border: none; text-decoration: underline !important; }

/* ── Toast ── */
#an-account-toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); background: #DCFCE7; color: #166534; padding: 14px 24px; border-radius: 5px; font-family: "Source Sans Pro", sans-serif; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; z-index: 9999; max-width: 90%; text-align: center; }
#an-account-toast.an-toast-visible { opacity: 1; transform: translate(-50%, 0); }
#an-account-toast.an-toast-error { background: #dc3545; }

/* ============================================= */
/* Pozostałe zakładki - Zamówienia / Adresy / Edycja */
/* ============================================= */

button.woocommerce-Button, button[name="save_address"], button[name="save_account_details"] { display: inline-block; background: #1D1D1D !important; color: #fff !important; border: 1px solid #1D1D1D !important; border-radius: 0 !important; cursor: pointer; transition: background-color 0.2s ease; }
button.woocommerce-Button:hover, button[name="save_address"]:hover, button[name="save_account_details"]:hover { background: #000 !important; }
.an-orders-wrapper { background: #FBFBFB; border-radius: 5px; padding: 30px; }

/* ── Powiadomienie WooCommerce (np. weryfikacja adresu email) ── */
.woocommerce-MyAccount-content .woocommerce-info { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; background: #FBFBFB; border: none; border-radius: 5px; padding: 30px; margin: 0 0 24px; font-size: 15px; line-height: 1.6; color: #1D1D1D; list-style: none; }
.woocommerce-MyAccount-content .woocommerce-info .woocommerce-Button,
.woocommerce-MyAccount-content .woocommerce-info a.button,
.woocommerce-MyAccount-content .woocommerce-info button.button { order: 2; }
.woocommerce-MyAccount-content .woocommerce-info::before { content: none; display: none; }

/* ── Komunikaty WooCommerce poza kontem (logowanie, reset hasła) ── */
.woocommerce-message, .woocommerce-error { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; background: #FBFBFB; border: none; border-radius: 5px; padding: 24px 30px; margin: 0 auto 24px; max-width: 400px; font-size: 15px; line-height: 1.6; color: #1D1D1D; list-style: none; font-family: "Source Sans Pro", sans-serif; }
.woocommerce-message::before, .woocommerce-error::before { content: none; display: none; }

.an-addresses-columns { display: flex; gap: 24px; }
.an-address-card { position: relative; flex: 1; }
.an-address-card__header h2 { font-size: 18px; font-weight: 700; margin: 0 0 20px; padding-right: 60px; }
.an-address-card address { font-style: normal; font-size: 15px; line-height: 1.7; color: #1D1D1D; }
.an-edit-link { position: absolute; top: 30px; right: 30px; font-size: 13px; color: #1D1D1D; text-decoration: underline !important; }
.an-edit-link:hover { color: #666 !important; }
.woocommerce-MyAccount-content .form-row { position: relative; margin: 0 0 15px !important; }
.woocommerce-MyAccount-content .form-row label { position: absolute; left: 15px; top: 3px; transform: translateY(-13px); z-index: 2; padding: 0 8px; background: #FBFBFB; font-size: 13px; color: #6F6F6F; max-width: calc(100% - 30px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.woocommerce-MyAccount-content .form-row input.input-text, .woocommerce-MyAccount-content .form-row select { width: 100%; padding: 15px; border: 1px solid #E6E6E6; border-radius: 0; font-size: 15px; background: #FBFBFB; }
.woocommerce-MyAccount-content .form-row input.input-text:focus { outline: none; border-color: #1D1D1D; }
.woocommerce-MyAccount-content .form-row .country_to_state--single { display: block !important; width: 100% !important; padding: 15px !important; border: 1px solid #E6E6E6 !important; border-radius: 0 !important; font-size: 15px !important; font-weight: 400 !important; color: #999 !important; background: #FBFBFB !important; box-sizing: border-box !important; appearance: none !important; pointer-events: none !important; }

/* ── Zakładka "Dane konta" ── */
#billing_invoice_field { display: none; }
#account_display_name_description em { font-size: 13px; font-style: normal; }
fieldset { border: none; padding: 15px 0 0 0; }
legend { font-weight: 700; }
.woocommerce-Button.button, button[name="save_address"], button[name="save_account_details"] { font-size: 14px !important; font-weight: 400 !important; text-transform: none !important; padding: 10px 15px !important; }

/* ============================================= */
/* Mobile + tablet                               */
/* ============================================= */
@media (max-width: 1024px) {
    .an-order-intro { flex-direction: column; align-items: flex-start; gap: 10px; }
    .an-order-total-row--grand td small { display: block; margin-top: 4px; }
    .an-account-layout { flex-direction: column; }
    .an-account-columns { flex-direction: column; }
    .an-skel-columns { flex-direction: column; }
    .woocommerce-Addresses, .an-addresses-columns { flex-direction: column; }
    .an-order-addresses { flex-direction: column; }
    .an-account-card, .an-orders-wrapper, .an-address-card, .an-skel-card, form { padding: 20px; }
    .an-skel-row { gap: 12px; }
    .an-orders-table th, .an-orders-table td { padding-right: 10px !important; }
    .an-orders-table th:last-child, .an-orders-table td:last-child { padding-right: 0 !important; }
    .woocommerce-MyAccount-navigation { flex-basis: auto; width: 100%; }
    .woocommerce-MyAccount-navigation ul { display: flex; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; background: transparent; border-radius: 0; gap: 8px; }
    .woocommerce-MyAccount-navigation::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 64px; background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .85) 55%, rgba(255, 255, 255, 1) 100%); pointer-events: none; z-index: 2; }
    .woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }
    .woocommerce-MyAccount-navigation li { margin: 0; border-bottom: none; flex: 0 0 auto; }
    .woocommerce-MyAccount-navigation li a { display: inline-block; padding: 10px 16px; background: #FBFBFB; border-radius: 3px; font-size: 14px; }
    .woocommerce-MyAccount-navigation li.is-active a { font-weight:400;background: #1D1D1D; color: #fff; }
}