/* Style menu nawigacyjnego użytkownika */
#template .woocommerce-MyAccount-navigation ul li a:before{
    font-family: 'Font Awesome 5 Free';
    font-weight: 600;
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--dodaj-wizytowke a:before{
    content: "\f234";
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--edycja-wizytowki a:before{
    content: "\f4ff";
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--promuj-wizytowke a:before{
    content: "\f4fb";
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--dashboard a:before{
    content: "\f4fe";
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--edit-account a:before {
    content: "\f4fc";
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--opinie-o-firmie a:before{
    content: "\f0c0";
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--rabaty a:before{
    content: "\f507";
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--rabaty a:after{
    content: "NOWOŚĆ!";
    position: absolute;
    left: -10px;
    top: 2px;
    background: green;
    color: #fff;
    padding: 3px 6px 2px;
    border-radius: 3px;
    font-size: 8px;
    line-height: 9px;
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--reflinki a:before{
    content: "\f509";
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--reflinki a:after{
    content: "NOWOŚĆ!";
    position: absolute;
    left: -10px;
    top: 2px;
    background: green;
    color: #fff;
    padding: 3px 6px 2px;
    border-radius: 3px;
    font-size: 8px;
    line-height: 9px;
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--orders a:before {
    content: "\f4fd";
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--edit-address a:before {
    content: "\e065";
}
#template .woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout a:before{
    content: "\f502";
}

/* Formularz rejestracji */
body.woocommerce-account .woocommerce-MyAccount-content #rejestracja-form .acf-field{
    padding-left: 0;
    padding-right: 0;
}
body.woocommerce-account .woocommerce-MyAccount-content #rejestracja-form .message{
    font-size: 14px;
}
body.woocommerce-account .woocommerce-MyAccount-content #rejestracja-form label[for="acf-field_602ccf2f28132"] > span{
    font-size: 12px;
}
body.woocommerce-account .woocommerce-MyAccount-content #rejestracja-form div[data-name="pakiet_pozycjonujacy_acf"] .acf-input{
    text-align: center;
}
/* Style kontentu w panelu użytkownika*/
body.woocommerce-account .woocommerce-MyAccount-content{
    margin-bottom: 2rem;
}

/* --- Styl kart firm na dashboardzie --- */
.dashboard-card {
    position: relative;
    border-radius: 18px;
    box-shadow: 0 4px 20px 0 rgba(0,0,0,.06);
    overflow: hidden;
    transition: transform .2s;
    border: 1px solid #f3f3f3;
    background: #fff;
}
.dashboard-card:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 28px 0 rgba(0,0,0,.10);
}
.dashboard-card .card-body {
    padding: 18px 12px 14px 12px;
}

.dashboard-card .card-title {
    font-size: 1.07em;
    font-weight: bold;
    margin-bottom: 0.3em;
    color: #242b36;
}
.dashboard-card .card-text {
    color: #535353;
    font-size: 0.98em;
}
.dashboard-card .card-text i{
    font-size: 1.13em;
    margin-right: 4px;
    color: #712faa;
    vertical-align: middle;
}

/* --- Obrazek (logo) firmy --- */
.dashboard-card .dashboard-logo {
    display: block;
    height: 90px;
    max-width: 100px;
    object-fit: contain;
    margin: 0 auto 8px auto;
    background: #fafbfc;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    padding: 8px;
    transition: box-shadow .15s;
}
.dashboard-card .dashboard-logo:hover {
    box-shadow: 0 4px 14px rgba(60,60,80,0.09);
}
.dashboard-card .card-bottom{
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}
.dashboard-card .badge{
  padding: 0.45em .9em;
  font-size: 12px !important;
}
.dashboard-card .btn-renew-cmp{
    background: #712faa;
    box-shadow: 0 0 0 3px rgba(113, 47, 170, .3);
}
.dashboard-card .btn-renew-cmp:hover {
    color: #fff;
    background: #f9c10c;
    box-shadow: 0 0 0 3px rgba(243, 202, 120, .3);
}
.dashboard-card .btn-renew-cmp::after{
    content: "\f07a";
}
.dasboard-actions a.btn{
    width: 100%;
    margin-left: 0;
    line-height: 1;
}
.btn-edit-cmp::after{
    content: "\f044";
    margin-left: 10px;
}
.btn-add-cmp{
    background: #712faa;
    box-shadow: 0 0 0 3px rgba(113, 47, 170, .3);
    margin-left: 0;
    line-height: 1;
}
.btn-add-cmp:hover {
    color: #fff;
    background: #f9c10c;
    box-shadow: 0 0 0 3px rgba(243, 202, 120, .3);
}
.btn-add-cmp::after{
    content: "\f055";
    margin-left: 10px;
}
.ribbon-status {
    position: absolute;
    right: 10px;
    top: 10px;
    text-align: center;
    border: 2px solid #f7941d;
    border-radius: 10px;
    padding: 1px 8px 3px;
    background: #fff;
    z-index: 1;
}
.ribbon-status span {
    font-size: 12px;
    font-weight: 700;
    color: #f7941d;
    text-align: center;
}
.ribbon-status.green{
    border: 2px solid #537d19;
}
.ribbon-status.green span{
    color:  #537d19;
}
.ribbon-status.grey{
    border: 2px solid #848484;
}
.ribbon-status.grey span{
    color:  #848484;
}

@media (max-width: 600px) {
    .dashboard-card .dashboard-logo {
        height: 56px;
        padding: 6px;
    }
}

/* Zakładka promuj/odnów wizytówkę */
#table__promuj-wizytowke thead tr th:not(:first-child),
#table__promuj-wizytowke tbody tr td:not(:first-child){
    text-align: center;
}
#table__promuj-wizytowke tbody tr td:last-child > div{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    min-height: 100px;
}
#table__promuj-wizytowke .post_edit_table--pakiet{
    gap: 10px;
}
#table__promuj-wizytowke .badge{
    line-height: 1rem;
    padding: 3px 10px;
}
#table__promuj-wizytowke .status{
    text-align: center;
    vertical-align: middle;
}
#table__promuj-wizytowke .post_edit_table--pakiet img {
    max-width: 60px;
}
#table__promuj-wizytowke .btn{
    padding: 5px 9px;
    line-height: 1.1;
    border-radius: 7px;
    letter-spacing: 0;
    text-transform: none;
    font-size: 11px;
    font-weight: normal;
}
#table__promuj-wizytowke .btn::after{
    display: none;
    content: "";
}
#table__promuj-wizytowke .btn-p-biznes{
    background: var(--pakiet-biznes);
    box-shadow: var( --pakiet-biznes-shadow);
}
#table__promuj-wizytowke .btn-p-premium{
    background: var(--pakiet-premium);
    box-shadow: var( --pakiet-premium-shadow);
}
#table__promuj-wizytowke .btn-p-bazowy{
    background: var(--pakiet-bazowy);
    box-shadow: var( --pakiet-bazowy-shadow);
}
#template .btn-p-biznes:hover,
#template .btn-p-bazowy:hover{
  background: var(--theme-yellow);
  box-shadow: 0 0 0 3px rgba(243, 202, 120, .3);
}
#template .btn-p-premium:hover{
  background: var(--theme-blue);
  box-shadow: 0 0 0 3px rgba(135, 200, 249, .3);
}

