/*
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* ==========================================================================
   Global Layout - Sticky Footer
   ========================================================================== */

body.elementor-default,
body.woocommerce-account {
    display: flex !important;
    flex-direction: column;
    min-height: 100vh;
}

body.elementor-default > .elementor,
body.elementor-default > main.site-main,
body.woocommerce-account > .elementor,
body.woocommerce-account > main.site-main {
    flex: 1 0 auto;
}

body.elementor-default > footer,
body.elementor-default > .site-footer,
body.elementor-default > [data-elementor-type="footer"],
body.woocommerce-account > footer,
body.woocommerce-account > .site-footer,
body.woocommerce-account > [data-elementor-type="footer"] {
    flex-shrink: 0;
}

/* ==========================================================================
   WooCommerce My Account - Custom Styles
   Brand: #4f7345 (primary green) / #3d5a36 (dark green) / #c9a962 (gold)
   ========================================================================== */

/* Override Elementor Pro WooCommerce widget CSS variables */
.e-my-account-tab,
.woocommerce-account {
    --tabs-active-color: #4f7345;
    --tabs-hover-color: #3d5a36;
    --links-normal-color: #4f7345;
    --links-hover-color: #3d5a36;
    --tables-links-normal-color: #4f7345;
    --tables-links-hover-color: #3d5a36;
    --tables-buttons-border-color: #4f7345;
    --general-text-color: #333;
    --tabs-normal-color: #555;
}

/* ---- Navigation / Tabs ---- */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.woocommerce-MyAccount-navigation ul li a:hover {
    color: #4f7345;
    background: rgba(79, 115, 69, 0.05);
    border-left-color: rgba(79, 115, 69, 0.3);
}

.woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--dashboard.is-active a,
.woocommerce-MyAccount-navigation ul li a[aria-current="page"] {
    color: #4f7345;
    font-weight: 600;
    background: rgba(79, 115, 69, 0.08);
    border-left-color: #4f7345;
}

/* ---- Content Area ---- */
.woocommerce-MyAccount-content {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.woocommerce-MyAccount-content > p:first-child {
    font-size: 15px;
    color: #444;
    margin-bottom: 24px;
}

/* Dashboard greeting links */
.woocommerce-MyAccount-content a {
    color: #4f7345;
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce-MyAccount-content a:hover {
    color: #3d5a36;
    text-decoration: underline;
}

/* ---- Section Titles ---- */
.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
    color: #1d2327;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ---- Orders Table ---- */
.woocommerce-orders-table,
.woocommerce-MyAccount-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.woocommerce-orders-table thead th,
.woocommerce-MyAccount-content table thead th {
    background: #4f7345;
    color: #fff;
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.woocommerce-orders-table thead th:first-child {
    border-radius: 4px 0 0 0;
}

.woocommerce-orders-table thead th:last-child {
    border-radius: 0 4px 0 0;
}

.woocommerce-orders-table tbody td,
.woocommerce-MyAccount-content table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    color: #444;
    vertical-align: middle;
}

.woocommerce-orders-table tbody tr:hover td {
    background: rgba(79, 115, 69, 0.03);
}

.woocommerce-orders-table .woocommerce-orders-table__cell-order-number a {
    color: #4f7345;
    font-weight: 600;
}

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

/* Order action buttons */
.woocommerce-orders-table .woocommerce-button,
.woocommerce-MyAccount-content .woocommerce-button,
.woocommerce-MyAccount-content a.woocommerce-button {
    display: inline-block;
    padding: 8px 16px !important;
    background: #fff !important;
    color: #4f7345 !important;
    border: 1px solid #4f7345 !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.4;
    text-align: center;
}

.woocommerce-orders-table .woocommerce-button:hover,
.woocommerce-MyAccount-content .woocommerce-button:hover,
.woocommerce-MyAccount-content a.woocommerce-button:hover {
    background: #4f7345 !important;
    color: #fff !important;
}

/* ---- Addresses ---- */

/* Override WooCommerce floats + Elementor layout */
.woocommerce .col2-set.addresses,
.e-my-account-tab .col2-set.addresses,
.woocommerce-account .col2-set.addresses {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 24px !important;
    width: 100% !important;
}

.woocommerce .col2-set.addresses::after,
.woocommerce .col2-set.addresses::before {
    display: none !important;
    content: none !important;
}

.woocommerce .col2-set.addresses > .col-1,
.woocommerce .col2-set.addresses > .col-2,
.e-my-account-tab .col2-set.addresses > .col-1,
.e-my-account-tab .col2-set.addresses > .col-2 {
    float: none !important;
    width: calc(50% - 12px) !important;
    flex: 0 0 calc(50% - 12px) !important;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px !important;
    box-sizing: border-box;
    position: relative;
}

/* Address title header */
.e-my-account-tab .woocommerce-Address .title,
.woocommerce-Address .title,
.woocommerce-Address header.woocommerce-Address-title {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 12px;
    padding-bottom: 12px;
    padding-top: 0 !important;
    border-bottom: 1px solid #eee;
}

.e-my-account-tab .woocommerce-Address .title h2,
.e-my-account-tab .woocommerce-Address .title h3,
.woocommerce-Address .title h2,
.woocommerce-Address .title h3 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 15px !important;
    color: #1d2327;
}

.e-my-account-tab .woocommerce-Address .title a.edit,
.woocommerce-Address .title a.edit {
    font-size: 13px !important;
    color: #4f7345 !important;
    text-decoration: none;
    font-weight: 500;
    position: static !important;
    float: none !important;
    margin: 0 !important;
}

.e-my-account-tab .woocommerce-Address .title a.edit:hover,
.woocommerce-Address .title a.edit:hover {
    color: #3d5a36 !important;
    text-decoration: underline;
}

.e-my-account-tab .woocommerce-Address address,
.woocommerce-Address address {
    font-style: normal;
    color: #555;
    line-height: 1.7;
    font-size: 14px;
    padding: 0 !important;
}

/* ---- Forms (edit account, edit address) ---- */
.woocommerce-MyAccount-content .woocommerce-EditAccountForm,
.woocommerce-MyAccount-content .woocommerce-address-fields {
    max-width: 600px;
}

.woocommerce-MyAccount-content .form-row {
    margin-bottom: 20px;
}

.woocommerce-MyAccount-content .form-row label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #1d2327;
    margin-bottom: 6px;
}

