/*
Theme Name: Creative Automator
Version: 0.6.1
Description: Apple-inspired Light UI (px units)
*/

/* -------- Base / Typography -------- */
html,
body {
  background: #f5f5f7;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
}
a {
  color: #007aff;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* -------- Header -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.site-header__inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 14px 0;
}
.site-nav .menu.simple {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav .menu.simple li {
  display: inline-block;
}
.site-nav .menu.simple a {
  color: #1d1d1f;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 400;
  display: inline-block;
}
.site-nav .menu.simple a:hover {
  background: rgba(0, 0, 0, 0.06);
  text-decoration: none;
}

/* -------- Headings -------- */
h1,
h2,
h3,
h4 {
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 10px;
  color: #1d1d1f;
}
h1 {
  font-size: 32px;
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 18px;
  color: #3a3a3c;
}
h4 {
  font-size: 16px;
}

p {
  margin: 0 0 10px;
  font-weight: 400;
  line-height: 1.2;
  color: #6e6e73;
}

.subheader {
  margin: 0 0 10px;
  font-weight: 400;
  line-height: 1.2;
  color: #6e6e73;
}

/* -------- Cards / Content -------- */
.card,
.entry-content,
.entry-summary {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 20px;
}

main {
  padding: 40px 0;
}

/* -------- Forms (override Foundation) -------- */
label {
  display: block;
  font-weight: 400;
  color: #3a3a3c;
  margin-bottom: 6px;
}

/* Inputs & selects */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"],
input[type="file"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: #fff;
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 10px 15px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.4;
  outline: none;
  box-shadow: none;
  transition: border-color 150ms ease, background 150ms ease;
  appearance: none;
  -webkit-appearance: none;
  min-height: 46px;
}
input[type="file"] {
  padding: 8px 10px;
}

input::placeholder,
textarea::placeholder {
  color: #999;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #007aff;
  background: #fff;
  box-shadow: none;
}

/* Buttons */
button,
.button,
.button.primary,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  background: #007aff;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 15px;
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  transition: background 150ms ease, transform 100ms ease;
  box-shadow: none;
  min-height: 46px;
}

.button.secondary {
  background: #6e6e73;
}

button:hover,
.button:hover,
.button.primary:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  background: #0066d6;
}

.button.secondary:hover {
  background: #1d1d1f;
}

button:active,
.button:active,
.button.primary:active,
.button.secondary:active,
input[type="submit"]:active,
input[type="button"]:active,
input[type="reset"]:active {
  transform: translateY(1px);
}

/* Ghost button */
.button.ghost {
  background: #fff;
  color: #007aff;
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.button.ghost:hover {
  background: #f2f2f7;
}

/* Login Form */
.login-submit {
  margin: 0;
}

/* Form Card helper */
.form-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

/* -------- Tables -------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
thead th {
  background: #f5f5f7;
  color: #1d1d1f;
  font-weight: 400;
  text-align: left;
}
th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* -------- Status Pills -------- */
.label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f2f2f7;
  color: #1d1d1f;
}
.label.success {
  background: #e6f6ec;
  border-color: #bfe8cf;
  color: #0e6b3b;
}
.label.warning {
  background: #fff3d9;
  border-color: #ffe1a1;
  color: #8a5200;
}
.label.alert {
  background: #fde8e8;
  border-color: #f8c2c2;
  color: #8a1a1a;
}

/* -------- Footer -------- */
footer {
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: #6e6e73;
  text-align: center;
  padding: 16px;
  font-size: 14px;
}

/* -------- Automations Table (Dashboard/Automations) -------- */
.card .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Base table cell behavior */
.card .table-scroll table.stack th,
.card .table-scroll table.stack td {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 220px;
}

/* Sticky header */
.card .table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f5f5f7;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

/* Status column */
.card .table-scroll th.col-status,
.card .table-scroll td.col-status {
  width: 100px;
  text-align: center;
}

/* Dates */
.card .table-scroll th.col-created_at,
.card .table-scroll td.col-created_at,
.card .table-scroll th.col-updated_at,
.card .table-scroll td.col-updated_at {
  width: 170px;
}

/* Output */
.card .table-scroll th.col-output,
.card .table-scroll td.col-output {
  min-width: 240px;
}

/* Video */
.card .table-scroll th.col-video,
.card .table-scroll td.col-video {
  width: 130px;
  text-align: center;
}

/* Long text fields */
@media (min-width: 900px) {
  .card .table-scroll th.col-message_1,
  .card .table-scroll td.col-message_1,
  .card .table-scroll th.col-message_2,
  .card .table-scroll td.col-message_2,
  .card .table-scroll th.col-message_3,
  .card .table-scroll td.col-message_3 {
    max-width: 360px;
    white-space: normal;
    line-height: 1.4;
  }
}

/* Subtle row hover */
.card .table-scroll tbody tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

/* Optional widths for hidden fields if re-enabled */
.card .table-scroll th.col-name,
.card .table-scroll td.col-name {
  min-width: 200px;
}
.card .table-scroll th.col-target,
.card .table-scroll td.col-target {
  min-width: 160px;
}
.card .table-scroll th.col-location,
.card .table-scroll td.col-location {
  min-width: 160px;
}
.card .table-scroll th.col-language,
.card .table-scroll td.col-language {
  width: 120px;
}

/* New styles */
.ca-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.ca-pill input {
  display: none;
}

.ca-pill.is-active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.required:after {
  content: " *";
  color: #e11d48;
}