/* Opinie o firmie */
.user-reviews-title {
  font-size: 16px;
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 18px;
  color: #26364d;
}

/* === Style dla systemu opinii zgodnego z prawem === */

.user-review-legal-info {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #28a745;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
}

.user-review-legal-info h4 {
  color: #155724;
  margin-bottom: 15px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-review-legal-info h4 i {
  color: #28a745;
  font-size: 20px;
}

.user-review-legal-info p {
  color: #495057;
  margin-bottom: 15px;
  font-size: 16px;
}

.user-review-legal-info ul {
  list-style: none;
  padding-left: 0;
}

.user-review-legal-info li {
  padding: 8px 0;
  font-size: 15px;
  line-height: 1.5;
  color: #343a40;
}

.user-review-legal-info li strong {
  font-weight: 600;
}

.user-review-empty {
  color: #b0b7c3;
  font-style: italic;
  margin-bottom: 20px;
}

.user-review-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(90,120,150,0.09);
  padding: 20px 24px;
  margin-bottom: 24px;
  font-size: 16px;
  position: relative;
  transition: box-shadow 0.3s;
  border-left: 5px solid #e9eaff;
}
.user-review-card:hover {
  box-shadow: 0 4px 24px rgba(90,120,150,0.14);
}
.user-review-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  gap: 16px;
  flex-wrap: wrap;
}
.user-review-stars {
  color: #FFB800;
  font-size: 20px;
  letter-spacing: 2px;
  font-weight: bold;
}

