/* Web Design Mike unified portal/admin polish layer. Load this last. */
:root {
  --wdm-orange: #f97316;
  --wdm-orange-dark: #c2410c;
  --wdm-orange-soft: #fff7ed;
  --wdm-orange-line: #fed7aa;
  --wdm-text: #111827;
  --wdm-muted: #6b7280;
  --wdm-border: #e5e7eb;
  --wdm-focus: rgba(249, 115, 22, 0.18);
  --wdm-radius: 7px;
  --wdm-control-height: 38px;
}

/* Shared button language */
.wdm-action-btn,
#wdm-client-billing-actions .wdm-action-btn,
#wdm-quick-charge-modal .wdm-action-btn,
.wdm-row-charge-card,
a.wdm-client-support-button,
button.wdm-client-support-button,
.wdm-client-support-button {
  appearance: none !important;
  min-height: var(--wdm-control-height) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: var(--wdm-radius) !important;
  border: 1px solid #fb923c !important;
  background: #fff !important;
  color: var(--wdm-orange-dark) !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  padding: 9px 16px !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}

.wdm-action-btn-primary,
#wdm-client-billing-actions .wdm-action-btn-primary,
#wdm-quick-charge-modal .wdm-action-btn-primary,
.wdm-row-charge-card,
a.wdm-client-support-button,
button.wdm-client-support-button,
.wdm-client-support-button {
  background: var(--wdm-orange) !important;
  border-color: var(--wdm-orange) !important;
  color: #fff !important;
}

.wdm-action-btn:hover,
.wdm-row-charge-card:hover,
.wdm-client-support-button:hover {
  filter: brightness(0.97);
}

.wdm-action-btn:focus,
.wdm-row-charge-card:focus,
.wdm-client-support-button:focus {
  outline: 3px solid var(--wdm-focus) !important;
  outline-offset: 1px !important;
}

/* Admin client-detail billing strip */
#wdm-client-billing-actions {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 16px 0 !important;
  padding: 14px 16px !important;
  border: 1px solid var(--wdm-orange-line) !important;
  border-radius: 8px !important;
  background: var(--wdm-orange-soft) !important;
  color: var(--wdm-text) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  box-sizing: border-box !important;
}

#wdm-client-billing-actions .wdm-actions-row,
.wdm-actions-row {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: center !important;
}

#wdm-client-billing-actions .wdm-actions-title {
  margin: 0 0 3px 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

#wdm-client-billing-actions .wdm-actions-copy,
#wdm-client-billing-actions .wdm-action-note,
.wdm-muted {
  color: var(--wdm-muted) !important;
  line-height: 1.35 !important;
}

