/* 
   Apple macOS Venture Design System 
   Focus: Side-by-Side Layout, Glassmorphism, Rounded Shapes, and High-End Depth.
*/

:root {
    --mac-bg: #ececec;
    --mac-sidebar-bg: rgba(246, 246, 246, 0.75);
    --mac-content-bg: #ffffff;
    --mac-accent: #007aff;
    --mac-text: #1d1d1f;
    --mac-text-dim: #86868b;
    --mac-border: rgba(0, 0, 0, 0.1);
    --mac-radius: 12px;
    --mac-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --mac-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.woocommerce-account {
    background-color: var(--mac-bg);
    color: var(--mac-text);
    font-family: var(--mac-font);
}

.woocommerce-account .woocommerce {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 !important;
}

/* 1. macOS Layout Wrapper */
.apple-macos-layout {
    display: flex;
    background: var(--mac-content-bg);
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    min-height: 700px;
    border: 1px solid var(--mac-border);
}

/* 2. Sidebar (Desktop) */
.apple-macos-sidebar {
    width: 280px;
    background: var(--mac-sidebar-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid var(--mac-border);
    padding: 30px 15px;
    flex-shrink: 0;
}

.apple-macos-nav {
    display: block !important;
    width: 100% !important;
}

/* 3. Sidebar Profile Snippet */
.apple-sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px 30px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.apple-profile-circle img {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border: 1px solid var(--mac-border);
}

.apple-profile-info {
    display: flex;
    flex-direction: column;
}

.apple-profile-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--mac-text);
}

.apple-profile-role {
    font-size: 11px;
    color: var(--mac-text-dim);
    font-weight: 600;
}

/* 4. Navigation List (macOS Settings Style) */
.apple-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.apple-nav-item {
    margin-bottom: 2px;
}

.apple-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none !important;
    color: var(--mac-text);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.apple-nav-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

.apple-nav-item.is-active .apple-nav-link {
    background: var(--mac-accent);
    color: #fff !important;
}

.apple-nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    color: #5d5d5d;
}

.apple-nav-item.is-active .apple-nav-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: none;
}

/* 5. Main Content Area */
.apple-macos-main-content {
    flex-grow: 1;
    background: #fff;
    padding: 40px;
    overflow-y: auto;
}

.woocommerce-MyAccount-content {
    width: 100% !important;
    padding: 0 !important;
}

/* 6. macOS Cards */
.apple-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    margin-bottom: 25px;
}

.apple-section-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 30px;
}

/* 7. Buttons (macOS Style) */
.apple-button {
    background: var(--mac-accent);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
    transition: transform 0.1s;
}

.apple-button:active {
    transform: scale(0.97);
}

/* 8. Dashboard Grid Overrides */
.apple-app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.app-item {
    background: #f8f8f8;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #fff;
    margin: 0 auto 10px auto;
    font-size: 20px;
    color: var(--mac-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

/* 9. Mobile Responsiveness (The tricky part) */
@media (max-width: 900px) {
    .apple-macos-layout {
        flex-direction: column;
        margin: 0;
        border-radius: 0;
        border: none;
    }

    .apple-macos-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--mac-border);
        padding: 20px;
    }

    .apple-nav-list {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        scrollbar-width: none;
        padding-bottom: 10px;
    }

    .apple-nav-list::-webkit-scrollbar {
        display: none;
    }

    .apple-nav-link {
        flex-direction: column;
        padding: 12px 10px;
        min-width: 80px;
        text-align: center;
    }

    .apple-nav-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-bottom: 5px;
    }

    .apple-nav-label {
        font-size: 11px;
        white-space: nowrap;
    }

    .apple-macos-main-content {
        padding: 20px;
    }

    .apple-sidebar-profile {
        display: none;
        /* Hide profile snippet on mobile sidebar to save space */
    }
}