/*──────────────────────────────────────────────────────────────
  WooCommerce “My Account” Page Optimized Styling
──────────────────────────────────────────────────────────────*/

/* 1. Layout: Centering, max-width */
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce-MyAccount-navigation {
    max-width: 1000px;
    margin-right: auto;
    padding: 2rem 1rem;
}

/* 2. Navigation Tabs */
.woocommerce-account .woocommerce-MyAccount-navigation {
    padding: 0;
    margin-bottom: 1.5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
    flex: 1 1 auto;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: block;
    text-align: center;
    padding: 16px 24px;
    background: #F5F5F5;
    border-radius: 23px;
    font-weight: 600;
    text-decoration: none;
    color: black;
    -webkit-transition: background-color ease-out 0.2s;
    transition: background-color ease-out 0.2s;
    font-size: 14px;
    line-height: 1;
}

.woocommerce-account .woocommerce-MyAccount-navigation a:hover,
.aa-toggle-button:not(.active):hover
{
    background-color: #fcbc10;
    color: black !important;
}

.woocommerce-account .woocommerce-MyAccount-navigation .is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a:hover,
.aa-toggle-button.active
{
    background: black;
    color: #fff !important;
    cursor: default;
}

/* 3. Content Area */
.woocommerce-account .woocommerce-MyAccount-content {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 2rem;
}

/* 4. “Hello, [username]...” */
.woocommerce-account .woocommerce-MyAccount-content p.woocommerce-MyAccount-content__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0D3459;
    margin-bottom: 1.5rem;
}

/* 5. Form Styling (inputs, labels, button) */
.woocommerce-account .woocommerce-form-login .form-row,
.woocommerce-account .woocommerce-MyAccount-content .form-row {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.woocommerce-account .woocommerce-form-login .form-row label:not(.woocommerce-form__label-for-checkbox),
.woocommerce-account .woocommerce-MyAccount-content .form-row label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
    padding: 0;
    pointer-events: none;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-size: 1rem;
    transition: all 0.2s ease-out;
    background-color: transparent;

    max-width: 85%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.woocommerce-account .form-row.filled label:not(.woocommerce-form__label-for-checkbox),
.woocommerce-account .form-row.focused label:not(.woocommerce-form__label-for-checkbox) {
    top: 8px;
    transform: none;
    font-size: 0.75rem;
    background-color: #fff;
    left: 20px;
}

.woocommerce-account .form-row.filled label span.required,
.woocommerce-account .form-row.focused label span.required {
    color: #d9534f;
}

.woocommerce-account .form-row .description {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #666;
}

/* Inputs & Textareas */
.woocommerce-account form input.input-text,
.woocommerce-account form input[type="password"],
.woocommerce-account form textarea,
.woocommerce-account .woocommerce-MyAccount-content .form-row input.input-text,
.woocommerce-account .woocommerce-MyAccount-content .form-row input[type="password"],
.woocommerce-account .woocommerce-MyAccount-content .form-row input[type="email"],
.woocommerce-account .woocommerce-MyAccount-content .form-row input[type="tel"] {
    width: 100%;
    padding: 1.2rem 1rem 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.2s ease;
    padding: 23px 20px 8px 20px !important;
    max-width: 100%;
}

.woocommerce-account form input:focus,
.woocommerce-account form textarea:focus,
.woocommerce-account .woocommerce-MyAccount-content .form-row input:focus {
    border-color: #0D3459;
    outline: none;
}

.woocommerce-account .woocommerce-MyAccount-content .form-row textarea {
    padding: 1.4rem 1rem 0.5rem 1rem;
    border-radius: 4px;
    font-family: inherit;
}

.woocommerce-account .woocommerce-MyAccount-content
.form-row.filled textarea + label,
.woocommerce-account .woocommerce-MyAccount-content
.form-row.focused textarea + label {
    top: 0.2rem;
    font-size: 0.75rem;
    left: 0.75rem;
    color: #0D3459;
    background: #fff;
    padding: 0 0.25rem;
}

/* Show/hide password icon */
.woocommerce-account .show-password-input {
    position: absolute;
    top: 28px;
    right: 0.75rem;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    outline: none;
    background-image: url("../images/icons/eye-password-hide.svg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

.woocommerce-account .show-password-input.display-password {
    background-image: url("../images/icons/eye-password-show.svg");
}

.woocommerce-account .show-password-toggle::-moz-focus-inner {
    border: 0;
    padding: 0;
}

#password_strength, #account_display_name_description {
    margin-top: 0.5rem;
}

/* Buttons */
.woocommerce-account form .button {
    display: inline-block;
    padding: 14px 80px 11px;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    background: #000000;
    color: #FFFFFF;
    line-height: 1;
    text-transform: uppercase;
    transition: background-color 0.15s, color 0.15s;
    margin-top: 1rem;
}

.woocommerce-account form .button:hover,
.woocommerce-account table.shop_table a.button.view:hover {
    background: rgb(11, 94, 215);
    color: #fff !important;
}

.woocommerce-account .woocommerce-MyAccount-content a.button.logout {
    margin-top: 2rem;
    background: #d9534f;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.15s;
}

.woocommerce-account .woocommerce-MyAccount-content a.button.logout:hover {
    background: #c9302c;
}

/* Address Fields */
.woocommerce-account .woocommerce-address-fields__field-wrapper .form-row-first,
.woocommerce-account .woocommerce-address-fields__field-wrapper .form-row-last {
    width: 48%;
}

/* Orders Table */
.woocommerce-account table.shop_table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-family: 'Gilroy', sans-serif;
}

.woocommerce-account table.shop_table th,
.woocommerce-account table.shop_table td {
    border: 1px solid #e0e0e0;
    padding: 0.75rem 1rem;
    text-align: center;
}

.woocommerce-account table.shop_table th {
    background: #f0f0f0;
    font-weight: 600;
}

.woocommerce-account table.shop_table tr:nth-child(even) {
    background: #fafafa;
}

.woocommerce-account table.shop_table a.button.view {
    background: #000;
    color: #fff;
    padding: 0.5rem 0.9rem;
    font-size: 0.875rem;
    border-radius: 23px;
    text-decoration: none;
    transition: background 0.15s;
}

/* Address Boxes */
.woocommerce-MyAccount-content .u-columns {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.woocommerce-MyAccount-content .u-column1,
.woocommerce-MyAccount-content .u-column2,
.woocommerce-MyAccount-content .woocommerce-Address {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 24px;
    flex: 1 1 calc(48% - 20px);
    box-sizing: border-box;
    margin-bottom: 1.5rem;
}

.woocommerce-MyAccount-content .woocommerce-Address-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 0.75rem;
}

.woocommerce-MyAccount-content .woocommerce-Address-title a {
    font-family: 'Gilroy', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.15s;
}

.woocommerce-MyAccount-content .woocommerce-Address-title a:hover {
    color: #e1a80e;
}

.woocommerce-MyAccount-content .woocommerce-Address-address {
    font-family: 'Gilroy', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #000;
    margin-top: 0.5rem;
    white-space: pre-line;
}

.woocommerce-MyAccount-content .woocommerce-Address-address p {
    margin: 0.5rem 0 0;
    font-size: 1rem;
    color: #555;
}

.woocommerce-MyAccount-content .woocommerce-Address-title + .woocommerce-Address-address {
    margin-top: 1rem;
}

.woocommerce-MyAccount-content .u-columns ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-MyAccount-content .woocommerce-Address:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.25s;
}

