/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  gap: 0.35rem;
}

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

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-success {
  background-color: var(--action);
  color: var(--text-inverse);
}

.btn-success:hover {
  background-color: var(--action-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary-light);
}

.btn-text {
  background-color: transparent;
  color: var(--text-secondary);
  padding: 0.5rem;
}

.btn-text:hover {
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

/* Form Inputs */
.input-group {
  position: relative;
  margin-bottom: 1rem;
  width: 100%;
}

.input-group i {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 0.75rem 3rem 0.75rem 1rem; /* Right padding for the absolute icon (RTL) */
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.875rem;
  background-color: var(--bg-main);
  color: var(--text-primary);
  transition: all 0.2s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  background-color: var(--bg-card);
}

/* Toasts / Notifications */
.toast-container {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  width: 90%;
}

.toast {
  background-color: var(--text-primary);
  color: var(--text-inverse);
  padding: 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(100%);
  opacity: 0;
  animation: toastSlideUp 0.3s forwards ease-out;
}

.toast.success {
  background-color: var(--action);
}
.toast.error {
  background-color: var(--danger);
}

/* Bottom Sheet */
.bottom-sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-overlay);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.bottom-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.5rem;
  z-index: 51;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

.bottom-sheet.active {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 5px;
  background-color: var(--border);
  border-radius: var(--radius-full);
  margin: 0 auto 1.5rem auto;
}
