/* cdg/assets/css/mobile-enhancements.css - global mobile-first tweaks and shared UI helpers */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll table {
  width: 100%;
  border-collapse: collapse;
}
.table-scroll th,
.table-scroll td {
  padding: 10px 12px;
  vertical-align: top;
  word-break: break-word;
  white-space: normal;
}

.ged-tag-box {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-light);
}
.ged-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.ged-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.2;
}
.ged-tag-pill input {
  margin: 0;
  accent-color: var(--primary);
}
.ged-tag-pill.is-suggested {
  border-color: var(--success);
  box-shadow: 0 0 0 1px rgba(79, 221, 165, 0.35);
  background: rgba(79, 221, 165, 0.15);
}

.task-row-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 768px) {
  form label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  form label > input,
  form label > select,
  form label > textarea {
    width: 100%;
  }
  .btn,
  button,
  input,
  select,
  textarea {
    min-height: 44px;
  }
  .card {
    margin-bottom: 12px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .table-scroll thead th {
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
  }
  .inline-details summary {
    display: block;
    width: 100%;
  }
  .modal,
  .panel,
  .drawer,
  .dialog {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }
  .icon-btn,
  .download-link {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
