/* =========================================================
    BOTTOM NAVIGATION
========================================================= */
.mobile-bottom-nav {
    --blue: #1769ff;
    --blue-dark: #0f58dc;
    --text: #111827;
    --muted: #6b7280;
    --border: #e9edf3;
    --surface: #ffffff;
    --soft: #f5f7fa;
    --nav-height: 64px;

    position: fixed;

    left: 0;
    right: 0;
    bottom: 0px;
    
    min-width: 297px;
    height: var(--bottom-nav-height);

    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--border);
    display: none;
    align-items: flex-start;
    justify-content: space-around;
    z-index: 100000;
    

    * {
        box-sizing: border-box;
    }
    
    

    


    /* =========================================================
        STANDARD NAV ITEM
    ========================================================= */
    .mobile-nav-item {
        position: relative;

        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 500;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.18s ease, transform 0.18s ease;
    }

    .mobile-nav-item:active {
        transform: scale(0.94);
    }

    .mobile-nav-item.active {
        color: var(--blue);
    }

    /* =========================================================
        NAV ICON
    ========================================================= */
    .mobile-nav-icon {
        --width: 25px;
        width: var(--width);
        aspect-ratio: 1/1;
        display: flex;
        align-items: center;
        justify-content: center;

        &.messages {
            width: calc(var(--width) - 2px);
        }

        &.home-icon {
            width: calc(var(--width) - 3px);
        }
    }

    .mobile-nav-icon svg {
        width: 100%;
        aspect-ratio: 1/1;
        display: block;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* =========================================================
        NAV LABEL
    ========================================================= */
    .mobile-nav-label {
        line-height: 1;
        white-space: nowrap;
    }

    /* =========================================================
        CREATE / SKAPA
    ========================================================= */
    .mobile-create-item {
        position: relative;
  
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        color: var(--text);
        font-size: 10px;
        font-weight: 600;
        -webkit-tap-highlight-color: transparent;
    }

    /* =========================================================
        CREATE BUTTON
    ========================================================= */
    .mobile-create-button {
        width: 41px;
        aspect-ratio: 1 / 1;
        border-radius: 10px;
        border: 4px solid #ffffff;
        background: var(--blue);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        cursor: pointer;
        transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
        background: #3d3d3e;
        
    }

    .mobile-create-button svg {
        width: 19px;
        height: 19px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7px;
        stroke-linecap: round;
    }

    .mobile-create-button:active {
        background: var(--blue-dark);
        transform: scale(0.92);
        box-shadow: 0 3px 10px rgba(23, 105, 255, 0.20);
    }

    .mobile-create-label {
        line-height: 1;
    }
}














/* All styles scoped tightly under .konto-scope to guarantee 0 CSS collisions */
    .konto-scope {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      box-sizing: border-box;
    }
    .konto-scope *, .konto-scope *::before, .konto-scope *::after {
      box-sizing: inherit;
      margin: 0;
      padding: 0;
    }

    /* Modal Backdrop */
    .konto-backdrop {
      position: fixed;
      inset: 0;
      background-color: rgba(15, 23, 42, 0.45);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      z-index: 99998;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .konto-backdrop.konto-open {
      opacity: 1;
      pointer-events: auto;
    }

    /* Modal Sheet Wrapper */
.konto-sheet-container {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  visibility: hidden; /* Hide container entirely when inactive */
  transition: visibility 0.32s;
}

/* Make container visible when modal is active */
.konto-backdrop.konto-open + .konto-sheet-container {
  visibility: visible;
}

/* Sheet Content Box */
.konto-sheet {
  width: 100%;
  max-height: 100vh;
  min-height: 88vh;
  background-color: #ffffff;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 20px;
      padding-bottom: calc(var(--bottom-nav-height));
  
  /* Push completely out of view including shadows */
  transform: translateY(calc(100% + 40px)); 
  will-change: transform;
  
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Open State */
.konto-backdrop.konto-open + .konto-sheet-container .konto-sheet,
.konto-sheet.konto-open {
  transform: translateY(0);
}

    /* Drag handle indicator */
    .konto-drag-handle {
      width: 36px;
      height: 4px;
      background-color: #E5E7EB;
      border-radius: 99px;
      margin: 0 auto 16px auto;
      cursor: pointer;
      flex-shrink: 0;
    }

    /* Profile Header */
    .konto-profile-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-bottom: 16px;
      margin-bottom: 12px;
      border-bottom: 1px solid #F3F4F6;
      flex-shrink: 0;
    }
    .konto-user-info {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .konto-avatar-wrapper {
      position: relative;
      width: 46px;
      height: 46px;
    }
    .konto-avatar {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid #F3F4F6;
    }
    .konto-bankid-badge {
      position: absolute;
      bottom: -2px;
      right: -2px;
      background-color: #10B981;
      color: #ffffff;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 2px solid #ffffff;
    }

    .konto-user-details h3 {
      font-size: 14px;
      font-weight: 700;
      color: #111827;
      line-height: 1.2;
    }
    .konto-user-meta {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: #6B7280;
      margin-top: 3px;
    }
    .konto-rating {
      color: #D97706;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 3px;
    }

    .konto-close-btn {
      background: #F3F4F6;
      border: none;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #6B7280;
      cursor: pointer;
      transition: background-color 0.15s, color 0.15s;
    }
    .konto-close-btn:hover {
      background-color: #E5E7EB;
      color: #111827;
    }

    /* Menu Item List Scroll Area */
    .konto-menu-list {
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding-right: 2px;
    }
    .konto-menu-list::-webkit-scrollbar {
      width: 4px;
    }
    .konto-menu-list::-webkit-scrollbar-thumb {
      background: #E5E7EB;
      border-radius: 99px;
    }

    /* Menu Item Buttons */
    .konto-item {
      
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px 12px;
      border-radius: 12px;
      border: none;
      background: transparent;
      color: #111827;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      text-align: left;
      transition: background-color 0.15s ease;
    }
    .konto-item:hover {
      background-color: #F8F9FA;
    }
    .konto-item:active {
      background-color: #F3F4F6;
    }

    .konto-item-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .konto-icon-box {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      background-color: #F8F9FA;
      border: 1px solid #F3F4F6;
      color: #374151;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .konto-badge-pill {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 8px;
      border-radius: 99px;
      background-color: #F3F4F6;
      color: #374151;
    }
    .konto-badge-blue {
      background-color: #2563EB;
      color: #ffffff;
    }

    .konto-arrow {
      color: #9CA3AF;
      transition: transform 0.15s ease;
    }
    .konto-item:hover .konto-arrow {
      transform: translateX(2px);
      color: #4B5563;
    }

    .konto-divider {
      height: 1px;
      background-color: #F3F4F6;
      margin: 6px 0;
    }

    /* Logout Action Item */
    .konto-item-logout {
      color: #DC2626;
    }
    .konto-item-logout:hover {
      background-color: #FEF2F2;
    }
    .konto-item-logout .konto-icon-box {
      background-color: #FEF2F2;
      border-color: #FEE2E2;
      color: #DC2626;
    }