/* Cron Expression Builder - tool-specific styles (scoped with cb- prefix)
   Accent color for this tool: var(--site-light) (used only within cb- scoped classes,
   never overriding the global site header/title-bar). */

.cb-card { padding: 28px; }
.cb-title-bar { background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 100%); border-radius: 10px 10px 0 0; padding: 18px 24px; margin: -28px -28px 24px; }
.cb-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; }

.cb-body { display: flex; flex-direction: column; gap: 4px; }

.cb-section-title { display: flex; align-items: center; gap: 10px; font-size: 1.1em; font-weight: 800; color: var(--site-dark); margin: 0 0 16px; }
.cb-section-title i { width: 30px; height: 30px; border-radius: 8px; background: var(--site-light); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .8em; }

.cb-divider { border: none; border-top: 1px dashed #e6e6e6; margin: 28px 0; }

/* ===== Presets ===== */
.cb-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.cb-presets-label { font-size: .85em; color: #6b7280; font-weight: 600; margin-right: 2px; }
.cb-preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.cb-preset-row-label { font-size: .85em; color: #6b7280; font-weight: 600; }
.cb-preset-btn { background: none; border: 1px solid #ddd; border-radius: 20px; padding: 7px 16px; font-size: .85em; font-weight: 700; color: var(--site-dark); cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.cb-preset-btn:hover { background: #f0fdfa; border-color: var(--site-light); }
.cb-preset-btn:active { transform: translateY(1px); }
.cb-time-input, .cb-select { border: 1px solid #ddd; border-radius: 8px; padding: 7px 10px; font-size: .88em; color: #23272f; background: #fafbfc; }
.cb-time-input:focus, .cb-select:focus { outline: none; border-color: var(--site-light); box-shadow: 0 0 0 3px rgba(20, 184, 166, .12); }
.cb-select-narrow { max-width: 90px; }

/* ===== Build fields grid ===== */
.cb-fields { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 18px 0 16px; }
.cb-field label { display: block; font-size: .8em; font-weight: 700; color: #23272f; margin-bottom: 6px; }
.cb-field select, .cb-field input { width: 100%; box-sizing: border-box; border: 1px solid #ddd; border-radius: 8px; padding: 9px 10px; font-size: .88em; color: #23272f; background: #fafbfc; }
.cb-field select:focus, .cb-field input:focus { outline: none; border-color: var(--site-light); box-shadow: 0 0 0 3px rgba(20, 184, 166, .12); }
.cb-field-full { margin-bottom: 14px; }

/* ===== Expression / description output ===== */
.cb-expr-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.cb-expr { font-family: "Courier New", monospace; font-size: 1.15em; font-weight: 700; color: var(--site-dark); background: #fdf1ec; border: 1px solid #f3d9cb; border-radius: 8px; padding: 10px 16px; letter-spacing: .03em; }
.cb-copy-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #23272f; padding: 8px 14px; font-size: .85em; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.cb-copy-btn:hover { background: var(--site-light); border-color: var(--site-light); color: #fff; }
.cb-copied { font-size: .85em; color: var(--site-success); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.cb-desc { font-size: .95em; color: #3d4148; background: #f7f8fa; border-radius: 8px; padding: 12px 16px; margin: 0; }

/* ===== Parse section ===== */
.cb-parse-input { font-family: "Courier New", monospace; font-size: 1em; }
.cb-error { background: var(--site-danger-bg); border: 1px solid var(--site-danger-border); color: var(--site-danger); border-radius: 8px; padding: 10px 14px; font-size: .88em; font-family: "Courier New", monospace; margin-bottom: 14px; }
.cb-error.hide { display: none; }

.cb-next-runs { margin-top: 16px; }
.cb-next-runs label { display: block; font-size: .88em; font-weight: 700; color: #23272f; margin-bottom: 10px; }
.cb-next-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cb-next-list li { display: flex; align-items: center; gap: 12px; border: 1px solid #eee; border-radius: 8px; padding: 10px 14px; background: #f7f8fa; font-size: .92em; color: #23272f; }
.cb-next-list .cb-run-index { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--site-light); color: #fff; font-size: .75em; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 900px) {
    .cb-fields { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .cb-card { padding: 22px 18px; }
    .cb-title-bar { margin: -22px -18px 20px; }
    .cb-fields { grid-template-columns: repeat(2, 1fr); }
    .cb-expr { font-size: 1em; }
}
