/* Podstawowe style dla layoutu konta */
.woocommerce-dashboard .woocommerce,
.woocommerce-orders .woocommerce,
.woocommerce-downloads .woocommerce,
.woocommerce-edit-address .woocommerce,
.woocommerce-add-payment-method .woocommerce,
.woocommerce-payment-methods .woocommerce,
.woocommerce-edit-account .woocommerce,
.woocommerce-customer-logout .woocommerce,
.woocommerce-view-order .woocommerce{
    display: flex;
    justify-content: space-between;
    gap: 50px;
}

/* Dodatkowa przestrzeń dla zakładki edycji konta */
.woocommerce-edit-account .woocommerce,
.woocommerce-view-order .woocommerce {
    margin-top: 200px; 
}

/* Główne styles dla panelu konta */
.woocommerce-MyAccount-content {
    font-family: var(--body-font-family);
    color: var(--wc-text);
    padding: 30px;
    background-color: #F5F5F5;
    border-radius: 0;
    width: 100%;
}

/* Resetowanie standardowych marginesów */
.woocommerce-MyAccount-content p {
    margin-bottom: 15px;
}

.woocommerce-MyAccount-content > p {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Wspólne styles dla elementów panelu konta */
.dashboard-info-box,
.dashboard-recent-orders,
.woocommerce-order-details,
.woocommerce-EditAccountForm,
.woocommerce-address-fields {
    padding: 25px;
    border-radius: 0;
    margin-bottom: 30px;
}

/* Box z cieniem */
.dashboard-info-box,
.dashboard-recent-orders,
.woocommerce-order-details {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    background-color: white;
}

/* Elementy z obramowaniem */
.woocommerce-MyAccount-navigation-link,
.woocommerce-Address,
.woocommerce-address-fields {
    border: 1px solid rgba(99, 99, 97, 0.4);
}

/* Stylowanie formularzy */
.woocommerce-EditAccountForm,
.woocommerce-address-fields {
    padding: 25px;
    border-radius: 0;
}

/* Dodatkowe styles dla formularza edycji konta */
.woocommerce-EditAccountForm {
    margin-bottom: 50px; 
    min-height: 600px; 
}

/* Styles dla fieldsetów */
.woocommerce-EditAccountForm fieldset {
    margin: 30px 0;
    padding: 25px;
    border: 1px solid #e5e5e5;
}

.woocommerce-EditAccountForm legend {
    padding: 0 10px;
    font-weight: 600;
    font-size: 16px;
    color: #1D1D1B;
    background-color: white;
}

/* Stylowanie wirsów formularza */
.woocommerce-EditAccountForm .form-row,
.woocommerce-address-fields .form-row {
    margin-bottom: 20px;
}

.woocommerce-EditAccountForm p.form-row {
    margin-bottom: 25px;
}

.form-row {
    flex-wrap: wrap;
}

/* Wspólne styles dla wszystkich przycisków */
.woocommerce-EditAccountForm button,
.woocommerce-address-fields button,
.view-order-btn,
.woocommerce-orders-table .button {
    display: inline-block;
    padding: 8px 15px;
    background-color: #1D1D1B;
    color: white;
    text-decoration: none;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.woocommerce-address-fields button:hover,
.view-order-btn:hover,
.woocommerce-orders-table .button:hover {
    background-color: #DA6E4B;
}


/* Większy przycisk dla edycji konta */
.woocommerce-EditAccountForm button {
    margin-top: 20px;
    padding: 12px 25px;
    font-family: var(--body-font-family);
}

/* Stylowanie etykiet i pól formularza */
.woocommerce-address-fields label,
.woocommerce-EditAccountForm label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

/* Wspólne styles dla pól formularza */
.woocommerce-address-fields input[type="text"],
.woocommerce-address-fields input[type="tel"],
.woocommerce-address-fields input[type="email"],
.woocommerce-address-fields select,
.woocommerce-EditAccountForm input[type="text"],
.woocommerce-EditAccountForm input[type="tel"],
.woocommerce-EditAccountForm input[type="email"],
.woocommerce-EditAccountForm input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    font-size: 14px;
    font-family: var(--body-font-family);
}


.woocommerce-address-fields input[type="text"]:focus,
.woocommerce-address-fields input[type="tel"]:focus,
.woocommerce-address-fields input[type="email"]:focus,
.woocommerce-address-fields select:focus,
.woocommerce-EditAccountForm input[type="text"]:focus,
.woocommerce-EditAccountForm input[type="tel"]:focus,
.woocommerce-EditAccountForm input[type="email"]:focus,
.woocommerce-EditAccountForm input[type="password"]:focus {
  outline: none;
}

/* Stylowanie wyboru */
.woocommerce-address-fields select {
    height: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath fill='%231D1D1B' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

/* Informacja obok pola wyświetlanej nazwy */
.woocommerce-form-row + p {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Styles dla nagłówka panelu */
.dashboard-welcome-section {
    margin-bottom: 30px;
    border-bottom: none;
}

.dashboard-welcome-title {
    font-size: 32px;
    font-weight: 600;
    font-family: var(--title-font-family);
    margin-bottom: 15px;
    color: var(--wc-text);
}

.dashboard-greeting {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.dashboard-greeting a {
    color: #DA6E4B;
    text-decoration: none;
    margin-left: 5px;
}

.dashboard-greeting a:hover {
    text-decoration: underline;
}

/* Styles dla sekcji informacyjnej */
.dashboard-content {
    display: block;
}

.dashboard-info-box h3,
.dashboard-recent-orders h3,
.woocommerce-order-details__title,
.woocommerce-Address-title h3 {
    font-size: 20px;
    margin-bottom: 15px;
    font-family: var(--title-font-family);
    color: var(--wc-text);
    font-weight: 600;
}

.dashboard-info-box p {
    font-size: 15px;
    line-height: 1.6;
}

/* Styles dla linków */
.dashboard-link,
.view-all-orders-btn,
.woocommerce-Address-title a.edit {
    color: #DA6E4B;
    text-decoration: none;
}

.dashboard-link:hover,
.view-all-orders-btn:hover,
.woocommerce-Address-title a.edit:hover {
    text-decoration: underline;
}

/* Styles dla ostatnich zamówień */
.dashboard-orders-table,
.woocommerce-orders-table,
.woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.dashboard-orders-table th,
.woocommerce-orders-table thead th,
.woocommerce-table--order-details thead th {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 600;
    font-size: 14px;
}

.dashboard-orders-table td,
.woocommerce-orders-table tbody td,
.woocommerce-orders-table tbody th,
.woocommerce-table--order-details tbody td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 14px;
}

.woocommerce-orders-table thead th,
.woocommerce-table--order-details thead th {
    background-color: #F5F5F5;
}

.view-all-orders-btn {
    display: inline-block;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
}

.no-orders-message {
    font-style: italic;
    opacity: 0.8;
}

/* Styles dla tabeli zamówień */
.woocommerce-orders-table .woocommerce-orders-table__cell-order-number a {
    font-weight: 600;
    color: #1D1D1B;
    text-decoration: none;
}

.woocommerce-orders-table .woocommerce-orders-table__cell-order-number a:hover {
    color: #DA6E4B;
}

.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
    text-align: right;
}

.woocommerce-orders-table mark {
    background: none;
    font-weight: 600;
}

.woocommerce-orders-table .order-status {
    font-weight: 500;
}

/* Paginacja zamówień */
.woocommerce-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.woocommerce-pagination .woocommerce-button {
    padding: 8px 15px;
    margin: 0 5px;
    background-color: #F5F5F5;
    color: #1D1D1B;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
}

.woocommerce-pagination .woocommerce-button:hover {
    background-color: #DA6E4B;
    color: white;
    border-color: #DA6E4B;
}

/* Widok pojedynczego zamówienia */
.woocommerce-order-details {
    margin-top: 30px;
}

.woocommerce-table--order-details tfoot th,
.woocommerce-table--order-details tfoot td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e5e5;
    font-size: 14px;
}

.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table--order-details tfoot tr:last-child td {
    font-weight: 600;
}

/* Ogólne styles dla nawigacji na stronie konta */

.woocommerce-MyAccount-navigation ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
    width: 250px;
    background-color: #1D1D1B;
    padding: 20px;
}

