/* ============================================================================
   PLIK: assets/css/layout.css
   Layout - panels, icon-bar, overlays - REDESIGN
   ============================================================================ */

/* ========================================================================
   ICON BAR (Left Sidebar)
   ======================================================================== */

#icon-bar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: rgba(250, 250, 250, 0.5);
  border-right: 1px solid rgba(229, 231, 235, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

/* Logo - Ram head */
#logo {
  margin-bottom: 32px;
  cursor: pointer;
  transition: all var(--transition);
}

#logo:hover {
  opacity: 0.7;
}

#logo svg {
  width: 36px;
  height: 36px;
}

#logo-text {
  font-size: 9px;
  font-weight: var(--font-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-light);
  text-align: center;
  margin-top: 6px;
  transition: color var(--transition);
}

#logo:hover #logo-text {
  color: var(--color-text-muted);
}

/* Icon buttons */
.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  background: white;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  border-color: var(--color-border);
  color: var(--color-text);
}

.icon-btn.active {
  background: #f6f6f7;
  color: white;
  border-color: var(--color-border);
}

.icon-btn i,
.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.2;
}

/* Badge on icon */
.icon-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: linear-gradient(135deg, #fb7185 0%, #ec4899 100%);
  color: white;
  border-radius: 8px;
  font-size: 9px;
  font-weight: var(--font-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.btn .badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--color-primary);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

/* ========================================================================
   LEFT PANELS (Collapsible)
   ======================================================================== */

.left-panel {
  position: fixed;
  left: 80px;
  top: 0;
  bottom: 0;
  width: 384px;
  background: white;
  border-right: 1px solid rgba(229, 231, 235, 0.6);
  transform: translateX(0);
  transition: transform var(--transition-slow);
  z-index: 900;
  overflow-y: auto;
  overflow-x: hidden;
}

.left-panel.collapsed {
  transform: translateX(-100%);
}

/* Panel Header */
.panel-header {
  position: sticky;
  top: 0;
  background: white;
  padding: 24px;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.panel-header h2 {
  font-size: 18px;
  font-weight: var(--font-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
  color: var(--color-text);
}

.close-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: var(--color-background-light);
  color: var(--color-text);
}

.close-btn i,
.close-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.2;
}

/* Panel content padding */
.left-panel > *:not(.panel-header) {
  padding: 0 5px 5px;
}


/* Route Details Panel (Right Side) */
.route-details-panel {
  left: auto;
  right: 0;
  transform: translateX(100%);
  z-index: 1002;
}

.route-details-panel.collapsed {
  transform: translateX(100%);
}

.route-details-panel:not(.collapsed) {
  transform: translateX(0);
}

/* ========================================================================
   MAP
   ======================================================================== */

#map {
  position: fixed;
  top: 0;
  left: 80px;
  right: 0;
  bottom: 0;
  z-index: 0;
  background: rgba(245, 245, 247, 0.3);
}

/* ========================================================================
   TOP OVERLAY (Search bar, filters)
   ======================================================================== */

#top-overlay {
  position: fixed;
  top: 24px;
  left: 104px;
  right: 24px;
  max-width: 576px;
  z-index: 800;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(229, 231, 235, 0.6);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

#top-overlay input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--text-sm);
  font-weight: var(--font-light);
  color: var(--color-text);
}

#top-overlay input::placeholder {
  color: var(--color-text-tertiary);
}

#top-overlay button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

#top-overlay button:hover {
  background: var(--color-background-light);
}

/* ========================================================================
   FAB (Floating Action Button)
   ======================================================================== */

#fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.fab-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.fab-item {
  width: 48px;
  height: 48px;
  background: white;
  border: 1px solid var(--color-border-light);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: scale(0) translateY(20px);
  pointer-events: none;
}

.fab-item.show {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.fab-item:nth-child(1).show {
  transition-delay: 0.05s;
}

.fab-item:nth-child(2).show {
  transition-delay: 0.1s;
}

.fab-item:nth-child(3).show {
  transition-delay: 0.15s;
}

.fab-item:hover {
  background: var(--color-background-light);
  border-color: var(--color-border);
  transform: scale(1.1) translateY(0);
}

.fab-item i {
  font-size: 18px;
}

#fab-main {
  width: 56px;
  height: 56px;
  background: var(--color-primary);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  transition: all var(--transition);
}

#fab-main:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#fab-main.open {
  transform: rotate(45deg);
}

#fab-main.open:hover {
  transform: rotate(45deg) scale(1.1);
}

/* ========================================================================
   SCROLLBAR
   ======================================================================== */

.left-panel::-webkit-scrollbar {
  width: 4px;
}

.left-panel::-webkit-scrollbar-track {
  background: transparent;
}

.left-panel::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

.left-panel::-webkit-scrollbar-thumb:hover {
  background: var(--color-border-dark);
}

.icon-btn {
  padding: 0; /* ← dodaj */
}

.icon-btn i {
  line-height: 1;
  display: flex;
}