
/* 
 * WooCommerce "Moje konto"
 */

/* -----------------------------------------
   1. ZMIENNE GLOBALNE
-------------------------------------------- */
:root {
  --myacc_primary: #C20000;
  --myacc_primary-light: #FFEBEB;
  --myacc_primary-dark: #990000;
  --myacc_text: #0D0A0A;
  --myacc_text-light: #4a4a4a;
  --myacc_bg-light: #f9f9f9;
  --myacc_white: #ffffff;
  --myacc_border-radius: 8px;
  --myacc_input-radius: 6px;
  --myacc_box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
  --myacc_transition: all 0.3s ease;
  --myacc_padding-container: 30px;
  --myacc_error: #e2401c;
  --myacc_success: #0c6e3d;
  --myacc_info: #0a51a3;
  --myacc_warning: #b78103;
  --myacc_border-color: rgba(0, 0, 0, 0.08);
  
  /* Dodatkowe zmienne do łatwej konfiguracji */
  --myacc_btn-text: #ffffff;
  --myacc_btn-radius: 8px;
  --myacc_legend-bg: #C20000;
  --myacc_legend-text: #0D0A0A;
  --myacc_legend-radius: 4px;
  --myacc_mark-bg: #FDF8EE;
  --myacc_mark-text: #0D0A0A;
}

/* -----------------------------------------
   2. RESETOWANIE STYLÓW WOOCOMMERCE
-------------------------------------------- */
.woocommerce-account h1, 
.woocommerce-account h2, 
.woocommerce-account h3, 
.woocommerce-account h4, 
.woocommerce-account h5, 
.woocommerce-account h6 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--myacc_text);
}

.woocommerce-account h1 { font-size: 2rem; }
.woocommerce-account h2 { font-size: 1.5rem; }
.woocommerce-account h3 { font-size: 1.25rem; }
.woocommerce-account h4 { font-size: 1.125rem; }

/* Tylko dla linków wewnątrz .woocommerce-MyAccount-content - wyjątek dla przycisków edycji */
.woocommerce-account .woocommerce-MyAccount-content a:not(.button):not(.woocommerce-Button):not(.edit) {
  color: var(--myacc_text);
  transition: var(--myacc_transition);
}

.woocommerce-account .woocommerce-MyAccount-content a:not(.button):not(.woocommerce-Button):not(.edit):hover {
  color: var(--myacc_primary);
}

/* Wyróżnione elementy */
.woocommerce-account mark {
  background-color: var(--myacc_mark-bg);
  color: var(--myacc_mark-text);
  padding: 2px 5px;
  border-radius: 3px;
  font-weight: 500;
}

/* -----------------------------------------
   3. UKŁAD GŁÓWNY
-------------------------------------------- */
.woocommerce-account section .woocommerce {
  margin: 40px auto;
  padding: var(--myacc_padding-container) 0;
}

