/* ============================================
   BAREFOOT LOYALTY – MY ACCOUNT
   ============================================ */

/* Wymuś poprawny rozmiar wszystkich ikon SVG (Uncode ma svg{width:100%}) */
.woocommerce-MyAccount-content .bfl-dashboard svg,
.woocommerce-MyAccount-content .bfl-card-page svg,
.woocommerce-MyAccount-content .bfl-referral-page svg,
.woocommerce-MyAccount-content .bfl-coupons-page svg,
.woocommerce-MyAccount-content .bfl-points-history svg,
.woocommerce-MyAccount-navigation svg {
    max-width: none !important;
    height: auto;
    vertical-align: middle;
}

/* Ukryj domyślny WooCommerce dashboard tekst */
.woocommerce-MyAccount-content p.bfl-hide,
.woocommerce-account .woocommerce-MyAccount-content > p:first-of-type:not(.bfl-keep) {
    /* obsłużone przez PHP remove_action; ten fallback nie psuje custom treści */
}

/* === SIDEBAR === */
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0; }
.woocommerce-MyAccount-navigation ul li {
    margin: 0 0 2px;
    border: none !important;
    padding: 0 !important;
}
/* Ukryj natywne ikony motywu Uncode (::before/::after na linkach i li) */
.woocommerce-MyAccount-navigation ul li > a::before,
.woocommerce-MyAccount-navigation ul li > a::after,
.woocommerce-MyAccount-navigation ul li::before,
.woocommerce-MyAccount-navigation ul li::after,
.woocommerce-MyAccount-navigation ul li > a > i,
.woocommerce-MyAccount-navigation ul li > a > .fa,
.woocommerce-MyAccount-navigation ul li > a > [class*="icon"]:not(.bfl-nav-ico) {
    display: none !important;
    content: none !important;
}

