/**
 * My Account Dashboard Styles
 * Version: 1.0.0
 */

:root {
    --mtj-primary: #20836f;
    --mtj-sidebar-width: 280px;
    --mtj-bg: #f9fafb;
    --mtj-border: #e5e7eb;
    --mtj-text: #1f2937;
    --mtj-text-muted: #6b7280;
}

/* Page Wrapper */
.page-wrapper.my-account {
    background: var(--mtj-bg);
    min-height: 100vh;
    padding: 0 !important;
    margin: 0 !important;
}

.page-wrapper.my-account .page-title {
    display: none;
}

/* Dashboard Layout */
.mtj-dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.mtj-sidebar {
    width: var(--mtj-sidebar-width);
    min-width: var(--mtj-sidebar-width);
    background: white;
    border-right: 1px solid var(--mtj-border);
    padding: 30px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

.mtj-sidebar-header {
    padding: 0 20px 30px;
}

/* Navigation Menu */
.mtj-sidebar-nav {
    margin: 0;
}

.mtj-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mtj-nav-item {
    margin: 0;
}

.mtj-nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--mtj-text-muted);
    font-weight: 500;
    background: transparent;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.mtj-nav-item a:hover {
    background: #f3f4f6;
    color: var(--mtj-text);
}

.mtj-nav-item.is-active a {
    color: var(--mtj-primary);
    font-weight: 600;
    background: rgba(32, 131, 111, 0.1);
    border-left-color: var(--mtj-primary);
}

.mtj-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mtj-nav-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* Logout item — visually separated */
.mtj-nav-item.mtj-nav-logout {
    margin-top: 8px;
    border-top: 1px solid #e8e8e8;
    padding-top: 8px;
}

.mtj-nav-item.mtj-nav-logout a {
    color: #999;
}

.mtj-nav-item.mtj-nav-logout a:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Main Content */
.mtj-main-content {
    flex: 1;
    padding: 30px;
    overflow-x: hidden;
}

.mtj-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .mtj-dashboard-layout {
        flex-direction: column;
    }

    .mtj-sidebar {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--mtj-border);
        position: relative;
        height: auto;
        overflow-y: visible;
    }

    .mtj-nav-menu {
        display: flex;
        overflow-x: auto;
        gap: 4px;
        padding: 0 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .mtj-nav-menu::-webkit-scrollbar {
        display: none;
    }

    .mtj-nav-item {
        flex: 0 0 auto;
    }

    .mtj-nav-item a {
        padding: 10px 15px;
        border-left: none;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
    }

    .mtj-nav-item.is-active a {
        border-left: none;
        border-bottom-color: var(--mtj-primary);
    }

    .mtj-main-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .mtj-sidebar {
        padding: 15px 0;
    }

    .mtj-sidebar-header {
        padding: 0 15px 15px;
    }

    .mtj-main-content {
        padding: 15px;
    }
}

/* ==========================================
   Login Page — Modern centered card
   Matches the standalone password page design
   ========================================== */

.mtj-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    padding: 20px;
}

.mtj-login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
    padding: 48px 40px;
}

.mtj-login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.mtj-login-logo img {
    max-height: 40px;
    width: auto;
}

.mtj-login-logo .custom-logo-link {
    display: inline-block;
}

.mtj-login-icon {
    text-align: center;
    font-size: 56px;
    margin-bottom: 16px;
}

.mtj-login-title {
    text-align: center;
    font-size: 24px;
    color: #1a1a2e;
    margin-bottom: 8px;
    font-weight: 700;
}

.mtj-login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 32px;
    font-size: 15px;
    line-height: 1.5;
}

.mtj-login-error {
    background: #fde8e8;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Hide WC default elements inside the modern card */
.mtj-login-card .account-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    background: none;
}

.mtj-login-card .account-container.lightbox-inner {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0;
}

.mtj-login-card .account-login-inner h2,
.mtj-login-card .col2-set h2,
.mtj-login-card .account-register-inner h2 {
    display: none;
}

/* Hide the registration side — customers are created via quotes */
.mtj-login-card .col2-set {
    display: block;
}

.mtj-login-card .col2-set > .col-2 {
    display: none;
}

.mtj-login-card .col2-set > .col-1 {
    width: 100%;
    max-width: 100%;
    flex: none;
    padding: 0;
}

/* Divider between login/register cols */
.mtj-login-card .row-divided > .col:first-child::after {
    display: none;
}

/* Form fields — match the standalone password page */
.mtj-login-card .woocommerce-form-row {
    margin-bottom: 20px;
}

.mtj-login-card .woocommerce-form-row label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

.mtj-login-card .woocommerce-form-row .input-text,
.mtj-login-card .woocommerce-Input--text {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
}

.mtj-login-card .woocommerce-Input--text:focus {
    border-color: var(--mtj-primary, #20836f);
}

/* Remember me */
.mtj-login-card .woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #555;
}

.mtj-login-card .woocommerce-form-login__rememberme input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--mtj-primary, #20836f);
}

/* Login button — full width, branded */
.mtj-login-card .woocommerce-form-login__submit,
.mtj-login-card button[name="login"] {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: var(--mtj-primary, #20836f);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
    text-transform: none;
    letter-spacing: 0;
}

.mtj-login-card .woocommerce-form-login__submit:hover,
.mtj-login-card button[name="login"]:hover {
    background: #1a6d5b;
}

/* Lost password link */
.mtj-login-card .lost_password {
    text-align: center;
    margin-top: 16px;
}

.mtj-login-card .lost_password a {
    color: var(--mtj-primary, #20836f);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.mtj-login-card .lost_password a:hover {
    text-decoration: underline;
}

/* Footer */
.mtj-login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #999;
}

.mtj-login-footer a {
    color: var(--mtj-primary, #20836f);
    text-decoration: none;
}

.mtj-login-footer a:hover {
    text-decoration: underline;
}

/* WooCommerce notices inside login card */
.mtj-login-card .woocommerce-error,
.mtj-login-card .woocommerce-message,
.mtj-login-card .woocommerce-info {
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Responsive tweaks */
@media (max-width: 480px) {
    .mtj-login-card {
        padding: 32px 24px;
    }

    .mtj-login-icon {
        font-size: 44px;
    }

    .mtj-login-title {
        font-size: 20px;
    }
}