/* Panel boczny + content dla stron konta */
.woocommerce-account.logged-in .woocommerce {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

@media (max-width: 992px) {
  .woocommerce-account .woocommerce {
    gap: 20px;
    padding: 20px 0;
    margin: 20px auto;
  }
}

@media (max-width: 768px) {
  .woocommerce-account.logged-in .woocommerce {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------
   4. PANEL NAWIGACJI
-------------------------------------------- */
.woocommerce-account .woocommerce-MyAccount-navigation {
  background-color: var(--myacc_white);
  border-radius: var(--myacc_border-radius);
  box-shadow: var(--myacc_box-shadow);
  overflow: hidden;
  height: fit-content;
  border: 1px solid var(--myacc_border-color);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--myacc_border-color);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child {
  border-bottom: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: var(--myacc_text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--myacc_transition);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
  background-color: var(--myacc_primary-light);
  /* Usunięto efekt przesuwania */
  padding-left: 25px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
  background-color: var(--myacc_primary);
  color: var(--myacc_white);
  font-weight: 600;
}

/* Ikony nawigacji */
.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
  font-family: 'dashicons';
  margin-right: 10px;
  font-size: 18px;
  opacity: 0.8;
  width: 20px;
  text-align: center;
  display: inline-block;
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--dashboard a::before {
  content: "\f226";
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--orders a::before {
  content: "\f174";
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--downloads a::before {
  content: "\f316";
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-address a::before {
  content: "\f230";
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-account a::before {
  content: "\f110";
}

.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout a::before {
  content: "\f310";
}

/* -----------------------------------------
   5. ZAWARTOŚĆ KONTA
-------------------------------------------- */
.woocommerce-account .woocommerce-MyAccount-content {
  background-color: var(--myacc_white);
  border-radius: var(--myacc_border-radius);
  box-shadow: var(--myacc_box-shadow);
  padding: 30px;
  border: 1px solid var(--myacc_border-color);
}

.woocommerce-account .woocommerce-MyAccount-content h2, 
.woocommerce-account .woocommerce-MyAccount-content h3 {
  margin-top: 0;
  font-weight: 600;
  color: var(--myacc_text);
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--myacc_primary-light);
  position: relative;
}

.woocommerce-account .woocommerce-MyAccount-content h2::after, 
.woocommerce-account .woocommerce-MyAccount-content h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 60px;
  height: 2px;
  background-color: var(--myacc_primary);
}

.woocommerce-account .woocommerce-MyAccount-content p {
  color: var(--myacc_text);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* -----------------------------------------
   6. PRZYCISKI
-------------------------------------------- */
.woocommerce-account .woocommerce-Button,
.woocommerce-account button.button,
.woocommerce-account a.button {
  background-color: var(--myacc_primary);
  color: var(--myacc_btn-text);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--myacc_btn-radius);
  border: none;
  cursor: pointer;
  transition: var(--myacc_transition);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.woocommerce-account .woocommerce-Button:hover,
.woocommerce-account button.button:hover,
.woocommerce-account a.button:hover {
  background-color: var(--myacc_primary-dark);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.woocommerce-account .woocommerce-Button:active,
.woocommerce-account button.button:active,
.woocommerce-account a.button:active {
  transform: translateY(0);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

/* -----------------------------------------
   7. LOGOWANIE I REJESTRACJA
-------------------------------------------- */
/* Struktura główna logowania/rejestracji */
.woocommerce-account .u-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin: 20px 0;
  box-sizing: border-box;
}

.woocommerce-account .u-column1,
.woocommerce-account .u-column2 {
  flex: 1;
  min-width: 280px;
  background-color: var(--myacc_white);
  border-radius: var(--myacc_border-radius);
  box-shadow: var(--myacc_box-shadow);
  padding: 30px;
  border: 1px solid var(--myacc_border-color);
}

@media (max-width: 768px) {
  .woocommerce-account .u-column1,
  .woocommerce-account .u-column2 {
    flex-basis: 100%;
  }
}

.woocommerce-account .u-column1 h2,
.woocommerce-account .u-column2 h2 {
  text-align: left;
  margin-bottom: 25px;
  font-weight: 600;
  color: var(--myacc_text);
  position: relative;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--myacc_primary-light);
}

.woocommerce-account .u-column1 h2::after,
.woocommerce-account .u-column2 h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--myacc_primary);
}

.woocommerce-account form.login,
.woocommerce-account form.register {
  border: none;
  padding: 0;
  margin: 0;
  max-width: 100%;
  background-color: transparent;
  box-shadow: none;
}

/* Reset hasła */
.woocommerce-account .woocommerce-ResetPassword {
  max-width: 600px;
  margin: 30px auto;
  padding: 30px;
  background-color: var(--myacc_white);
  border-radius: var(--myacc_border-radius);
  box-shadow: var(--myacc_box-shadow);
  border: 1px solid var(--myacc_border-color);
}

.woocommerce-account .woocommerce-ResetPassword p:first-child {
  margin-bottom: 25px;
}

.woocommerce-account .woocommerce-ResetPassword .form-row-first {
  width: 100%;
  float: none;
}

/* Usunięto ogólne style dla formularzy samodzielnych */

/* Contener powiadomień */
.woocommerce-notices-wrapper {
  width: 100%;
  margin-bottom: 0px;
}

/* -----------------------------------------
   8. FORMULARZE I POLA
-------------------------------------------- */
.woocommerce form .form-row {
  margin-bottom: 20px;
  padding: 0;
  text-align: left;
}

.woocommerce form .form-row label {
  font-weight: 500;
  color: var(--myacc_text);
  margin-bottom: 8px;
  display: block;
  font-size: 14px;
  text-align: left;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--myacc_input-radius);
  border: 1px solid var(--myacc_border-color);
  background-color: var(--myacc_white);
  transition: var(--myacc_transition);
  font-size: 14px;
  color: var(--myacc_text);
  box-sizing: border-box;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.woocommerce form .form-row textarea {
  min-height: 120px;
  resize: vertical;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--myacc_primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 188, 65, 0.2);
}

/* Oznaczenia pól wymaganych */
.required {
  color: var(--myacc_error);
}

/* Naprawa przycisku pokazywania hasła */
.woocommerce .password-input {
  position: relative;
  width: 100%;
  display: block;
}

.woocommerce .show-password-input {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  opacity: 0.5;
  transition: var(--myacc_transition);
}

.woocommerce .show-password-input:hover {
  opacity: 1;
}

/* Poprawka dla ikony oka w polu hasła */
.woocommerce .show-password-input:before {
  font-family: dashicons;
  content: "\f177";
  font-size: 16px;
  color: var(--myacc_text-light);
  display: inline-block;
  line-height: 1;
}

.woocommerce .show-password-input.display-password:before {
  content: "\f530";
}

/* Usuwamy stary ::after, który nie działał */
.woocommerce .show-password-input::after {
  content: none;
}

/* Select2 styling */
.select2-container--default .select2-selection--single {
  border: 1px solid var(--myacc_border-color);
  border-radius: var(--myacc_input-radius);
  height: 44px;
  padding: 8px 15px;
  background-color: var(--myacc_white);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--myacc_text);
  line-height: 28px;
  padding-left: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 42px;
}

/* Zapamiętaj mnie checkbox */
.woocommerce-form__label-for-checkbox {
  display: flex;
  align-items: center;
  margin-top: 10px;
  font-weight: normal;
  cursor: pointer;
}

.woocommerce-form__input-checkbox {
  margin-right: 8px;
  accent-color: var(--myacc_primary);
  width: 16px;
  height: 16px;
}

/* Link do resetowania hasła */
.woocommerce-LostPassword {
  text-align: left;
  margin-top: 20px;
}

.woocommerce-LostPassword a {
  color: var(--myacc_text);
  font-weight: 500;
  transition: var(--myacc_transition);
  text-decoration: underline;
}

.woocommerce-LostPassword a:hover {
  color: var(--myacc_primary);
}

/* Formularz loginu i rejestracji - przyciski */
.woocommerce-account form.login .form-row:last-of-type,
.woocommerce-account form.register .form-row:last-of-type,
.woocommerce-account form.lost_reset_password .form-row:last-of-type {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.woocommerce-account form.login .woocommerce-button,
.woocommerce-account form.register .woocommerce-Button,
.woocommerce-account form.lost_reset_password .woocommerce-Button {
  min-width: 200px;
}

/* Naprawa odstępów w formularzach adresowych */
.woocommerce-address-fields__field-wrapper {
  display: flex;
  flex-wrap: wrap;
  /* Usunięto margines ujemny */
  box-sizing: border-box;
}

.woocommerce-address-fields__field-wrapper p {
  padding: 0 10px 0 0;
  box-sizing: border-box;
  margin-bottom: 15px;
}

/* Pola imienia i nazwiska */
#billing_first_name_field,
#shipping_first_name_field {
  width: 50%;
  padding-right: 10px;
}

#billing_last_name_field,
#shipping_last_name_field {
  width: 50%;
  padding-left: 0;
}

@media (min-width: 576px) {
  .woocommerce-address-fields__field-wrapper .form-row-first,
  .woocommerce-address-fields__field-wrapper .form-row-last {
    width: 50%;
  }
  
  .woocommerce-address-fields__field-wrapper .form-row-first {
    padding-right: 10px;
  }
  
  .woocommerce-address-fields__field-wrapper .form-row-last {
    padding-left: 0;
  }
}

@media (max-width: 576px) {
  .woocommerce-address-fields__field-wrapper .form-row-first,
  .woocommerce-address-fields__field-wrapper .form-row-last,
  #billing_first_name_field,
  #billing_last_name_field,
  #shipping_first_name_field,
  #shipping_last_name_field {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

.woocommerce-address-fields__field-wrapper .form-row-wide {
  width: 100%;
}

/* -----------------------------------------
   9. TABELE
-------------------------------------------- */
.woocommerce-account table.shop_table {
  border: 1px solid var(--myacc_border-color);
  border-radius: var(--myacc_border-radius);
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 20px;
  width: 100%;
  box-shadow: var(--myacc_box-shadow);
  overflow: hidden;
}

.woocommerce-account table.shop_table th {
  background-color: var(--myacc_bg-light);
  color: var(--myacc_text);
  font-weight: 600;
  padding: 14px 15px;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--myacc_border-color);
}

.woocommerce-account table.shop_table td {
  padding: 14px 15px;
  border-top: none;
  border-bottom: 1px solid var(--myacc_border-color);
  vertical-align: middle;
}

.woocommerce-account table.shop_table tr:last-child td {
  border-bottom: none;
}

.woocommerce-account table.shop_table tr:hover {
  background-color: var(--myacc_primary-light);
}

/* Przyciski w tabeli */
.woocommerce-account table.shop_table .button {
  padding: 8px 14px;
  font-size: 12px;
  min-width: auto;
}

/* Status zamówienia */
.woocommerce-orders-table__cell-order-status .order-status {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.woocommerce-orders-table__cell-order-status .order-status.status-completed {
  background-color: #e6f7ed;
  color: var(--myacc_success);
}

.woocommerce-orders-table__cell-order-status .order-status.status-processing {
  background-color: #e6eefa;
  color: var(--myacc_info);
}

.woocommerce-orders-table__cell-order-status .order-status.status-on-hold {
  background-color: #fef8e6;
  color: var(--myacc_warning);
}

.woocommerce-orders-table__cell-order-status .order-status.status-pending {
  background-color: #f0f0f1;
  color: #606060;
}

.woocommerce-orders-table__cell-order-status .order-status.status-failed {
  background-color: #fbe9e9;
  color: var(--myacc_error);
}

/* -----------------------------------------
   10. ADRESY
-------------------------------------------- */
.woocommerce-Addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

@media (max-width: 768px) {
  .woocommerce-Addresses {
    grid-template-columns: 1fr;
  }
}

.woocommerce-Address {
  background-color: var(--myacc_white);
  border-radius: var(--myacc_border-radius);
  box-shadow: var(--myacc_box-shadow);
  padding: 20px;
  position: relative;
  border: 1px solid var(--myacc_border-color);
}

.woocommerce-Address-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--myacc_border-color);
}

