/* Flex My Account Widget - Main Styles */

/* Base Navigation and Content Layout - Dynamic styles applied via inline CSS in widget */

.flex-my-account-widget .account-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.flex-my-account-widget .account-nav a {
    display: block;
    padding: 12px 16px;
    background: #f8f9fa;
    text-decoration: none;
    border-radius: 8px;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
}

.flex-my-account-widget .account-nav a:hover,
.flex-my-account-widget .account-nav a.active {
    background: #48543C;
    color: white;
    transform: translateY(-2px);
}

.flex-my-account-widget .account-main {
    flex: 1;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: none;
}

/* Statistics Grid */
.flex-my-account-widget .stat-card {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #48543C;
}

.flex-my-account-widget .stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #48543C;
    margin-bottom: 5px;
}

.flex-my-account-widget .stat-label {
    font-size: 14px;
    color: #666;
}

/* Orders Table - FLEX Layout */
.flex-my-account-widget .woocommerce-orders-table {
    width: 100% !important;
    display: block;
}

.flex-my-account-widget .woocommerce-orders-table thead {
    display: none;
}

.flex-my-account-widget .woocommerce-orders-table tbody {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.flex-my-account-widget .woocommerce-orders-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #48543C;
    transition: all 0.3s ease;
}

.flex-my-account-widget .woocommerce-orders-table tbody tr:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.flex-my-account-widget .woocommerce-orders-table tbody td,
.flex-my-account-widget .woocommerce-orders-table tbody th {
    flex: 1 1 auto;
    min-width: 150px;
    padding: 8px 12px;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.flex-my-account-widget .woocommerce-orders-table tbody td::before,
.flex-my-account-widget .woocommerce-orders-table tbody th::before {
    content: attr(data-title);
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Order Number Styling */
.flex-my-account-widget th.woocommerce-orders-table__cell-order-number a,
.flex-my-account-widget td.woocommerce-orders-table__cell-order-number a {
    color: #48543C;
    font-family: "Manrope", sans-serif;
}

/* Order Actions Buttons */
.flex-my-account-widget td.woocommerce-orders-table__cell-order-actions a {
    padding: 5px 16px;
}

.flex-my-account-widget .woocommerce-orders-table tbody .woocommerce-orders-table__cell-order-actions {
    flex: 0 0 auto;
    min-width: auto;
    margin-left: auto;
    align-self: center;
}

.flex-my-account-widget .woocommerce-orders-table tbody .woocommerce-orders-table__cell-order-actions::before {
    display: none;
}

.flex-my-account-widget .woocommerce-orders-table .button {
    white-space: nowrap;
}

.flex-my-account-widget .account-orders {
    width: 100%;
}

/* Addresses Styling */
.flex-my-account-widget .woocommerce-Addresses {
    display: flex;
    flex-wrap: wrap;
}

.flex-my-account-widget .woocommerce-Address {
    position: relative;
    flex: 1;
    min-width: 250px;
    background: #fff !important;
}

.flex-my-account-widget .woocommerce-Address-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.flex-my-account-widget .woocommerce-Address-title h3 {
    margin: 0;
}

.flex-my-account-widget .woocommerce-Address .edit {
    padding: 5px 16px;
}

/* Order View - FLEX Layout */
.flex-my-account-widget .account-view-order {
    width: 100%;
}

.flex-my-account-widget .account-view-order .woocommerce-order-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.flex-my-account-widget .account-view-order .woocommerce-table {
    width: 100%;
    display: block;
}

.flex-my-account-widget .account-view-order .woocommerce-table thead {
    display: none;
}

.flex-my-account-widget .account-view-order .woocommerce-table tbody {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.flex-my-account-widget .account-view-order .woocommerce-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #48543C;
}

.flex-my-account-widget .account-view-order .woocommerce-table tbody td,
.flex-my-account-widget .account-view-order .woocommerce-table tbody th {
    flex: 1 1 auto;
    min-width: 150px;
    padding: 0px;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.flex-my-account-widget .account-view-order .woocommerce-table tbody td::before,
.flex-my-account-widget .account-view-order .woocommerce-table tbody th::before {
    content: attr(data-title);
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Order Details Footer */
.flex-my-account-widget table.woocommerce-table--order-details tfoot {
    text-align: left;
    display: block;
    margin: 16px 0px;
}

/* Back to Orders Button */
.flex-my-account-widget a.back-to-orders {
    background: #48543C;
    color: #fff !important;
    padding: 5px 16px;
    border-radius: 16px;
    text-decoration: none;
    display: inline-block;
}

.flex-my-account-widget a.back-to-orders:hover {
    background: #333;
}

/* Password Accordion */
.flex-my-account-widget button.password-accordion-toggle {
    background: #48543C !important;
    color: #fff !important;
    border: 0px !important;
    border-radius: 8px !important;
}

.flex-my-account-widget button.password-accordion-toggle i {
    color: #fff !important;
}

/* Form Buttons */
.flex-my-account-widget .woocommerce-form button[type="submit"],
.flex-my-account-widget .woocommerce-form .button {
    color: #ffffff !important;
    background-color: #48543C !important;
    padding: 10px 16px !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    border: 0px !important;
}

.flex-my-account-widget .woocommerce-form button[type="submit"]:hover,
.flex-my-account-widget .woocommerce-form .button:hover {
    background-color: #333;
}

/* Lost Password Link */
.flex-my-account-widget p.woocommerce-LostPassword.lost_password a {
    background: #000;
    color: #fff;
    padding: 8px 16px;
    border-radius: 16px;
    text-decoration: none;
    display: inline-block;
}

.flex-my-account-widget p.woocommerce-LostPassword.lost_password a:hover {
    background: #333;
}

/* Login Form - Single Line Layout on Desktop */
.flex-my-account-widget .woocommerce-form-login__rememberme {
    display: inline-block;
    margin-right: 16px;
}

.flex-my-account-widget .woocommerce-form-login .button {
    display: inline-block;
    margin-right: 16px;
}

.flex-my-account-widget p.woocommerce-LostPassword.lost_password {
    display: inline-block;
    margin: 0;
}

/* Customer Details in Order View */
.flex-my-account-widget .account-view-order .woocommerce-customer-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0px;
}

.flex-my-account-widget .account-view-order .woocommerce-customer-details address {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #48543C;
}

/* Скрываем иконку в уведомлениях виджета */
.flex-my-account-widget .woocommerce-message::before {
    display: none !important;
    content: none !important;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .flex-my-account-widget .account-main {
        padding: 20px;
    }
    
    .flex-my-account-widget .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .flex-my-account-widget .account-content {
        flex-direction: column !important;
        gap: 15px;
    }
    
    .flex-my-account-widget .account-navigation {
        flex: none !important;
    }
    
    .flex-my-account-widget .account-nav {
        display: flex !important;
        gap: 10px;
        padding: 1em;
        margin: 0;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .flex-my-account-widget .account-nav li {
        margin-bottom: 0;
    }
    
    .flex-my-account-widget .account-nav a {
        white-space: nowrap;
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .flex-my-account-widget .account-main {
        padding: 15px;
    }
    
    .flex-my-account-widget .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .flex-my-account-widget .stat-card {
        padding: 15px;
    }
    
    .flex-my-account-widget .stat-number {
        font-size: 20px;
    }
    
    .flex-my-account-widget .stat-label {
        font-size: 13px;
    }
    
    /* Mobile Orders Table */
    .flex-my-account-widget .woocommerce-orders-table {
        font-size: 13px;
    }
    
    .flex-my-account-widget .woocommerce-orders-table tbody tr {
        flex-direction: column;
        gap: 15px;
    }
    
    .flex-my-account-widget .woocommerce-orders-table tbody td,
    .flex-my-account-widget .woocommerce-orders-table tbody th {
        min-width: 100%;
    }
    
    .flex-my-account-widget .woocommerce-orders-table tbody .woocommerce-orders-table__cell-order-actions {
        margin-left: 0;
        align-self: stretch;
    }
    
    .flex-my-account-widget .woocommerce-orders-table tbody .woocommerce-orders-table__cell-order-actions::before {
        display: block;
    }
    
    .flex-my-account-widget .woocommerce-orders-table thead {
        display: none;
    }
    
    .flex-my-account-widget .woocommerce-orders-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 10px;
    }
    
    .flex-my-account-widget .woocommerce-orders-table td {
        display: block;
        text-align: left !important;
        padding: 8px 0 !important;
        border: none !important;
    }
    
    .flex-my-account-widget .woocommerce-orders-table td:before {
        content: attr(data-title) ": ";
        font-weight: bold;
        display: inline-block;
        margin-right: 5px;
    }
    
    /* Mobile Addresses */
    .flex-my-account-widget .woocommerce-Addresses {
        display: block !important;
    }
    
    .flex-my-account-widget .woocommerce-Address {
        width: 100% !important;
        margin-bottom: 15px;
    }
    
    /* Mobile Forms */
    .flex-my-account-widget .form-row-first,
    .flex-my-account-widget .form-row-last {
        width: 100% !important;
        float: none !important;
    }
    
    /* Elementor Specific */
    .elementor-element-7f3154b5 {
        padding-top: 0em;
    }
    
    /* Mobile Login Form */
    .flex-my-account-widget .account-login {
        padding: 2em;
    }
}

/* Small Mobile Responsive */
@media (max-width: 480px) {
    .flex-my-account-widget .account-nav a {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .flex-my-account-widget .account-main {
        padding: 10px;
    }
    
    .flex-my-account-widget h3 {
        font-size: 18px;
    }
}
