/**
 * My Account Page - Complete Redesign (Exact Match to Reference)
 * Kalitho Custom Theme
 */

/* --- 1. VARIABLES & THEME --- */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text-main: #1e293b;
    --text-secondary: #64748b;
    --bg-body: #f1f5f9;
    --white: #ffffff;
    --border-color: #e2e8f0;

    --status-green-bg: #dcfce7;
    --status-green-text: #166534;
    --status-orange-bg: #ffedd5;
    --status-orange-text: #9a3412;
    --status-blue-bg: #dbeafe;
    --status-blue-text: #1e40af;

    --radius-md: 8px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    -webkit-tap-highlight-color: transparent;
}

/* --- 2. LAYOUT --- */
/* Remove body margin for account section */
body.woocommerce-account {
    margin-top: 0 !important;
}

/* Hide navbar and footer on account page */
body.woocommerce-account .navbar,
body.woocommerce-account nav,
body.woocommerce-account header,
body.woocommerce-account footer,
body.woocommerce-account .site-footer,
body.woocommerce-account .footer-chat-bar,
body.woocommerce-account #footer-chat-bar {
    display: none !important;
}

.woocommerce-account {
    background-color: var(--bg-body);
    min-height: 100vh;
    padding-top: 0;
}

.woocommerce-account .woocommerce {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    min-height: 80vh;
}

/* Hide breadcrumbs on account page */
.woocommerce-account .woocommerce-breadcrumb {
    display: none;
}

/* --- 3. SIDEBAR & USER WIDGET (NEW DESIGN) --- */
.kalitho-user-widget-new {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.kalitho-user-widget-new .widget-header {
    background-color: #000000;
    background-image:
        linear-gradient(176deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.08) 35%, transparent 35%),
        linear-gradient(172deg, transparent 65%, rgba(255, 255, 255, 0.04) 65%, rgba(255, 255, 255, 0.04) 100%);
    height: 120px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kalitho-user-widget-new .widget-header a {
    color: #fff;
    opacity: 0.9;
    transition: opacity 0.2s;
    background: rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.kalitho-user-widget-new .widget-header a:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.kalitho-user-widget-new .widget-body {
    padding: 0 20px 24px;
    text-align: center;
    position: relative;
    margin-top: -50px;
    /* Pull profile up */
}

.kalitho-user-widget-new .profile-avatar-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 16px;
    border: 4px solid var(--white);
    background: #f1f5f9;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.kalitho-user-widget-new .profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kalitho-user-widget-new .edit-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.kalitho-user-widget-new .edit-profile-link svg {
    width: 14px;
    height: 14px;
    color: var(--text-secondary);
}

.kalitho-user-widget-new .edit-profile-link:hover {
    color: var(--primary);
}

.kalitho-user-widget-new .edit-profile-link:hover svg {
    color: var(--primary);
}

/* Navigation Menu - Visible */
.woocommerce-MyAccount-navigation {
    display: block;
    width: 280px;
    flex-shrink: 0;
}

.kalitho-menu-header {
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-color);
    margin-top: 8px;
}

.kalitho-menu-header:first-child {
    margin-top: 0;
}

.woocommerce-MyAccount-navigation ul {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation li {
    margin: 0;
    border-bottom: 1px solid #f1f5f9;
}

.woocommerce-MyAccount-navigation li:last-child {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation li a {
    padding: 16px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-main);
    font-weight: 500;
    border-left: 3px solid transparent;
    text-decoration: none;
    font-size: 14px;
}

.woocommerce-MyAccount-navigation li a:hover {
    background-color: #f8fafc;
    color: var(--primary);
}

.woocommerce-MyAccount-navigation li.is-active a {
    background-color: #eff6ff;
    color: var(--primary);
    font-weight: 600;
    border-left-color: var(--primary);
}


/* --- 4. MAIN CONTENT --- */
.woocommerce-MyAccount-content {
    background: var(--white);
    border-radius: 0;
    box-shadow: none;
    border: none;
    padding: 0;
    position: relative;
    animation: fadeIn 0.4s ease;
    width: 100%;
    max-width: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography styles matching previous turn */

.woocommerce-EditAccountForm label,
.woocommerce-MyAccount-content label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: none;
}

/* Modern Inputs */
.woocommerce-EditAccountForm .woocommerce-Input,
.woocommerce-EditAccountForm .input-text,
.woocommerce-EditAccountForm select,
.woocommerce-MyAccount-content input[type="text"],
.woocommerce-MyAccount-content input[type="email"],
.woocommerce-MyAccount-content input[type="tel"],
.woocommerce-MyAccount-content input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: #fff;
    transition: all 0.2s;
    font-family: var(--font-main);
}

.woocommerce-EditAccountForm .woocommerce-Input:focus,
.woocommerce-EditAccountForm .input-text:focus,
.woocommerce-MyAccount-content input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.woocommerce-EditAccountForm .woocommerce-Input:disabled,
.woocommerce-EditAccountForm .input-text:disabled,
.woocommerce-MyAccount-content input:disabled {
    background: #f8fafc;
    border-color: transparent;
    color: var(--text-main);
    cursor: default;
    font-weight: 500;
}

/* Buttons */
.woocommerce-MyAccount-content .button,
.woocommerce-MyAccount-content button[type="submit"],
.btn,
.btn-primary {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3);
}

.woocommerce-MyAccount-content .button:hover,
.woocommerce-MyAccount-content button[type="submit"]:hover,
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* --- 5. MOBILE RESPONSIVE --- */
@media (max-width: 992px) {
    .woocommerce-account .woocommerce {
        display: block;
        margin: 0;
        padding: 0;
    }

    .woocommerce-MyAccount-navigation {
        width: 100%;
        margin-bottom: 0;
    }

    .woocommerce-MyAccount-content {
        padding: 0;
        border-radius: 0;
    }
}