/* Account base styles are scoped to account pages via body.account-body
   IMPORTANT: All styles must be scoped to .account-layout to avoid affecting
   the Shop-Header, Footer, and other shared components from the shop app */

/* Always show scrollbar to prevent layout shift when navigating between pages */
body.account-body {
    overflow-y: scroll;
}

/* Prevent shop-main-content from expanding to fill space on account pages */
body.account-body .shop-main-content {
    flex: 0 0 auto;
}

/* Ensure content column aligns to top and doesn't stretch */
body.account-body .account-layout .col-lg-9 {
    align-content: start;
}

/* Ensure sidebar column has consistent height to prevent layout shift */
body.account-body .account-layout .col-lg-3 {
    display: flex;
    flex-direction: column;
}

/* Ensure row uses align-items-start to prevent stretching */
body.account-body .account-layout > .row {
    align-items: flex-start;
}

/* CSS Variables for account section - scoped to account-layout only */
.account-body .account-layout {
    --page-padding: clamp(0.75rem, 2vw, 1.25rem);
    --content-max-width: none; /* Remove max-width restriction on mobile */
    --section-gap: var(--spacing-lg);
}

/* Scope box sizing to the account layout only so shared components
   (Shop-Header, Footer, Cookie-Banner) keep their original sizing */
.account-body .account-layout,
.account-body .account-layout * {
    box-sizing: border-box;
}

/* Inherit colors from shop - only override text-muted */
body.account-body .account-layout .text-muted {
    color: var(--muted-text);
}

/* Heading sizes for account pages */
.account-body .account-layout h1 { font-size: 1.75rem; }
.account-body .account-layout h2 { font-size: 1.5rem; }
.account-body .account-layout h3 { font-size: 1.25rem; }
.account-body .account-layout h4 { font-size: 1.125rem; }
.account-body .account-layout h5,
.account-body .account-layout h6 { font-size: 1rem; }

/* Compact controls on small screens - scoped to account-layout only */
@media (max-width: 575px) {
    .account-body .account-layout .btn {
        padding: 0.4rem 0.7rem;
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .account-body .account-layout .btn.btn-sm,
    .account-body .account-layout .btn-sm {
        padding: 0.35rem 0.6rem;
        font-size: 0.9rem;
        line-height: 1.1;
    }

    .account-body .account-layout .btn i { margin-right: 0.2rem; }
}

/* Main Content Column - mobile-first styling */
.account-body .account-layout .col-lg-9 {
    display: grid;
    gap: var(--section-gap);
    padding: var(--page-padding);
    min-height: calc(100vh - 200px); /* Prevent short content causing layout shift */
    align-content: start; /* Keep content at top */
}

/* Messages Container */
.account-body .messages-container {
    padding: var(--spacing-md) var(--page-padding) 0;
    width: 100%;
}

/* Container padding reduction for mobile */
html body.account-body .account-layout.container {
    padding-top: 0.5rem;
    padding-bottom: 0;
}

.account-body .login-page {
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
}

/* Breadcrumb Navigation entfernen */
html body.account-body .account-layout .breadcrumb-nav {
    display: none;
}

/* Mobile Menu Toggle */
.account-body .mobile-menu-toggle {
    position: fixed;
    bottom: 2rem; /* Am unteren Rand positioniert */
    right: 1rem; /* Rechts positioniert um Konflikte zu vermeiden */
    z-index: 1047; /* Unter Overlay aber sichtbar */
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    padding: 0;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    box-shadow: 0 4px 12px rgba(127, 77, 90, 0.3);
}

.account-body .mobile-menu-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(127, 77, 90, 0.4);
}

.account-body .mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* Verstecke Button wenn Sidebar offen */
.account-body .mobile-menu-toggle.menu-open {
    opacity: 0;
    pointer-events: none;
}

@media (min-width: 992px) {
    html body.account-body .mobile-menu-toggle {
        display: none;
    }
}


.account-body .fade-in {
    animation: fadeIn var(--transition-slow);
}

.account-body .slide-up {
    animation: slideUp var(--transition-normal);
}

/* Skeleton Loading */
.account-body .skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Anpassungen */
@media (max-width: 991px) {
    .account-body .account-layout.container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 767px) {
    .account-body .page-header {
        padding: var(--page-padding);
    }
    
    .account-body .page-title {
        font-size: 1.5rem;
    }
}