.woocommerce-MyAccount-navigation ul li a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 11px 14px !important;
    font-size: 14px;
    font-weight: 500;
    color: #444 !important;
    text-decoration: none !important;
    border-radius: 9px;
    transition: background 0.15s, color 0.15s;
    border: none !important;
}
.woocommerce-MyAccount-navigation ul li a:hover { background: #f4f4f4; color: #111 !important; }
.woocommerce-MyAccount-navigation ul li.is-active > a,
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--active > a {
    background: #111 !important;
    color: #fff !important;
    font-weight: 600;
}

/* Ikony SVG w sidebar – wstrzykiwane przez JS jako pierwszy child <a> */
.woocommerce-MyAccount-navigation ul li a .bfl-nav-ico {
    width: 18px; height: 18px;
    flex-shrink: 0;
    opacity: 0.55;
    display: inline-flex;
    align-items: center;
}
.woocommerce-MyAccount-navigation ul li a .bfl-nav-ico svg { width: 18px !important; height: 18px !important; display: block; }
.woocommerce-MyAccount-navigation ul li.is-active > a .bfl-nav-ico,
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--active > a .bfl-nav-ico { opacity: 1; }
.woocommerce-MyAccount-navigation ul li.is-active > a .bfl-nav-ico svg,
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--active > a .bfl-nav-ico svg { stroke: #fff !important; }

/* Badge Nowość */
.bfl-nav-badge {
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
    letter-spacing: 0.3px;
}
.is-active > a .bfl-nav-badge,
.woocommerce-MyAccount-navigation-link--active > a .bfl-nav-badge { background: #fff; color: #111; }

/* Podmenu karty w sidebarze – białe na czarnym tle aktywnego elementu */
.bfl-nav-submenu { list-style: none; margin: 6px 0 2px; padding: 0; }
.bfl-nav-submenu li { margin: 0 !important; }
.bfl-nav-submenu li a {
    padding: 8px 14px 8px 44px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: rgba(255,255,255,0.6) !important;
    background: transparent !important;
    border-radius: 8px;
    display: block !important;
}
.bfl-nav-submenu li a:hover { color: #fff !important; background: rgba(255,255,255,0.08) !important; }
.bfl-nav-submenu li.bfl-subactive a { color: #fff !important; font-weight: 700 !important; }

/* Sekcja pomocy */
.bfl-sidebar-help {
    margin-top: 22px;
    padding: 18px;
    background: #f7f7f7;
    border-radius: 12px;
}
.bfl-sidebar-help-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bfl-sidebar-help-head svg { width: 18px !important; height: 18px !important; }
.bfl-sidebar-help strong { font-size: 13px; }
.bfl-sidebar-help p { font-size: 12px; color: #777; margin: 0 0 12px; line-height: 1.4; }
.bfl-sidebar-help a.bfl-contact-btn {
    display: block; text-align: center; padding: 9px;
    border: 1.5px solid #111; border-radius: 8px;
    font-size: 13px; font-weight: 600; color: #111 !important; text-decoration: none !important;
    transition: background 0.15s;
}
.bfl-sidebar-help a.bfl-contact-btn:hover { background: #111; color: #fff !important; }

/* === PASTELOWE KAFELKI === */
.bfl-tile-blue   { background: #eef4ff; }
.bfl-tile-purple { background: #f3effc; }
.bfl-tile-green  { background: #ecf9f1; }

/* === DASHBOARD === */
.bfl-dashboard { max-width: 100%; }
.bfl-greeting { margin-bottom: 28px; }
.bfl-greeting h2 { font-size: 30px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.5px; }
.bfl-greeting p { color: #999; margin: 0; font-size: 15px; }

.bfl-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.bfl-stat-card {
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: 16px;
    padding: 22px 20px;
    text-decoration: none !important;
    color: inherit;
    display: block;
    transition: box-shadow 0.2s, transform 0.2s;
}
.bfl-stat-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.07); transform: translateY(-2px); color: inherit; }
.bfl-stat-icon {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.bfl-stat-icon svg { width: 22px !important; height: 22px !important; }
.bfl-stat-value { font-size: 26px; font-weight: 700; margin-bottom: 3px; letter-spacing: -0.5px; color: #111; }
.bfl-stat-label { font-size: 13px; color: #777; margin-bottom: 12px; }
.bfl-stat-link { font-size: 13px; color: #111; font-weight: 600; }

/* === CARD PROMO === */
.bfl-dashboard-card-section {
    background: #fff;
    border: 1px solid #ededed;
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 24px;
}
.bfl-section-header { margin-bottom: 24px; }
.bfl-section-header h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.bfl-section-header p { margin: 0; color: #888; font-size: 14px; }
.bfl-badge-new { background: #111; color: #fff; font-size: 10px; padding: 3px 9px; border-radius: 20px; font-weight: 700; letter-spacing: 0.3px; }
.bfl-card-promo { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: center; }
.bfl-benefit { display: flex; gap: 14px; margin-bottom: 22px; align-items: flex-start; }
.bfl-benefit:last-child { margin-bottom: 0; }
.bfl-benefit-icon { width: 40px; height: 40px; flex-shrink: 0; background: #f5f5f5; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.bfl-benefit-icon svg { width: 18px !important; height: 18px !important; }
.bfl-benefit strong { display: block; font-size: 14px; margin-bottom: 3px; }
.bfl-benefit p { margin: 0; color: #888; font-size: 13px; line-height: 1.5; }
.bfl-card-visual-wrap { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }

/* === RECENT ORDERS === */
.bfl-recent-orders { background: #fff; border: 1px solid #ededed; border-radius: 18px; padding: 26px 30px; }
.bfl-section-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.bfl-section-title-row h3, .bfl-section-title-row h4 { margin: 0; font-size: 17px; font-weight: 700; }
.bfl-section-title-row a { font-size: 13px; color: #111; font-weight: 600; text-decoration: underline; }
.bfl-orders-list { display: flex; flex-direction: column; }
.bfl-order-row { display: grid; grid-template-columns: 66px 1fr 160px 110px 100px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f2f2f2; }
.bfl-order-row:last-child { border-bottom: none; padding-bottom: 0; }
.bfl-order-thumb img { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; border: 1px solid #f0f0f0; }
.bfl-order-thumb-placeholder { width: 60px; height: 60px; background: #f7f7f7; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.bfl-order-info strong { display: block; font-size: 14px; font-weight: 700; }
.bfl-order-info span { font-size: 13px; color: #999; }
.bfl-order-status { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.bfl-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.bfl-order-total { font-weight: 700; font-size: 14px; }

/* === BUTTONS === */
.bfl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.18s; text-decoration: none !important; border: 1.5px solid transparent; white-space: nowrap; font-family: inherit; line-height: 1; }
.bfl-btn-primary { background: #111; color: #fff !important; border-color: #111; }
.bfl-btn-primary:hover { background: #333; border-color: #333; }
.bfl-btn-outline { background: transparent; color: #111 !important; border-color: #ddd; }
.bfl-btn-outline:hover { border-color: #111; background: #f9f9f9; }
.bfl-btn-sm { padding: 8px 14px; font-size: 13px; }
.bfl-btn-block { width: 100%; }

/* === CARD PAGE === */
.bfl-card-page { max-width: 100%; }
.bfl-card-header { display: grid; grid-template-columns: 340px 1fr; gap: 40px; margin-bottom: 32px; padding: 30px; background: #fff; border: 1px solid #ededed; border-radius: 18px; align-items: start; }
.bfl-card-visual-col { display: flex; flex-direction: column; }
.bfl-card-stats-col { display: flex; flex-direction: column; gap: 16px; }
.bfl-points-stat { display: flex; gap: 16px; padding: 20px; background: #fafafa; border: 1px solid #f0f0f0; border-radius: 14px; align-items: flex-start; }
.bfl-points-stat-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bfl-points-stat-icon svg { width: 20px !important; height: 20px !important; }
.bfl-points-label { font-size: 12px; color: #999; margin-bottom: 4px; }
.bfl-points-value { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 2px; }
.bfl-points-pln { font-size: 13px; color: #aaa; margin-bottom: 8px; }
.bfl-link { font-size: 13px; color: #111; font-weight: 600; text-decoration: underline; }

/* === HOW IT WORKS === */
.bfl-how-it-works { margin-bottom: 28px; }
.bfl-how-it-works h3, .bfl-how-it-works h4 { font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.bfl-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bfl-step { text-align: center; padding: 26px 18px; background: #fafafa; border: 1px solid #f0f0f0; border-radius: 16px; }
.bfl-step-num { width: 28px; height: 28px; background: #111; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; margin: 0 auto 14px; }
.bfl-step-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.bfl-step-icon svg { width: 22px !important; height: 22px !important; }
.bfl-step strong { display: block; font-size: 14px; margin-bottom: 6px; }
.bfl-step p { font-size: 13px; color: #888; margin: 0; line-height: 1.5; }

.bfl-discount-info { display: flex; gap: 22px; align-items: center; padding: 24px 28px; background: #111; color: #fff; border-radius: 16px; }
.bfl-discount-badge { font-size: 30px; font-weight: 900; white-space: nowrap; }
.bfl-discount-info strong { font-size: 15px; display: block; margin-bottom: 4px; }
.bfl-discount-info p { margin: 0; font-size: 13px; opacity: 0.7; line-height: 1.5; }

/* === TABLES === */
.bfl-points-history h3, .bfl-coupons-page h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.bfl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bfl-table th { text-align: left; padding: 11px 14px; border-bottom: 2px solid #f0f0f0; font-weight: 600; font-size: 12px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; }
.bfl-table td { padding: 13px 14px; border-bottom: 1px solid #f7f7f7; vertical-align: middle; }
.bfl-tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; border: 1px solid; font-weight: 600; }
.bfl-points-cell { font-weight: 700; font-size: 15px; }
.bfl-points-cell.positive { color: #1a7a3c; }
.bfl-points-cell.negative { color: #c0392b; }
.bfl-positive { color: #1a7a3c; font-weight: 700; }
.bfl-empty { color: #aaa; font-style: italic; padding: 24px 0; }

/* === COUPONS === */
.bfl-redeem-box { background: #fafafa; border: 1px solid #ededed; border-radius: 16px; padding: 28px; margin-bottom: 28px; }
.bfl-points-display { margin-bottom: 14px; }
.bfl-pts-big { font-size: 52px; font-weight: 900; line-height: 1; letter-spacing: -2px; }
.bfl-pts-sub { font-size: 14px; color: #aaa; margin-left: 4px; }
.bfl-progress-bar { height: 7px; background: #e8e8e8; border-radius: 10px; overflow: hidden; margin: 14px 0 6px; }
.bfl-progress-fill { height: 100%; background: #111; border-radius: 10px; transition: width 0.6s ease; }
.bfl-progress-label { font-size: 12px; color: #aaa; }
.bfl-coupon-generated { background: #f0faf4; border: 1px solid #b7e4c7; border-radius: 14px; padding: 22px; margin-bottom: 20px; text-align: center; }
.bfl-coupon-code-display { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 12px 0; }
.bfl-coupon-code-display code { font-size: 20px; font-weight: 800; padding: 10px 18px; background: #fff; border-radius: 8px; letter-spacing: 2px; border: 1.5px solid #ddd; }
.bfl-coupon-note { font-size: 13px; color: #666; margin: 0; }

/* === REFERRAL === */
.bfl-referral-page h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.bfl-referral-page > p { color: #888; font-size: 14px; margin-bottom: 28px; }
.bfl-referral-header { display: grid; grid-template-columns: 340px 1fr; gap: 36px; margin-bottom: 32px; align-items: start; padding: 30px; background: #fff; border: 1px solid #ededed; border-radius: 18px; }
.bfl-referral-stats-col { display: flex; flex-direction: column; gap: 16px; }
.bfl-info-note { font-size: 13px; color: #888; margin-top: 8px; line-height: 1.6; }
.bfl-referral-link-section { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 28px 0; padding: 26px; background: #fff; border: 1px solid #ededed; border-radius: 18px; align-items: start; }
.bfl-referral-link-section h4, .bfl-share-col h4 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.bfl-link-copy-row { display: flex; gap: 10px; }
.bfl-link-copy-row input { flex: 1; padding: 11px 13px; border: 1.5px solid #ddd; border-radius: 9px; font-size: 13px; background: #fafafa; color: #555; outline: none; }
.bfl-share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.bfl-share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; text-decoration: none !important; transition: opacity 0.18s; border: none; }
.bfl-share-btn svg { width: 16px !important; height: 16px !important; }
.bfl-share-btn:hover { opacity: 0.85; }
.bfl-share-fb { background: #1877f2; color: #fff !important; }
.bfl-share-wa { background: #25d366; color: #fff !important; }
.bfl-share-email { background: #555; color: #fff !important; }
.bfl-user-cell { display: flex; align-items: center; gap: 12px; }
.bfl-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.bfl-status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.bfl-status-ok { background: #edfaf3; color: #1a7a3c; }
.bfl-status-pending { background: #fff8e8; color: #b45309; }
.bfl-referrals-table-section { margin-top: 28px; }
.bfl-referrals-table-section h4 { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.bfl-referral-cta { background: #f3effc; border-radius: 18px; padding: 24px 28px; margin-top: 28px; }
.bfl-referral-cta-inner { display: flex; align-items: center; gap: 20px; }
.bfl-referral-cta-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #fff; }
.bfl-referral-cta-icon svg { width: 28px !important; height: 28px !important; }
.bfl-referral-cta-text { flex: 1; }
.bfl-referral-cta-text strong { display: block; font-size: 15px; margin-bottom: 4px; }
.bfl-referral-cta-text p { margin: 0; font-size: 13px; color: #777; }
.bfl-contact-footer { text-align: center; margin-top: 32px; padding: 20px; font-size: 14px; color: #888; }
.bfl-contact-footer a { color: #111; font-weight: 700; text-decoration: underline; }

/* === CART/CHECKOUT NOTICE === */
.bfl-discount-notice { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.bfl-discount-notice.bfl-active { background: #edfaf3; border: 1px solid #b7e4c7; }
.bfl-discount-notice.bfl-inactive { background: #fffbeb; border: 1px solid #fde68a; }

/* === ACTIVATE === */
.bfl-activate-section { text-align: center; padding: 36px 28px; background: #fafafa; border: 1px solid #ededed; border-radius: 16px; margin: 20px 0; }
.bfl-activate-section h3 { margin-bottom: 8px; font-size: 18px; }
.bfl-activate-section p { color: #888; margin-bottom: 22px; font-size: 14px; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .bfl-card-promo, .bfl-card-header, .bfl-referral-header { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .bfl-stats-grid { grid-template-columns: 1fr 1fr; }
    .bfl-steps { grid-template-columns: 1fr; }
    .bfl-order-row { grid-template-columns: 60px 1fr 1fr; }
    .bfl-referral-link-section { grid-template-columns: 1fr; }
    .bfl-referral-cta-inner { flex-direction: column; text-align: center; }
    .bfl-greeting h2 { font-size: 22px; }
}