/* Notices */
.woocommerce-notices-wrapper {
    margin-bottom: 1.5rem;
    width: 100%;
}

.woocommerce-notices-wrapper .woocommerce-error,
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info {
    position: relative;
    padding: 1rem 1.25rem;
    margin: 0 0 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
    outline: 0;
}

.woocommerce-notices-wrapper .woocommerce-error {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #721c24;
    list-style: none;
}

.woocommerce-notices-wrapper .woocommerce-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.woocommerce-notices-wrapper .woocommerce-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.woocommerce-notices-wrapper .woocommerce-error a.woocommerce-dismiss-notice,
.woocommerce-notices-wrapper .woocommerce-message a.woocommerce-dismiss-notice,
.woocommerce-notices-wrapper .woocommerce-info a.woocommerce-dismiss-notice {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    text-decoration: none;
    font-weight: bold;
    color: inherit;
}

.woocommerce-notices-wrapper .woocommerce-error a,
.woocommerce-notices-wrapper .woocommerce-error a:visited {
    color: #721c24;
    text-decoration: underline;
}

.woocommerce-notices-wrapper .woocommerce-message a,
.woocommerce-notices-wrapper .woocommerce-message a:visited {
    color: #155724;
    text-decoration: underline;
}

.woocommerce-notices-wrapper .woocommerce-info a,
.woocommerce-notices-wrapper .woocommerce-info a:visited {
    color: #0c5460;
    text-decoration: underline;
}