/* Nowe statusy opinii */
.user-review-status {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-review-status.pending {
  color: #856404;
  background: #fff3cd;
  border: 1px solid #ffecb5;
}

.user-review-status.auto-approve {
  color: #004085;
  background: #cce7ff;
  border: 1px solid #99d1ff;
}

.user-review-status.approved {
  color: #155724;
  background: #d4edda;
  border: 1px solid #c3e6cb;
}

.user-review-status.reported {
  color: #721c24;
  background: #f8d7da;
  border: 1px solid #f1aeb5;
  margin-left: 8px;
}

.user-review-content {
  margin-bottom: 14px;
  color: #273144;
  font-size: 17px;
  line-height: 1.7;
}
.user-review-meta {
  font-size: 13px;
  color: #9CA3AF;
  margin-bottom: 10px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.user-review-meta .user-review-author {
  font-weight: 600;
  color: #4C5D70;
}

.user-review-meta .user-review-days {
  color: #6c757d;
  font-style: italic;
}

.user-review-actions {
  margin-top: 15px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.user-review-actions a, .user-review-actions button {
  font-size: 14px;
  text-decoration: none;
  border-radius: 8px;
  padding: 8px 16px;
  transition: all 0.2s ease;
  font-weight: 500;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-review-approve {
  color: #155724 !important;
  background: #d4edda !important;
  border: 1px solid #c3e6cb !important;
}
.user-review-approve:hover {
  background: #c3e6cb !important;
  color: #0f3c12 !important;
}

.user-review-report {
  color: #721c24 !important;
  background: #f8d7da !important;
  border: 1px solid #f1aeb5 !important;
}
.user-review-report:hover {
  background: #f1aeb5 !important;
  color: #5a1419 !important;
}

.user-review-reply {
  color: #0c5460 !important;
  background: #d1ecf1 !important;
  border: 1px solid #bee5eb !important;
}
.user-review-reply:hover {
  background: #bee5eb !important;
  color: #062c33 !important;
}

.user-review-reported-info {
  color: #6c757d;
  font-size: 13px;
  font-style: italic;
  padding: 4px 8px;
  background: #f8f9fa;
  border-radius: 6px;
}

/* Formularz odpowiedzi */
.user-review-reply-form {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px dashed #dee2e6;
}

.user-review-reply-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  margin-bottom: 15px;
  transition: border-color 0.2s ease;
}

.user-review-reply-form textarea:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.reply-actions {
  display: flex;
  gap: 10px;
}

.reply-actions .btn {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reply-actions .btn-primary {
  background: #007bff;
  color: white;
}
.reply-actions .btn-primary:hover {
  background: #0056b3;
}

.reply-actions .btn-secondary {
  background: #6c757d;
  color: white;
}
.reply-actions .btn-secondary:hover {
  background: #545b62;
}

/* Automatyczne zatwierdzenie - info w komentarzu */
.auto-approved-notice {
  margin-top: 10px;
  padding: 8px 12px;
  background: #e7f3ff;
  border-left: 4px solid #007bff;
  border-radius: 0 6px 6px 0;
}

.auto-approved-notice small {
  color: #0056b3;
  font-style: italic;
}

.auto-approved-notice i {
  color: #007bff;
  margin-right: 6px;
}

/* Responsive design */
@media (max-width: 768px) {
  .user-review-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .user-review-meta {
    flex-direction: column;
    gap: 8px;
  }

  .user-review-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .user-review-actions a, .user-review-actions button {
    text-align: center;
    justify-content: center;
  }

  .reply-actions {
    flex-direction: column;
  }

  .user-review-legal-info {
    padding: 20px;
  }

  .user-review-legal-info h4 {
    font-size: 16px;
  }
}

/* === Style dla systemu reflinków === */
.referral-container {
    margin-bottom: 2rem;
}

.referral-section {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.referral-section h3 {
    color: #712faa;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.referral-section h3 i {
    margin-right: 8px;
    color: #712faa;
}

.referral-link-box {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

.referral-link-box input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
}

.referral-link-box button {
    padding: 12px 20px;
    background: #712faa;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 0 0 3px rgba(113, 47, 170, .3);
}

.referral-link-box button:hover {
    background: #00b9f1;
    box-shadow: 0 0 0 3px rgba(135, 200, 249, .3);
    transform: translateY(-1px);
}

.referral-instructions {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #712faa;
}

.referral-instructions i {
    color: #712faa;
    margin-right: 6px;
}

.referral-rewards {
    display: block;
    margin-top: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.referral-history h3 {
    color: #712faa;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.referral-history .table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.referral-history .table thead th {
    background: #712faa;
    color: white;
    border: none;
    font-weight: 600;
    padding: 15px 12px;
}

.referral-history .table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-color: #e9ecef;
}

.referral-history .badge {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.referral-history .badge-warning {
    background: #ffc107;
    color: #212529;
}

.referral-history .badge-info {
    background: #17a2b8;
    color: white;
}

.referral-history .badge-success {
    background: #28a745;
    color: white;
}

.no-referrals {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    color: #6c757d;
}

.no-referrals i {
    font-size: 2rem;
    margin-right: 10px;
    color: #712faa;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .referral-link-box {
        flex-direction: column;
    }

    .referral-link-box button {
        width: 100%;
        margin-left: 0;
    }

    .referral-section {
        padding: 1rem;
    }

    .referral-rewards {
        font-size: 0.9rem;
    }
    .qr-code-section{
        margin-top: 10px;
        margin-bottom: 15px;
    }
}

/* Strona rejestracji */
.woocommerce-form.woocommerce-form-register .acceptance-field label{
    font-size: 14px;
    line-height: 18px;
}

/* Tabele na mobile */
@media (max-width: 1199px){
     .table-responsive {
        position: relative;
    }
    .table-responsive::before{
        content: "Przewiń tabelę w bok";
        display: block;
        margin-bottom: 1rem;
        font-weight: 600;
    }
    .table-responsive::after {
        content: "\f0a4";
        font-family: "Font Awesome 5 Free";
        font-weight: 600;
        display: inline-block;
        margin-left: 10px;
        font-size: 22px;
        color: var(--theme-blue);
        animation: wiggle-hand 1s infinite alternate;
        vertical-align: middle;
        position: absolute;
        top: -5px;
        right: 10px;
    }
    @keyframes wiggle-hand {
        0% { transform: translateX(0); }
        100% { transform: translateX(8px); }
    }

}

/* Dodawanie Firmy */
body.woocommerce-account #rejestracja-form .acf-field p.description,
body.woocommerce-account #acf-form .acf-field p.description{
    margin-top: 2px;
    font-size: 13px;
}
body.woocommerce-account #rejestracja-form .acf-spinner{
  margin-left: auto;
  margin-right: auto;
  width: 185px;
  height: 50px;
  padding-top: 25px;
  background-position: top center;
}
body.woocommerce-account #rejestracja-form .acf-spinner::after{
  content: "Przetwarzamy dane…";
  font-weight: bold;
  margin-left: 10px;
}
body.woocommerce-account #rejestracja-form .acf-form-submit{
  text-align: center;
}