/* Compact Navigation Component - Mobile-First Design
 * Horizontal layout that saves vertical space on mobile screens
 * Traditional left/right layout on desktop
 * Used by calendar month/week views and builder
 */

/* Main container - horizontal flexbox with three sections */
.compact-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.15rem;
  background-color: var(--light-gray);
  border-radius: 0.25rem;
  margin-bottom: var(--spacing-unit);
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
}

/* Left section - Previous button container */
.compact-nav-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Right section - Next button container */
.compact-nav-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Center section - flexible to take available space */
.compact-nav-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  min-width: 0; /* Allow text truncation */
}

/* Navigation buttons - Previous and Next */
.compact-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  background-color: var(--white);
  color: var(--dark-gray);
  border: 1px solid var(--dark-gray);
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  transition: all 0.15s ease;
  min-width: 44px;
  min-height: 44px;
}

.compact-nav-btn:hover {
  background-color: var(--dark-gray);
  color: white;
  transform: translateY(-1px);
}

.compact-nav-btn:active {
  transform: translateY(0);
}

/* Today button - compact style on mobile */
.compact-nav-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--dark-gray);
  border-radius: 0.25rem;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  transition: all 0.15s ease;
  min-height: 28px;
}

.compact-nav-today:hover {
  background-color: var(--dark-gray);
  color: white;
}

/* Date/period label */
.compact-nav-label {
  font-size: 1rem;
  font-weight: bold;
  color: var(--dark-gray);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Mobile optimizations - extra compact, all in one row */
@media (max-width: 480px) {
  .compact-nav {
    gap: 0.375rem;
    padding: 0.5rem;
  }

  .compact-nav-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
    min-width: 40px;
  }

  .compact-nav-label {
    font-size: 0.9375rem;
  }
}

/* Tablet - transition to desktop layout */
@media (min-width: 768px) {
  .compact-nav {
    gap: 0.25rem;
    padding: 1rem;
  }

  .compact-nav-btn {
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
  }

  /* Today button becomes full button on desktop */
  .compact-nav-today {
    font-size: 0.8125rem;
    padding: 0.625rem 1rem;
    min-height: 44px;
    background-color: var(--white);
    border: 1px solid var(--dark-gray);
    text-transform: none;
    letter-spacing: normal;
  }

  .compact-nav-today:hover {
    transform: translateY(-1px);
  }

  .compact-nav-label {
    font-size: 1.25rem;
  }
}

/* Desktop - full traditional layout */
@media (min-width: 1024px) {
  .compact-nav-label {
    font-size: 1.5rem;
  }

  .compact-nav-btn {
    min-width: 100px;
  }
}
