/* Cron Builder — tool-specific styles */

body.page-cron { height: auto; min-height: 100vh; overflow: auto; }

.cron-wrap {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cron-section {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.cron-section-title {
  padding: 9px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #94a3b8;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.format-tabs { display: flex; }

.format-tab {
  padding: 3px 10px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.4;
  transition: background 0.12s, color 0.12s;
}
.format-tab:first-child { border-radius: 5px 0 0 5px; }
.format-tab:last-child { border-radius: 0 5px 5px 0; border-left: none; }
.format-tab.active { background: #2563eb; color: #fff; border-color: #2563eb; }

/* Expression input row */
.cron-expr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.cron-expr-input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 14px;
  font-family: 'Fira Code','Cascadia Code','JetBrains Mono',monospace;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  background: #fff;
  outline: none;
  letter-spacing: 2px;
  min-width: 0;
}
.cron-expr-input:focus { border-color: #2563eb; }

/* Individual field inputs */
.cron-fields {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  flex-wrap: wrap;
}

.cron-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 90px;
}

.cron-field label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #94a3b8;
}

.cron-field input {
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: 'Fira Code','Cascadia Code','JetBrains Mono',monospace;
  font-size: 13px;
  color: #1e293b;
  background: #fff;
  outline: none;
  width: 100%;
}
.cron-field input:focus { border-color: #2563eb; }

/* Description */
.cron-description {
  padding: 16px;
  font-size: 16px;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.5;
  min-height: 52px;
}
.cron-description.cron-invalid {
  color: #dc2626;
  font-size: 13px;
  font-weight: 400;
}

/* Presets */
.cron-presets {
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-btn {
  padding: 5px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.preset-btn:hover { background: #eff6ff; border-color: #2563eb; color: #2563eb; opacity: 1; }

/* Next runs */
.cron-next-runs {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 44px;
  color: #94a3b8;
  font-size: 13px;
}

.cron-run {
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 13px;
  color: #1e293b;
  font-family: 'Fira Code','Cascadia Code','JetBrains Mono',monospace;
  border: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
  .cron-wrap { padding: 16px; gap: 16px; }
  .cron-description { font-size: 14px; }
  .cron-field { min-width: 70px; }
  .cron-expr-input { font-size: 13px; letter-spacing: 1px; }
}