.woocommerce-Address-title h2,
.woocommerce-Address-title h3 {
  margin: 0 !important;
  font-weight: 600;
  color: var(--myacc_text);
  font-size: 16px;
  border: none !important;
  padding-bottom: 0 !important;
}

.woocommerce-Address-title h2::after,
.woocommerce-Address-title h3::after {
  display: none !important;
}

.woocommerce-Address-title a.edit {
  background-color: var(--myacc_primary);
  color: var(--myacc_btn-text);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--myacc_transition);
}

.woocommerce-Address-title a.edit:hover {
  background-color: var(--myacc_primary-dark);
  color: var(--myacc_btn-text);
}

.woocommerce-Address address {
  font-style: normal;
  line-height: 1.6;
  color: var(--myacc_text);
  margin-bottom: 0;
  font-size: 14px;
}

/* -----------------------------------------
   11. POWIADOMIENIA
-------------------------------------------- */
.woocommerce-notice,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: var(--myacc_border-radius);
  font-weight: 500;
  display: flex;
  align-items: center;
  border: none;
  list-style: none;
}

.woocommerce-message {
  background-color: #e6f7ed;
  color: var(--myacc_success);
  border-left: 4px solid var(--myacc_success);
}

.woocommerce-error {
  background-color: #fbe9e9;
  color: var(--myacc_error);
  border-left: 4px solid var(--myacc_error);
}