.woocommerce-MyAccount-navigation ul li {
    margin-bottom: 5px;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 10px;
    color: #EFEEEC;
    text-decoration: none;
    transition: color 0.3s;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    color: #DA6E4B;
}

.woocommerce-MyAccount-navigation ul li.is-active a {
    font-weight: 600;
    color: #DA6E4B;
}

/* Styles dla zakładki Adresy */
.woocommerce-Addresses {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.woocommerce-Address {
    flex: 1;
    min-width: 300px;
    padding: 25px;
    border-radius: 0;
}

.woocommerce-Address-title {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.woocommerce-Address-title h3 {
    margin: 0;
}

.woocommerce-Address-title a.edit {
    font-size: 14px;
    font-weight: 500;
}

.woocommerce-Address address {
    font-style: normal;
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 15px;
}

/* Responsywność */
@media (max-width: 768px) {
    .woocommerce-dashboard .woocommerce,
    .woocommerce-orders .woocommerce,
    .woocommerce-downloads .woocommerce,
    .woocommerce-edit-address .woocommerce,
    .woocommerce-add-payment-method .woocommerce,
    .woocommerce-payment-methods .woocommerce,
    .woocommerce-edit-account .woocommerce,
    .woocommerce-customer-logout .woocommerce,
    .woocommerce-view-order .woocommerce{
        display: flex;
        flex-direction: column;
        margin-top: 120px;
        gap: 30px;
    }
    
    .woocommerce-edit-account .woocommerce {
        margin-top: 150px;
    }
    
    .woocommerce-MyAccount-content {
        padding: 15px;
    }
    
    .dashboard-welcome-title {
        font-size: 24px;
    }
    
    .dashboard-info-box,
    .dashboard-recent-orders,
    .woocommerce-EditAccountForm,
    .woocommerce-address-fields {
        padding: 15px;
    }
    
    .dashboard-orders-table,
    .woocommerce-orders-table {
        display: block;
        overflow-x: auto;
    }

    .woocommerce-MyAccount-navigation ul {
        width: 100%;
    }
    
    .woocommerce-Addresses {
        flex-direction: column;
    }
    
    .woocommerce-Address {
        width: 100%;
        min-width: 100%;
        margin-bottom: 20px;
    }
    
    /* Responsywność tabeli zamówień */
    .woocommerce-orders-table thead {
        display: none;
    }
    
    .woocommerce-orders-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #e5e5e5;
    }
    
    .woocommerce-orders-table tbody td,
    .woocommerce-orders-table tbody th {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        border-bottom: 1px solid #e5e5e5;
        text-align: right;
    }
    
    .woocommerce-orders-table tbody td:before,
    .woocommerce-orders-table tbody th:before {
        content: attr(data-title);
        font-weight: 600;
        text-align: left;
    }
    
    .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions {
        text-align: center;
        justify-content: center;
    }
    
    .woocommerce-orders-table .woocommerce-orders-table__cell-order-actions:before {
        display: none;
    }
}

/* Styles dla pola hasła i przycisku pokaż/ukryj */
.woocommerce-EditAccountForm .password-wrapper,
.woocommerce-edit-account .password-input {
    position: relative;
    width: 100%;
    display: block;
}

.woocommerce-EditAccountForm .custom-show-password,
.woocommerce-edit-account .show-password-input {
    position: absolute;
    right: 10px;
    top: 0;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    background-image: url('../icons/show.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.woocommerce-EditAccountForm .custom-show-password:hover,
.woocommerce-edit-account .show-password-input:hover {
    opacity: 1;
}

/* Dostosowanie pól hasła w formularzu edycji konta */
.woocommerce-EditAccountForm .password-input {
    display: block;
    width: 100%;
}

.woocommerce-EditAccountForm input[type="password"] {
    padding-right: 40px; /* Dodatkowe miejsce na przycisk pokaż/ukryj */
}

/* Stylizacja fieldset z hasłami */
.woocommerce-EditAccountForm fieldset {
    position: relative;
}

.woocommerce-EditAccountForm fieldset legend {
    position: absolute;
    top: -12px;
    left: 10px;
}

/* Wyrównanie przycisków w sekcji zmiany hasła */
.woocommerce-EditAccountForm fieldset .password-input {
    margin-bottom: 15px;
}

/* Styles dla przycisków w sekcji hasła */
.woocommerce-EditAccountForm fieldset button.custom-show-password {
    top: 50%;
    transform: translateY(-50%);
}

/* Poprawa wielkości przycisków zależnie od wielkości pola */
.woocommerce-EditAccountForm .custom-show-password,
.woocommerce-edit-account .show-password-input {
    height: 22px;
    width: 22px;
}

/* Dopasowanie do ciemnego motywu lub hoverów */
.woocommerce-EditAccountForm input[type="password"]:focus + .custom-show-password,
.woocommerce-edit-account .password-input:focus-within .show-password-input {
    opacity: 0.8;
}


#account_display_name_description {
    font-size: 12px;
    font-family: var(--body-font-family);
}

/* Style dla pojedynczego zamówienia */
.woocommerce-view-order .woocommerce-MyAccount-content {
    background-color: #F5F5F5;
    padding: 30px;
}

/* Informacja o zamówieniu */
.woocommerce-view-order .woocommerce-MyAccount-content > p:first-child {
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
    background-color: white;
    padding: 15px 20px;
    border-left: 3px solid #DA6E4B;
}

.woocommerce-view-order .woocommerce-MyAccount-content mark {
    background: transparent;
    font-weight: 600;
}

.woocommerce-view-order mark.order-number,
.woocommerce-view-order mark.order-date,
.woocommerce-view-order mark.order-status {
    padding: 0 3px;
}

/* Status zamówienia */
.woocommerce-view-order mark.order-status {
    background-color: #FFFBE5;
    color: #1D1D1B;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 500;
}

/* Szczegóły zamówienia */
.woocommerce-order-details {
    background-color: white;
    margin-bottom: 30px;
}

.woocommerce-order-details__title,
.woocommerce-column__title {
    font-size: 22px;
    margin-bottom: 20px;
    font-family: var(--title-font-family);
    color: #1D1D1B;
    font-weight: 600;
}

.woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
}

/* Produkty w zamówieniu */
.woocommerce-table--order-details .product-name {
    width: 60%;
}

.woocommerce-table--order-details .product-name a {
    color: #DA6E4B;
    text-decoration: none;
    font-weight: 500;
}

.woocommerce-table--order-details .product-name a:hover {
    text-decoration: underline;
}

.woocommerce-table--order-details .product-name .product-quantity {
    color: #666;
    font-size: 13px;
}

.woocommerce-table--order-details .product-total {
    text-align: right;
    font-weight: 500;
}

/* Podsumowanie zamówienia */
.woocommerce-table--order-details tfoot tr td {
    text-align: right;
}

.woocommerce-table--order-details tfoot tr:last-child {
    font-size: 16px;
}

/* Adresy dostawy i rozliczeniowy */
.woocommerce-customer-details {
    background-color: white;
    padding: 25px;
    margin-top: 30px;
}

.woocommerce-columns--addresses {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 10px;
}

.woocommerce-column--billing-address,
.woocommerce-column--shipping-address {
    flex: 1;
    min-width: 300px;
}

.woocommerce-column--billing-address address,
.woocommerce-column--shipping-address address {
    font-style: normal;
    line-height: 1.6;
    font-size: 14px;
}

/* Metody płatności i wysyłki */
.woocommerce-order-details-extra {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.woocommerce-shipping-method,
.woocommerce-payment-method {
    background-color: white;
    padding: 15px 20px;
    flex: 1;
    min-width: 250px;
    border-radius: 0;
}

.woocommerce-shipping-method h4,
.woocommerce-payment-method h4 {
    font-size: 16px;
    margin-bottom: 10px;
    font-family: var(--title-font-family);
    font-weight: 600;
}

/* Notatki do zamówienia */
.woocommerce-order-notes {
    background-color: white;
    padding: 25px;
    margin-top: 20px;
}

.woocommerce-order-notes h3 {
    font-size: 18px;
    margin-bottom: 15px;
    font-family: var(--title-font-family);
    font-weight: 600;
}

.woocommerce-order-notes p {
    font-size: 14px;
    line-height: 1.6;
}

/* Akcje dla zamówienia */
.woocommerce-order-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.woocommerce-order-actions a {
    display: inline-block;
    padding: 10px 15px;
    background-color: #1D1D1B;
    color: white;
    text-decoration: none;
    font-size: 14px;
    text-transform: uppercase;
    transition: background-color 0.3s;
    border: none;
}

.woocommerce-order-actions a:hover {
    background-color: #DA6E4B;
    text-decoration: none;
}

/* Kwota zamówienia - podsumowanie */
.order-total {
    font-weight: 600;
}

/* Responsywność dla widoku zamówienia */
@media (max-width: 768px) {
    .woocommerce-view-order .woocommerce-MyAccount-content {
        padding: 15px;
    }
    
    .woocommerce-table--order-details {
        display: block;
        overflow-x: auto;
    }
    
    .woocommerce-columns--addresses {
        flex-direction: column;
        gap: 20px;
    }
    
    .woocommerce-column--billing-address,
    .woocommerce-column--shipping-address {
        width: 100%;
    }
    
    .woocommerce-order-details-extra {
        flex-direction: column;
    }
}