/* =========================================
   7. INPUTS & BUTTONS
   ========================================= */
input {
  width: 100%;
  padding: 1rem 1.2rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-main);
  margin-bottom: 1.2rem;
  font-family: inherit;
  font-size: 1rem; /* Minimum 16px font-size prevents auto-zoom on iOS */
  outline: none;
  transition: all 0.2s ease;
  -webkit-appearance: none; /* Removes default mobile browser styling */
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(45, 155, 240, 0.1);
}

.btn {
  padding: 0.8rem 1.6rem;
  border-radius: 14px; 
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 5px 0; /* Adjusted margin for better stacking */
  min-height: 48px; /* Better touch target for thumbs */
}

/* Button Variants */
.btn.filled {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px rgba(45, 155, 240, 0.2);
}

.btn.filled:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* Touch feedback for mobile */
.btn:active {
  transform: scale(0.98);
}

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

.btn.outlined:hover {
  background: var(--accent);
  color: white;
}

.btn.ghost { background: transparent; color: var(--text-dim); }
.btn.ghost:hover { color: var(--text-main); background: var(--input-bg); }

.btn.danger { background: var(--danger); color: white; }

/* Responsive Modal Buttons */
.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 1rem;
}

.full-width { width: 100% !important; }

/* =========================================
   LINK ICON BUTTONS
   ========================================= */
.link-options {
  display: flex;
  gap: 12px;
}

.icon-btn {
  width: 42px;  /* Increased from 36px for easier mobile tapping */
  height: 42px; /* Increased from 36px for easier mobile tapping */
  border-radius: 12px; /* Matches the LYNX theme better than 50% */
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.icon-btn.edit-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.icon-btn.delete-link:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

/* =========================================
   MOBILE MEDIA QUERIES
   ========================================= */
@media (max-width: 600px) {
  /* Stack buttons in modals vertically on mobile */
  .modal-buttons {
    flex-direction: column-reverse; /* Primary action stays on top */
    width: 100%;
  }

  .modal-buttons .btn {
    width: 100%;
    margin: 0;
  }

  /* Force all standard buttons to be full width on small screens if needed */
  .btn:not(.icon-btn) {
    width: 100%;
  }

  /* Larger touch targets for link icons on mobile */
  .icon-btn {
    width: 48px;
    height: 48px;
  }
}