/* Let's Encrypt — owned by M4. */

.certs-alert[hidden],
.certs-issue [hidden],
.certs-timer [hidden] { display: none !important; }

.certs-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.certs-top { margin-bottom: 14px; }
.certs-timer { display: flex; flex-direction: column; }
.certs-timer .hint { margin-top: auto; }

.certs-form { display: grid; gap: 12px; margin-top: 14px; }
.certs-form .field { gap: 5px; }

.certs-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.certs-check input { accent-color: var(--accent); width: 15px; height: 15px; }
.certs-check input:disabled { cursor: not-allowed; }

.certs-issue .hint { font-size: 12px; }

.certs-timer-rows { display: grid; gap: 8px; margin: 14px 0 12px; }

.certs-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.certs-timer-row:last-of-type { border-bottom: 0; padding-bottom: 0; }

.certs-timer-label { color: var(--muted); font-size: 12px; }
.certs-timer-value { font-size: 12px; overflow-wrap: anywhere; text-align: right; }

.certs-card { padding: 6px 18px 10px; }

.certs-list { display: grid; }

.certs-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) 190px 130px minmax(140px, 1fr) 120px;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.certs-row:last-child { border-bottom: 0; }

.certs-row-head {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 14px 0 8px;
}

.certs-domain { min-width: 0; }
.certs-domain b { font-family: var(--mono); font-weight: 650; overflow-wrap: anywhere; }

.certs-sub { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; margin-top: 2px; }
.certs-sub.bad { color: #ffb3b0; }

.certs-expiry { font-size: 12px; color: var(--text); overflow-wrap: anywhere; }
.certs-expiry.bad { color: #ffb3b0; }

.certs-status { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }

.certs-issuer { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

.certs-serial { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }

.certs-alert {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(17, 26, 36, .6);
  font-size: 13px;
}
.certs-alert.ok {
  border-color: rgba(99, 214, 143, .35);
  background: rgba(99, 214, 143, .07);
}
.certs-alert.bad {
  border-color: rgba(239, 106, 102, .35);
  background: rgba(239, 106, 102, .08);
  color: #ffb3b0;
}
.certs-alert-title { font-weight: 600; white-space: pre-wrap; }
.certs-alert.ok .certs-alert-title { color: var(--ok); }
.certs-alert.bad .certs-alert-title { color: #ffb3b0; }

.certs-log {
  margin: 8px 0 0;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .certs-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 0; }
  .certs-row-head { display: none; }
  .certs-head-actions { width: 100%; }
}
