/* Key Pool application additions; Sneat core theme remains the source of UI styling. */

/* Typography & Code display */
.font-monospace {
  letter-spacing: .02em;
}

.key-code {
  white-space: nowrap;
  font-size: 0.875rem;
}

.api-token-value {
  font-family: var(--bs-font-monospace);
  font-size: 0.8125rem;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: normal;
  display: inline-block;
  max-width: 100%;
}

.table-keypool td {
  vertical-align: middle;
}

/* Mobile-First Input Sizes to prevent iOS Safari auto-zoom (requires >= 16px) */
@media (max-width: 767.98px) {
  .form-control,
  .form-select,
  .input-group-text {
    font-size: 16px !important;
    min-height: 48px;
  }
}

/* Mobile-First Touch Targets */
.touch-target {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 575.98px) {
  .touch-target {
    min-width: 44px;
    min-height: 44px;
  }
  
  .btn:not(.btn-sm):not(.btn-icon) {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Authentication Page & Card Layout */
.app-auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.app-auth-card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.app-auth-card .card {
  box-shadow: 0 0.25rem 1.125rem rgba(38, 43, 67, 0.1);
  border-radius: 0.5rem;
}

.app-password-toggle {
  background-color: transparent;
}

/* Dashboard Heading & Stat Cards */
.dashboard-heading {
  gap: 1rem;
}

.stat-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.25rem 1rem rgba(161, 172, 184, 0.45);
}

@media (max-width: 575.98px) {
  .stat-card .card-body {
    padding: 1rem;
  }
  
  .stat-card .avatar {
    width: 36px;
    height: 36px;
  }
  
  .stat-card .avatar .avatar-initial {
    font-size: 1rem;
  }

  .stat-card .card-title {
    font-size: 1.25rem !important;
  }
}

/* Table Wrapper for Smooth Horizontal Scroll on Mobile */
.table-keypool-wrapper {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

/* Toast Notification Styles */
.app-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1090;
  pointer-events: none;
}

.app-toast {
  pointer-events: auto;
  min-width: 250px;
  max-width: 350px;
  background-color: #232733;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-toast.app-toast-danger {
  background-color: #3b2024;
  border-left: 3px solid #ff3e1d;
}

.app-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .stat-card,
  .app-toast {
    transition: none !important;
    transform: none !important;
  }
}