.woocommerce-info {
  background-color: #e6eefa;
  color: var(--myacc_info);
  border-left: 4px solid var(--myacc_info);
}

.woocommerce-message::before,
.woocommerce-error::before,
.woocommerce-info::before {
  margin-right: 10px;
}

/* Przycisk w powiadomieniach */
.woocommerce-info a.button.wc-forward {
  margin-left: auto;
}

/* -----------------------------------------
   12. FORMULARZE EDYCJI
-------------------------------------------- */
.woocommerce-EditAccountForm,
.woocommerce-address-fields {
  margin-top: 20px;
}

.woocommerce-EditAccountForm fieldset {
  margin: 25px 0;
  padding: 20px;
  border: 1px solid var(--myacc_border-color);
  border-radius: var(--myacc_border-radius);
  background-color: var(--myacc_bg-light);
}

.woocommerce-EditAccountForm fieldset legend {
  padding: 3px 13px;
  font-weight: 500;
  color: var(--myacc_white);
  font-size: 13px;
  background-color: var(--myacc_legend-bg);
  border-radius: var(--myacc_legend-radius);
}

/* -----------------------------------------
   13. ANIMACJE I EFEKTY
-------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.woocommerce-account .woocommerce-MyAccount-content {
  animation: fadeIn 0.4s ease-out;
}

/* -----------------------------------------
   14. RESPONSYWNOŚĆ
-------------------------------------------- */
@media (max-width: 992px) {
  .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    padding: 12px 15px;
  }
  
  .woocommerce-account .woocommerce-MyAccount-content {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__cell,
  .woocommerce-account .woocommerce-orders-table .woocommerce-orders-table__header {
    padding: 10px;
    font-size: 13px;
  }
  
  .woocommerce-account .woocommerce-orders-table .woocommerce-button {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .woocommerce-account .woocommerce-MyAccount-content {
    padding: 20px 15px;
  }
  
  .woocommerce-account .u-column1,
  .woocommerce-account .u-column2 {
    padding: 20px 15px;
  }
  
  /* Ujednolicenie wielkości czcionek na mobile */
  .woocommerce-account h1 { font-size: 1.8rem; }
  .woocommerce-account h2 { font-size: 1.4rem; }
  .woocommerce-account h3 { font-size: 1.2rem; }
  .woocommerce-account p { font-size: 14px; }
  
  .woocommerce-account form .form-row label {
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .woocommerce-account .woocommerce {
    padding: 0;
  }
  
  .woocommerce-account .woocommerce-Button,
  .woocommerce-account button.button {
    width: 100%;
  }
  
  .woocommerce-account table.shop_table th,
  .woocommerce-account table.shop_table td {
    padding: 10px 8px;
    font-size: 12px;
  }
}