/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

body {
  font-family: system-ui, sans-serif;
  margin: 1rem 2rem;
  color: #1a1a1a;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid #666;
  border-radius: 4px;
  background: #f5f5f5;
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
}

.button--danger {
  border-color: #b3261e;
  color: #b3261e;
}

/* Flash messages */
.flash {
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

.flash--notice {
  background: #e6f4ea;
  color: #1e6b34;
}

.flash--alert {
  background: #fdecea;
  color: #b3261e;
}

/* Workflow cards */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
}

.card h2 {
  margin-top: 0;
}

.card-meta {
  color: #555;
  font-size: 0.9rem;
}

.inbound-address code {
  word-break: break-all;
}

.copy-button {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Drag-and-drop zones */
.dropzone {
  transition: background-color 0.15s, border-color 0.15s;
}

.dropzone--large {
  border: 2px dashed #aaa;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  margin: 1rem 0;
}

.dropzone--active {
  border-color: #1a73e8;
  background: #e8f0fe;
}

.dropzone-hint {
  color: #555;
}

.file-picker {
  color: #1a73e8;
  text-decoration: underline;
  cursor: pointer;
}

.dropzone-status {
  min-height: 1.2em;
  font-size: 0.9rem;
  color: #555;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: #eee;
}

.badge--email {
  background: #e8f0fe;
  color: #174ea6;
}

.badge--upload {
  background: #e6f4ea;
  color: #1e6b34;
}

.badge--unmatched {
  background: #fdecea;
  color: #b3261e;
}

/* Tables and lists */
.record-table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 0.5rem;
}

.record-table th,
.record-table td {
  text-align: left;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid #ddd;
}

.invoice-list {
  padding-left: 1.25rem;
}

.invoice-list li {
  margin-bottom: 0.25rem;
}

.detail-list dt {
  font-weight: 600;
  margin-top: 0.75rem;
}

.detail-list dd {
  margin-left: 0;
}

.empty-note {
  color: #777;
  font-style: italic;
}

.form-errors {
  background: #fdecea;
  color: #b3261e;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
}

.badge--mcp {
  background: #f3e8fd;
  color: #6a1b9a;
}

/* OAuth consent screen */
.consent-actions {
  display: flex;
  gap: 0.75rem;
}

.delivery-card, .delivery-health {
  border: 1px solid #aaa;
  border-radius: 6px;
  padding: 1rem;
  margin: 1rem 0;
  overflow-wrap: anywhere;
}

.delivery-statuses {
  display: block;
  margin: 0.4rem 0 1rem;
}

.delivery--uploaded, .delivery--delivered {
  background: #e6f4ea;
  color: #1e6b34;
}

.delivery--failed, .delivery--blocked, .delivery--unknown, .delivery--bounced {
  background: #fdecea;
  color: #b3261e;
}

.delivery-history li {
  margin-bottom: 0.75rem;
}

.delivery-history small {
  display: block;
}
