/* Apple Platinum (Mac OS 8) inspired theme for pimac.net */

:root {
  --plat-face: #dddddd;
  --plat-light: #ffffff;
  --plat-mid: #aaaaaa;
  --plat-dark: #777777;
  --plat-shadow: #555555;
  --plat-black: #222222;
  --plat-select: #30509a;
  --plat-select-light: #b6c7e3;
  --desktop-a: #7397b4;
  --desktop-b: #6b8dab;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Charcoal", "Geneva", "Lucida Grande", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--plat-black);
}

body {
  background-color: var(--desktop-b);
  background-image:
    repeating-conic-gradient(var(--desktop-a) 0% 25%, var(--desktop-b) 0% 50%);
  background-size: 4px 4px;
  min-height: 100vh;
}

/* ------------------------------------------------------------ menubar -- */

.menubar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 26px;
  padding: 0 10px;
  background: linear-gradient(#ffffff, #dddddd 60%, #cccccc);
  border-bottom: 1px solid var(--plat-black);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

.menubar-apple {
  display: flex;
  align-items: center;
  padding: 0 8px 0 2px;
}

.menubar-item {
  display: inline-block;
  padding: 3px 10px;
  color: var(--plat-black);
  text-decoration: none;
  font-weight: bold;
  border-radius: 2px;
  white-space: nowrap;
}

.menubar-item:hover, .menubar-item.active:hover {
  background: var(--plat-select);
  color: #ffffff;
}

.menubar-item.active { color: #000000; }

.menubar-spacer { flex: 1; }

.menubar-form { display: inline; margin: 0; }

.menubar-button {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

/* ------------------------------------------------------------ desktop -- */

.desktop {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 14px 40px;
}

.footer {
  margin-top: 26px;
  text-align: center;
  color: #e8eef4;
  font-size: 12px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.footer a { color: #ffffff; }

/* ------------------------------------------------------------- window -- */

.window {
  background: var(--plat-face);
  border: 1px solid var(--plat-black);
  border-radius: 0;
  margin: 0 0 24px;
  box-shadow:
    inset 1px 1px 0 var(--plat-light),
    inset -1px -1px 0 var(--plat-mid),
    3px 3px 0 rgba(0, 0, 0, 0.35);
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 6px;
  border-bottom: 1px solid var(--plat-black);
  background:
    repeating-linear-gradient(
      180deg,
      #f4f4f4 0px, #f4f4f4 1px,
      #cfcfcf 1px, #cfcfcf 2px,
      #ededed 2px, #ededed 3px,
      #c4c4c4 3px, #c4c4c4 4px
    );
  user-select: none;
}

.window-title .title-text {
  flex: 1;
  text-align: center;
  font-weight: bold;
  font-size: 13px;
  background: var(--plat-face);
  padding: 1px 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.title-box {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #fefefe, #b8b8b8);
  border: 1px solid var(--plat-black);
  box-shadow: inset 1px 1px 0 var(--plat-light);
  flex: 0 0 auto;
}

.window-body { padding: 16px 18px; }

.window-body > :first-child { margin-top: 0; }
.window-body > :last-child { margin-bottom: 0; }

h1, h2, h3 { font-weight: bold; }
h1 { font-size: 22px; margin: 0 0 10px; }
h2 { font-size: 16px; margin: 18px 0 8px; }
h3 { font-size: 14px; margin: 14px 0 6px; }

p, li { line-height: 1.5; }

a { color: var(--plat-select); }

code {
  font-family: "Monaco", "Menlo", "Courier New", monospace;
  font-size: 12px;
  background: #eeeeee;
  border: 1px solid #bbbbbb;
  padding: 0 3px;
}

/* ------------------------------------------------------------ buttons -- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: bold;
  color: var(--plat-black);
  text-decoration: none;
  text-align: center;
  padding: 5px 18px;
  background: linear-gradient(#fdfdfd, #cfcfcf);
  border: 1px solid var(--plat-black);
  border-radius: 5px;
  box-shadow:
    inset 1px 1px 0 var(--plat-light),
    inset -1px -1px 0 var(--plat-mid);
  cursor: pointer;
}

.btn:hover { background: linear-gradient(#ffffff, #dcdcdc); }

.btn:active {
  background: linear-gradient(#b9b9b9, #d3d3d3);
  box-shadow: inset 1px 1px 0 var(--plat-dark);
}

.btn:disabled {
  color: #999999;
  background: var(--plat-face);
  cursor: default;
}

.btn-default {
  outline: 2px solid var(--plat-black);
  outline-offset: 2px;
  border-radius: 5px;
}

.btn-small { padding: 2px 10px; font-weight: normal; font-size: 12px; }

.btn-danger { color: #7a1010; }

/* -------------------------------------------------------------- forms -- */

input[type="text"], input[type="password"], input[type="number"], select, textarea {
  font: inherit;
  padding: 4px 6px;
  background: #ffffff;
  color: var(--plat-black);
  border: 1px solid var(--plat-black);
  box-shadow: inset 1px 1px 0 var(--plat-mid);
  border-radius: 0;
  max-width: 100%;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--plat-select);
  outline-offset: 0;
}

label { cursor: pointer; }

input[type="checkbox"], input[type="radio"] {
  accent-color: var(--plat-select);
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.field-row > label.field-label {
  min-width: 130px;
  text-align: right;
  font-weight: bold;
}

.hint {
  font-size: 12px;
  color: #555555;
  margin: 4px 0 10px;
}

/* --------------------------------------------------- bevels and groups -- */

.group-box {
  border: 1px solid var(--plat-dark);
  box-shadow: inset 1px 1px 0 var(--plat-light), 1px 1px 0 var(--plat-light);
  padding: 12px 14px 14px;
  margin: 14px 0;
  background: #e4e4e4;
}

.group-box > legend, .group-box > .group-title {
  font-weight: bold;
  padding: 0 6px;
  background: var(--plat-face);
  border: 1px solid var(--plat-dark);
  display: inline-block;
  margin: -22px 0 8px;
}

.inset {
  background: #ffffff;
  border: 1px solid var(--plat-black);
  box-shadow: inset 1px 1px 0 var(--plat-mid);
  padding: 8px 10px;
}

/* -------------------------------------------------------------- lists -- */

.pick-list { list-style: none; margin: 6px 0; padding: 0; }

.pick-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px dotted #bbbbbb;
}

.pick-list li:last-child { border-bottom: none; }

.pick-list .pick-name { font-weight: bold; }

.pick-list .pick-desc { color: #555555; font-size: 12px; }

.pick-list .pick-size {
  margin-left: auto;
  font-size: 12px;
  color: #555555;
  white-space: nowrap;
}

/* -------------------------------------------------------------- table -- */

table.plat-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid var(--plat-black);
  box-shadow: inset 1px 1px 0 var(--plat-mid);
}

table.plat-table th {
  text-align: left;
  font-size: 12px;
  padding: 5px 8px;
  background: linear-gradient(#f2f2f2, #d4d4d4);
  border-bottom: 1px solid var(--plat-black);
}

table.plat-table td {
  padding: 5px 8px;
  border-bottom: 1px dotted #cccccc;
  font-size: 13px;
  vertical-align: middle;
}

table.plat-table tr:last-child td { border-bottom: none; }

/* ------------------------------------------------------- progress bar -- */

.progress-track {
  height: 16px;
  background: #ffffff;
  border: 1px solid var(--plat-black);
  box-shadow: inset 1px 1px 0 var(--plat-mid);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background:
    repeating-linear-gradient(
      90deg,
      #5d7fc4 0px, #5d7fc4 8px,
      #7e9bd6 8px, #7e9bd6 16px
    );
  background-size: 32px 100%;
  transition: width 0.6s ease;
  animation: barber 1.2s linear infinite;
}

@keyframes barber {
  from { background-position: 0 0; }
  to { background-position: 32px 0; }
}

.progress-fill.done { animation: none; background: #5d7fc4; }

/* --------------------------------------------------------- misc bits -- */

.error-text { color: #8b1a1a; font-weight: bold; }

.ok-text { color: #1a6b2a; font-weight: bold; }

.upload-status { font-size: 12px; color: #333333; margin-left: 8px; }

.actions { margin-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}

@media (max-width: 660px) {
  .two-col { grid-template-columns: 1fr; }
  .field-row > label.field-label { text-align: left; min-width: 0; }
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid var(--plat-dark);
  background: #eeeeee;
  padding: 0 6px;
  border-radius: 8px;
  vertical-align: 1px;
}
