/**
 * WooCommerce Custom Overrides & Resets
 *
 * Strips default WooCommerce gray borders, margins, and raw box styles
 * from authentication forms and notices for a clean Scandinavian look.
 *
 * @package AutoParts
 */

.woocommerce form.login,
.woocommerce form.register,
.woocommerce form.lost_reset_password,
.woocommerce-page form.login,
.woocommerce-page form.register,
.woocommerce-page form.lost_reset_password {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.woocommerce form.login .form-row,
.woocommerce form.register .form-row,
.woocommerce form.lost_reset_password .form-row {
    padding: 0;
    margin: 0 0 1rem 0;
}

.woocommerce form.login .password-input,
.woocommerce form.register .password-input {
    display: block;
    width: 100%;
    position: relative;
}

/* Hide WooCommerce's built-in password eye icon if injected, since we render a custom RTL-aligned toggle */
.woocommerce form.login .show-password-input,
.woocommerce form.register .show-password-input {
    display: none !important;
}

/* Clean guest auth page notices */
.autoparts-guest-auth-page .woocommerce-notices-wrapper {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
}

.autoparts-guest-auth-page .woocommerce-error,
.autoparts-guest-auth-page .woocommerce-message,
.autoparts-guest-auth-page .woocommerce-info {
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.6;
}

/* My Account Layout & Raw WooCommerce Resets */
.woocommerce-account .woocommerce {
    width: 100%;
}

.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
}

.woocommerce-account .woocommerce::before,
.woocommerce-account .woocommerce::after {
    display: none !important;
    content: none !important;
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table,
.woocommerce-account .woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #ffffff;
    font-size: 0.8125rem;
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table th,
.woocommerce-account .woocommerce-MyAccount-content table.shop_table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f4f4f5;
    text-align: right;
}

.woocommerce-account .woocommerce-MyAccount-content table.shop_table thead th {
    background: #fafafa;
    color: #71717a;
    font-weight: 600;
    font-size: 0.75rem;
}

.woocommerce-account .woocommerce-order-details__title,
.woocommerce-account .woocommerce-column__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #09090b;
    margin-bottom: 0.75rem;
}

.woocommerce-account .woocommerce-address-fields input.input-text,
.woocommerce-account .woocommerce-address-fields select,
.woocommerce-account .woocommerce-EditAccountForm input.input-text {
    width: 100%;
    height: 2.75rem;
    padding: 0 0.875rem;
    border-radius: 0.5rem;
    border: 1px solid #e4e4e7;
    background: #ffffff;
    font-size: 0.875rem;
    color: #09090b;
    outline: none;
    transition: border-color 0.15s ease;
}

.woocommerce-account .woocommerce-address-fields input.input-text:focus,
.woocommerce-account .woocommerce-address-fields select:focus,
.woocommerce-account .woocommerce-EditAccountForm input.input-text:focus {
    border-color: #0f172a;
}

.woocommerce-account .woocommerce-notices-wrapper {
    margin-bottom: 1.25rem;
}

.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-info,
.woocommerce-account .woocommerce-error {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-size: 0.8125rem;
    color: #18181b;
}

.woocommerce-account .woocommerce-message {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.woocommerce-account .woocommerce-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

/* WooCommerce Block Notice Banner (prevent giant unstyled SVG & crushed text) */
.wc-block-components-notice-banner {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e4e4e7;
    background: #ffffff;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #18181b;
}

.wc-block-components-notice-banner.is-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.wc-block-components-notice-banner.is-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

.wc-block-components-notice-banner.is-info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1e40af;
}

.wc-block-components-notice-banner svg,
.woocommerce-notices-wrapper svg,
.woocommerce-message svg,
.woocommerce-error svg,
.woocommerce-info svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex-shrink: 0 !important;
}

.wc-block-components-notice-banner__content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.wc-block-components-notice-banner__content a.wc-forward {
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

/* AJAX Added to cart link on product cards */
a.added_to_cart.wc-forward {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #2563eb;
}
a.added_to_cart.wc-forward:hover {
    text-decoration: underline;
}