/* Invoice row quick charge: keep the orange button and black Actions button on one line. */
.wdm-invoice-actions-cell,
td:has(> .wdm-row-charge-card) {
  min-width: 250px !important;
  width: 250px !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

.wdm-invoice-actions-cell > *,
td:has(> .wdm-row-charge-card) > * {
  display: inline-flex !important;
  vertical-align: middle !important;
  align-items: center !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.wdm-row-charge-card {
  margin: 0 8px 0 0 !important;
}

.wdm-invoice-actions-cell button:not(.wdm-row-charge-card),
td:has(> .wdm-row-charge-card) button:not(.wdm-row-charge-card) {
  min-height: var(--wdm-control-height) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  padding-top: 9px !important;
  padding-bottom: 9px !important;
  vertical-align: middle !important;
}

/* Client list/table density: important operational columns stay compact. */
.wdm-stripe-card-pill,
.wdm-stripe-missing-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 24px !important;
  border-radius: 999px !important;
  padding: 3px 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.wdm-stripe-card-pill {
  background: #eef2ff !important;
  color: #3730a3 !important;
}

.wdm-stripe-missing-pill {
  background: #f3f4f6 !important;
  color: #6b7280 !important;
}

/* Client portal shell: consistent WDM feel without fighting Invoice Ninja internals. */
.wdm-client-footer {
  border-top: 1px solid var(--wdm-border) !important;
}

.wdm-client-footer a,
.wdm-client-contact a,
.wdm-client-sidebar a {
  color: var(--wdm-orange) !important;
}

body .bg-primary,
body .text-primary {
  --tw-bg-opacity: 1;
}

/* Support ticket forms */
.wdm-support-ticket-form button[type="submit"],
.wdm-support-ticket-submit,
form[action*="support"] button[type="submit"] {
  min-width: 220px !important;
  min-height: 46px !important;
  padding: 12px 22px !important;
  border-radius: var(--wdm-radius) !important;
  background: var(--wdm-orange) !important;
  border: 1px solid var(--wdm-orange) !important;
  color: #fff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

/* Portal logo breathing room. */
.wdm-portal-logo,
img[src*="wdm-logo"],
img[alt*="Web Design Mike"] {
  margin-bottom: 14px !important;
}

@media (max-width: 900px) {
  .wdm-invoice-actions-cell,
  td:has(> .wdm-row-charge-card) {
    min-width: 220px !important;
    width: 220px !important;
  }

  .wdm-action-btn,
  .wdm-row-charge-card {
    font-size: 13px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

@media (max-width: 760px) {
  #wdm-client-billing-actions .wdm-action-btn,
  #wdm-client-billing-actions .wdm-row-charge-card {
    width: auto !important;
  }
}


/* Private admin past-due/shutoff review on dashboard. */
#wdm-dashboard-visibility #wdm-shutoff-review-toggle {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border: 1px solid var(--wdm-orange) !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: var(--wdm-orange-dark) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

#wdm-shutoff-review-panel {
  display: none;
  margin: 0 0 18px 0 !important;
  border: 1px solid var(--wdm-border) !important;
  border-radius: var(--wdm-radius-lg) !important;
  background: #fff !important;
  box-shadow: var(--wdm-shadow) !important;
  overflow: hidden !important;
}

#wdm-shutoff-review-panel .wdm-shutoff-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 16px 18px !important;
  border-bottom: 1px solid var(--wdm-border) !important;
}

#wdm-shutoff-review-panel h2 {
  margin: 0 0 4px 0 !important;
  color: var(--wdm-ink) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}

#wdm-shutoff-review-panel p {
  margin: 0 !important;
  color: var(--wdm-muted) !important;
}

#wdm-shutoff-review-panel .wdm-shutoff-head button {
  width: 34px !important;
  height: 34px !important;
  border: 1px solid var(--wdm-border) !important;
  border-radius: var(--wdm-radius) !important;
  background: #fff !important;
  color: var(--wdm-ink) !important;
  font-size: 24px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

#wdm-shutoff-review-panel .wdm-shutoff-body {
  padding: 16px 18px 18px !important;
}

.wdm-shutoff-stats {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

.wdm-shutoff-stats div {
  padding: 12px !important;
  border: 1px solid var(--wdm-border) !important;
  border-radius: var(--wdm-radius) !important;
  background: #f9fafb !important;
}

.wdm-shutoff-stats strong,
.wdm-shutoff-stats span {
  display: block !important;
}

.wdm-shutoff-stats strong {
  color: var(--wdm-ink) !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
}

.wdm-shutoff-stats span {
  margin-top: 3px !important;
  color: var(--wdm-muted) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

.wdm-shutoff-schedule {
  margin: 0 0 14px !important;
  padding: 10px 12px !important;
  border: 1px solid #fed7aa !important;
  border-radius: var(--wdm-radius) !important;
  background: #fff7ed !important;
  color: var(--wdm-muted) !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.wdm-shutoff-table-wrap {
  overflow-x: auto !important;
}

.wdm-shutoff-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 13px !important;
}

.wdm-shutoff-table th,
.wdm-shutoff-table td {
  padding: 10px 9px !important;
  border-bottom: 1px solid var(--wdm-border) !important;
  text-align: left !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.wdm-shutoff-table th {
  color: var(--wdm-muted) !important;
  font-weight: 700 !important;
}

.wdm-shutoff-table tr.is-ready td {
  background: #fff1f2 !important;
}

.wdm-review-pill {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 24px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.wdm-review-pill.ready {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

.wdm-review-pill.watch {
  background: #e0f2fe !important;
  color: #075985 !important;
}

.wdm-empty-review {
  padding: 16px !important;
  border: 1px solid var(--wdm-border) !important;
  border-radius: var(--wdm-radius) !important;
  background: #f9fafb !important;
}

@media (max-width: 900px) {
  .wdm-shutoff-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
