/* Buttons — iOS-inspired */
.btn {
  border-radius: 980px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
              color 0.15s ease-in-out, background-color 0.15s ease-in-out,
              border-color 0.15s ease-in-out;
}

.btn:active {
  transform: scale(0.97);
}

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8125rem;
}

/* Card typography — iOS-inspired hierarchy */

.card .card-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.card .card-text {
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Badges — compact sizing */
.badge {
  font-size: 11px;
}

/* Alerts inside cards — match iOS card radius */
.card .alert {
  border-radius: 12px;
}

.card .alert:last-child {
  margin-bottom: 0;
}

/* Navigable card — chevron indicator */
.card-chevron {
  position: absolute;
  right: 1rem;
  top: 1.25rem;
  opacity: 0.3;
  font-size: 0.85rem;
  pointer-events: none;
}

.card-navigable .card-body {
  padding-right: 2.5rem;
}

/* Interactive card — iOS-style press feedback */
.card-interactive {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-interactive:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.list-group-item {
  transition: all 0.3s ease-in-out;
  position: relative;
}

.list-group-item:hover {
  transform: translateX(5px);
  box-shadow: -2px 2px 5px rgba(0,0,0,0.1);
}

.btn-group-vertical .btn {
  transition: all 0.2s ease;
}

.btn-group-vertical .btn:hover {
  transform: scale(1.1);
  z-index: 2;
}

/* Optional: Add a subtle background color change on hover */
.list-group-item:hover {
  background-color: rgba(0,0,0,0.02);
}

/* Animation for position changes */
@keyframes slideMove {
  0% {
    opacity: 0.7;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.list-group-item {
  animation: slideMove 0.3s ease-out;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1020;
  padding: 0;
  padding-bottom: max(0px, env(safe-area-inset-bottom));
}

.mobile-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: 80px;
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  text-decoration: none;
  color: #666;
  transition: all 0.3s ease;
  padding: 6px 4px 8px 4px;
  position: relative;
  font-size: 0.7rem;
}

.mobile-nav-item i {
  font-size: 1.25rem;
}

.mobile-nav-item:hover {
  color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.05);
}

.mobile-nav-item.active {
  color: #0d6efd;
  font-weight: 600;
}

.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #0d6efd;
  border-radius: 0 0 3px 3px;
}

.mobile-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Adjust content for mobile bottom nav */
@media (max-width: 991.98px) {
  .mobile-content-wrapper {
    padding-bottom: calc(90px + max(0px, env(safe-area-inset-bottom))) !important;
  }

  .dropdown-wrapper {
    position: relative;
  }

  .mobile-bottom-nav .dropdown-menu-up {
    position: absolute;
    bottom: 70px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    min-width: 150px;
  }
}

/* Notification styles */
.notification-action-button {
  position: relative;
  z-index: 2;
}

/* Animate chevron on hover */
.list-group-item:hover .bi-chevron-right,
.notification-preview:hover .bi-chevron-right {
  transform: translateX(3px);
  transition: transform 0.2s ease;
}

/* Scripture display styles */
.scripture-content {
  max-width: 65ch;
  line-height: 1.8;
  font-size: 1.1rem;
}

.scripture-chapter-heading {
  margin-top: 2rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #dee2e6;
  font-size: 1.25rem;
  font-weight: 600;
  color: #495057;
}

.scripture-verse {
  margin-bottom: 1rem;
  text-align: justify;
  hyphens: auto;
}

.scripture-verse .verse-number {
  font-weight: 700;
  color: #6c757d;
  font-size: 0.85em;
  margin-right: 0.25rem;
}

/* Study collection item controls */
.position-controls .btn {
  line-height: 1;
}

.min-width-0 {
  min-width: 0;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Scripture panel for study record form */
.scripture-panel {
  max-height: 60vh;
  overflow-y: auto;
}

@media (min-width: 992px) {
  .scripture-panel {
    max-height: 70vh;
  }
}

/* ============================
   Theme picker — iOS-style
   ============================ */
.theme-option {
  cursor: pointer;
}

.theme-option__preview {
  border: 2px solid var(--bs-border-color);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-option--active .theme-option__preview {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.3);
}

/* Show/hide the check icons based on active state */
.theme-option .theme-option__checked { display: none; }
.theme-option .theme-option__unchecked { display: inline; color: var(--bs-secondary-color); }
.theme-option--active .theme-option__checked { display: inline; }
.theme-option--active .theme-option__unchecked { display: none; }

.theme-option__label {
  color: var(--bs-secondary-color);
  transition: color 0.15s ease;
}

.theme-option--active .theme-option__label {
  color: var(--bs-primary);
}

/* ============================
   Dark mode overrides
   ============================ */
[data-bs-theme=dark] {

  /* Mobile bottom nav — adapt for dark backgrounds */
  .mobile-nav-item {
    color: #8E8E93; /* iOS system gray */
  }

  .mobile-nav-item:hover {
    color: var(--bs-primary);
    background-color: rgba(208, 156, 65, 0.1);
  }

  .mobile-nav-item.active {
    color: var(--bs-primary);
  }

  .mobile-nav-item.active::after {
    background-color: var(--bs-primary);
  }

  /* List group hover — visible on dark backgrounds */
  .list-group-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }

  /* Interactive card press feedback */
  .card-interactive:active {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  }

  /* Scripture chapter heading */
  .scripture-chapter-heading {
    border-bottom-color: #545458; /* iOS separator dark */
    color: #EBEBF5; /* iOS primary label dark */
  }

  /* Verse number */
  .scripture-verse .verse-number {
    color: #8E8E93; /* iOS system gray */
  }

  /* Ensure btn-success is readable in dark mode */
  .btn-success {
    --bs-btn-color: #fff;
  }

  /* Warning button text legibility */
  .btn-warning {
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
  }
}