/*───────────────────────────────
    Responsive Tweaks
───────────────────────────────*/
@media (max-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-navigation ul {
        flex-direction: column;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation a {
        font-size: 0.9rem;
        padding: 0.6rem;
    }

    .woocommerce-account .woocommerce-MyAccount-content {
        padding: 1rem;
    }

    .woocommerce-account table.shop_table th,
    .woocommerce-account table.shop_table td {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .woocommerce-account form .button {
        width: 100%;
    }

    .woocommerce-MyAccount-content .u-columns {
        display: block;
    }

    .woocommerce-MyAccount-content .u-column1,
    .woocommerce-MyAccount-content .u-column2,
    .woocommerce-MyAccount-content .woocommerce-Address {
        width: 100% !important;
        margin-bottom: 1.5rem;
    }

    .woocommerce-account .woocommerce-address-fields__field-wrapper .form-row-first,
    .woocommerce-account .woocommerce-address-fields__field-wrapper .form-row-last {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .woocommerce-notices-wrapper .woocommerce-error,
    .woocommerce-notices-wrapper .woocommerce-message,
    .woocommerce-notices-wrapper .woocommerce-info {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Responsive WooCommerce Orders Table */
@media (max-width: 767px) {
    .woocommerce-account .woocommerce-MyAccount-content table.shop_table {
        display: block;
        width: 100%;
        overflow-x: auto;
        border-radius: 10px;
        box-shadow: 0 2px 16px rgba(0,0,0,0.03);
        margin-bottom: 1.5rem;
    }
    .woocommerce-account .woocommerce-MyAccount-content table.shop_table thead,
    .woocommerce-account .woocommerce-MyAccount-content table.shop_table tbody,
    .woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
    .woocommerce-account .woocommerce-MyAccount-content table.shop_table tr,
    .woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
        display: revert;
    }
    .woocommerce-account .woocommerce-MyAccount-content table.shop_table tr {
        border-bottom: 1px solid #e5e5e5;
    }
    .woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
    .woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
        white-space: nowrap;
        min-width: 90px;
        padding: 0.75rem 0.5rem;
        font-size: 0.96em;
    }
}

/* Style wrapper label for better spacing */
.woocommerce form .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
    user-select: none;
}

/* Hide the native checkbox */
.woocommerce form .woocommerce-form-login__rememberme input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 1.3em;
    height: 1.3em;
    margin: 0;
    cursor: pointer;
}

/* Custom square checkbox */
.woocommerce form .woocommerce-form-login__rememberme label:before,
.woocommerce form .woocommerce-form-login__rememberme input[type="checkbox"] + span:before {
    content: '';
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 12px;
    vertical-align: middle;
    background: #fff;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    position: relative;
}

/* Checked state (add your accent color) */
.woocommerce form .woocommerce-form-login__rememberme input[type="checkbox"]:checked + span:before {
    background: #fcbc10; /* your accent */
    border-color: #fcbc10;
    /* Optional: show checkmark (SVG as background) */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%230D3459' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 14px 14px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Label text (after the custom box) */
.woocommerce form .woocommerce-form-login__rememberme span {
    display: inline-block;
    vertical-align: middle;
    font-size: 1rem;
    color: #222;
    font-weight: 400;
    /* No margin-left: as our box uses margin-right above */
}

/* Improve accessibility on keyboard focus */
.woocommerce form .woocommerce-form-login__rememberme input[type="checkbox"]:focus + span:before {
    outline: 2px solid #0D3459;
    outline-offset: 2px;
}

/*────────────────────────────────────────────────────
  1) Overall Container & Toggle Buttons
────────────────────────────────────────────────────*/

.aa-auth-container {
    max-width: 450px;
    margin: 3rem auto;
    padding: 0;
    font-family: 'Gilroy', sans-serif;
    /* optional if you want a subtle shadow behind the entire container */
}
.aa-auth-toggle {
    display: flex;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}
.aa-toggle-button {
    flex: 1;
    background: #f5f5f5;
    border: none;
    padding: 1rem 0;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
}

/*────────────────────────────────────────────────────
  2) Form Wrappers & Card Styling
────────────────────────────────────────────────────*/

.aa-form-wrapper {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-top: none;  /* so the card connects under the active toggle */
    border-radius: 0 0 8px 8px;
    padding: 2rem 2rem;
}

/* Ensure whichever wrapper is hidden is not visible */
#aa-login-form[style*="display:none"],
#aa-register-form[style*="display:none"] {
    display: none !important;
}

/*────────────────────────────────────────────────────
  3) Style WooCommerce Form Fields
────────────────────────────────────────────────────*/


/* “Lost your password?” link, etc. */
.aa-form-wrapper .woocommerce-LostPassword {
    margin-top: 0.75rem;
    display: block;
}

/* “Remember me” & “Register” checkbox styling is unchanged;
   WooCommerce’s own markup carries its classes. */

/*────────────────────────────────────────────────────
  4) Responsive Tweaks
────────────────────────────────────────────────────*/

@media (max-width: 480px) {
    .aa-auth-container {
        margin: 2rem 1rem;
    }
    .aa-toggle-button {
        font-size: 0.9rem;
        padding: 0.8rem 0;
    }
    .aa-form-wrapper {
        padding: 1.5rem 1rem;
    }
}
