/* ── Fonts ─────────────────────────────────────────────────────────────────── */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-v20-latin-700.woff2') format('woff2');
    font-weight: 700; font-style: normal; font-display: swap;
}

/* ── Variablen ─────────────────────────────────────────────────────────────── */
:root {
    --sidebar-width:  280px;
    --topbar-height:  70px;
    --aura-blue:      #0d6efd;
    --header-bg:      #0f172a;
    --sidebar-bg:     #1e293b;
    --overlay-bg:     rgba(15, 23, 42, 0.85);
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
html, body {
    height: 100%; margin: 0; overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: #0f172a;
    overflow-x: hidden;
}

/* ── Lade-Overlay ──────────────────────────────────────────────────────────── */
#loading-overlay {
    position: absolute; inset: 0;
    background: var(--overlay-bg);
    backdrop-filter: blur(12px);
    display: none; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 50;
}

.loader-content     { text-align: center; color: #fff; width: 300px; }
.loader-icon        { font-size: 2.5rem; color: var(--aura-blue); }

.progress-bar-container {
    width: 100%; height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px; margin-top: 20px;
    overflow: hidden; position: relative;
}
.progress-bar-fill {
    width: 100%; height: 100%;
    background: var(--aura-blue);
    box-shadow: 0 0 15px var(--aura-blue);
    position: absolute; left: -100%;
    animation: loading-anim 1.5s infinite ease-in-out;
}
@keyframes loading-anim {
    0%   { left: -100%; }
    50%  { left:    0%; }
    100% { left:  100%; }
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.portal-header {
    height: var(--topbar-height);
    background: var(--header-bg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px;
    position: fixed; top: 0; width: 100%; z-index: 1100;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.template-sidebar {
    width: var(--sidebar-width);
    height: calc(100% - var(--topbar-height));
    background: var(--sidebar-bg);
    position: fixed; top: var(--topbar-height); left: 0;
    padding: 20px; z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-label { letter-spacing: 1px; }

/* ── Content ───────────────────────────────────────────────────────────────── */
.content-viewer {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    height: calc(100% - var(--topbar-height));
    display: flex; padding: 20px;
}

.iframe-container {
    width: 100%; height: 100%; background: #fff;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Scrollbar nur auf Desktop verstecken */
@media (min-width: 992px) {
    iframe {
        width: calc(100% + 17px);
        scrollbar-width: none; /* Firefox */
    }
}


/* ── Navigation ────────────────────────────────────────────────────────────── */
.nav-link-custom {
    display: flex; align-items: center;
    padding: 12px; color: #94a3b8;
    text-decoration: none; border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}
.nav-link-custom:hover  { background: rgba(255,255,255,0.05); color: #fff; }
.nav-link-custom:focus-visible {
    outline: 2px solid var(--aura-blue);
    outline-offset: 2px;
}
.nav-link-custom.active {
    background: rgba(13,110,253,0.15); color: #fff !important;
    font-weight: 700; border-left-color: var(--aura-blue);
}
.nav-link-custom.active i { color: var(--aura-blue) !important; }

/* ── Device Buttons ────────────────────────────────────────────────────────── */
.device-btn {
    background: transparent; border: none;
    color: #94a3b8; padding: 5px 15px; transition: 0.2s;
    cursor: pointer;
}
.device-btn:focus-visible { outline: 2px solid var(--aura-blue); border-radius: 5px; }
.device-btn.active { color: #fff; background: var(--aura-blue); border-radius: 5px; }

.size-mobile { width: 375px !important; height: 667px !important; margin: auto; }
.size-tablet { width: 768px !important; height: 95%  !important; margin: auto; }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.custom-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.9);
    backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
    z-index: 9999;
}
.custom-modal-content {
    background: #1e293b; color: #fff;
    padding: 40px; border-radius: 24px;
    max-width: 500px; width: 90%; text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}
.modal-icon { font-size: 3rem; color: var(--aura-blue); margin-bottom: 20px; }

/* ── Ghost-Button ──────────────────────────────────────────────────────────── */
.btn-ghost-glow {
    background: rgba(37,99,235,0.1);
    border: 1px solid rgba(59,130,246,0.4);
    color: #60a5fa !important; font-weight: 600;
    padding: 12px 24px; border-radius: 99px;
    transition: all 0.3s ease;
    text-decoration: none; display: block; text-align: center;
}
.btn-ghost-glow:hover  { background: rgba(37,99,235,0.25); color: #fff !important; transform: translateY(-2px); }
.btn-ghost-glow:focus-visible { outline: 2px solid var(--aura-blue); outline-offset: 2px; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .template-sidebar { transform: translateX(-100%); }
    .template-sidebar.show { transform: translateX(0); }
    .content-viewer   { margin-left: 0; }
}