.woocommerce-MyAccount-content .form-row label .required {
    color: #c9a962;
}

.woocommerce-MyAccount-content .form-row input[type="text"],
.woocommerce-MyAccount-content .form-row input[type="email"],
.woocommerce-MyAccount-content .form-row input[type="tel"],
.woocommerce-MyAccount-content .form-row input[type="password"],
.woocommerce-MyAccount-content .form-row select,
.woocommerce-MyAccount-content .form-row textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    line-height: 1.4;
    box-sizing: border-box;
}

.woocommerce-MyAccount-content .form-row input:focus,
.woocommerce-MyAccount-content .form-row select:focus,
.woocommerce-MyAccount-content .form-row textarea:focus {
    border-color: #4f7345;
    box-shadow: 0 0 0 2px rgba(79, 115, 69, 0.15);
    outline: none;
}

/* Save / Submit buttons */
.woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-MyAccount-content button[type="submit"],
.woocommerce-MyAccount-content input[type="submit"] {
    background: #4f7345 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 32px !important;
    border-radius: 4px !important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none !important;
    line-height: 1.4;
}

.woocommerce-MyAccount-content .woocommerce-Button:hover,
.woocommerce-MyAccount-content button[type="submit"]:hover,
.woocommerce-MyAccount-content input[type="submit"]:hover {
    background: #3d5a36 !important;
    color: #fff !important;
}

/* ---- Messages / Notices ---- */
.woocommerce-MyAccount-content .woocommerce-message,
.woocommerce-account .woocommerce-message {
    border-top-color: #4f7345;
    background: rgba(79, 115, 69, 0.06);
    color: #333;
    padding: 12px 16px;
    border-radius: 0 0 4px 4px;
    font-size: 14px;
}

.woocommerce-MyAccount-content .woocommerce-message::before {
    color: #4f7345;
}

.woocommerce-MyAccount-content .woocommerce-info {
    border-top-color: #c9a962;
    background: rgba(201, 169, 98, 0.06);
}

.woocommerce-MyAccount-content .woocommerce-error {
    border-top-color: #dc3545;
}

/* ---- Order Detail View ---- */
.woocommerce-MyAccount-content .woocommerce-order-details {
    margin-top: 24px;
}

.woocommerce-MyAccount-content .order-again .button {
    background: #4f7345 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 4px !important;
    font-size: 14px;
    font-weight: 500;
}

.woocommerce-MyAccount-content .order-again .button:hover {
    background: #3d5a36 !important;
}

/* ---- No orders message ---- */
.woocommerce-MyAccount-content .woocommerce-info {
    padding: 16px 20px;
    font-size: 14px;
    border-radius: 4px;
}

/* ---- Payment Methods ---- */
.woocommerce-MyAccount-content .woocommerce-PaymentMethods {
    border-collapse: collapse;
}

/* ---- Responsive ---- */
@media screen and (max-width: 768px) {
    .woocommerce .col2-set.addresses,
    .e-my-account-tab .col2-set.addresses {
        flex-direction: column !important;
    }

    .woocommerce .col2-set.addresses > .col-1,
    .woocommerce .col2-set.addresses > .col-2,
    .e-my-account-tab .col2-set.addresses > .col-1,
    .e-my-account-tab .col2-set.addresses > .col-2 {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    .woocommerce-orders-table thead {
        display: none;
    }

    .woocommerce-orders-table tbody tr {
        display: block;
        border: 1px solid #eee;
        border-radius: 6px;
        margin-bottom: 12px;
        padding: 16px;
        background: #fff;
    }

    .woocommerce-orders-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #f5f5f5;
    }

    .woocommerce-orders-table tbody td:last-child {
        border-bottom: none;
    }

    .woocommerce-orders-table tbody td::before {
        content: attr(data-title);
        font-weight: 600;
        color: #1d2327;
        font-size: 13px;
    }

    .woocommerce-MyAccount-content .woocommerce-EditAccountForm,
    .woocommerce-MyAccount-content .woocommerce-address-fields {
        max-width: 100%;
    }
}
