/* ============================================================
   DICKEY SYSTEMS — extras.css
   One-off components, experiments, and add-ons.
   Not part of the core design system.
   ============================================================ */

/* === FLIP CLOCK COUNTDOWN =========================== */

.flip-clock {
  text-align: center;
  perspective: 600px;
  margin: 0.5em auto 1em;
}

.flip-clock *,
.flip-clock *:before,
.flip-clock *:after { box-sizing: border-box; }

.flip-clock__piece {
  display: inline-block;
  margin: 0 0.2vw;
}

.flip-clock__slot {
  font-size: 1rem;
  line-height: 1.5;
  display: block;
  font-family: monospace;
  color: #444;
}

.flip-card {
  display: block;
  position: relative;
  padding-bottom: 0.72em;
  font-size: 2.25rem;
  line-height: 0.95;
}

@media (min-width: 1000px) {
  .flip-clock__piece { margin: 0 5px; }
  .flip-clock__slot  { font-size: 1.2rem; }
  .flip-card         { font-size: 3rem; }
}

.flip-card__top,
.flip-card__bottom,
.flip-card__back-bottom,
.flip-card__back::before,
.flip-card__back::after {
  display: block;
  height: 0.72em;
  color: #ccc;
  background: #222;
  padding: 0.23em 0.25em 0.4em;
  border-radius: 0.15em 0.15em 0 0;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  width: 1.8em;
}

.flip-card__bottom,
.flip-card__back-bottom {
  color: #fff;
  position: absolute;
  top: 50%;
  left: 0;
  border-top: solid 1px #000;
  background: #393939;
  border-radius: 0 0 0.15em 0.15em;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.flip-card__back-bottom { z-index: 1; }

.flip-card__bottom::after,
.flip-card__back-bottom::after {
  display: block;
  margin-top: -0.72em;
}

.flip-card__back::before,
.flip-card__bottom::after,
.flip-card__back-bottom::after { content: attr(data-value); }

.flip-card__back {
  position: absolute;
  top: 0;
  height: 100%;
  left: 0;
  pointer-events: none;
}

.flip-card__back::before {
  position: relative;
  overflow: hidden;
  z-index: -1;
}

.flip-clock__piece.flip .flip-card__back::before {
  z-index: 1;
  animation: flipTop 0.3s cubic-bezier(.37,.01,.94,.35);
  animation-fill-mode: both;
  transform-origin: center bottom;
}

.flip-clock__piece.flip .flip-card__bottom {
  transform-origin: center top;
  animation-fill-mode: both;
  animation: flipBottom 0.6s cubic-bezier(.15,.45,.28,1);
}

@keyframes flipTop {
  0%        { transform: rotateX(0deg); z-index: 2; }
  0%, 99%   { opacity: 1; }
  100%      { transform: rotateX(-90deg); opacity: 0; }
}

@keyframes flipBottom {
  0%, 50%   { z-index: -1; transform: rotateX(90deg); opacity: 0; }
  51%       { opacity: 1; }
  100%      { opacity: 1; transform: rotateX(0deg); z-index: 5; }
}

/* === VIDEO EMBED ====================================== */

.video-embed-wrap {
  position: relative;
  padding-top: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-embed-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* === TYMILY THANK YOU ================================= */

.tymily-thankyou {
  text-align: center;
  padding: 1.5em 1em 2em;
  border-bottom: 2px solid #ccc;
  margin-bottom: 2em;
}

.thankyou-label {
  font-family: monospace;
  font-size: 0.85em;
  color: green;
  letter-spacing: 2px;
  margin-bottom: 0.5em;
}

.thankyou-heading {
  font-family: Impact, monospace;
  font-size: 4em;
  line-height: 1;
  letter-spacing: 2px;
  color: #000;
  margin: 0.2em 0;
}

@media (min-width: 600px) {
  .thankyou-heading { font-size: 6em; }
}

.thankyou-sub {
  font-family: monospace;
  font-size: 0.9em;
  color: #555;
  margin-top: 0.8em;
}

/* === DISABLED LINKS =================================== */

.win95-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.rsvp-link-disabled {
  opacity: 0.45;
  font-family: monospace;
}

/* === MU-LAW CONVERTER 711 ============================= */
/* Page: mulaw.html. ITU-T G.711 encoder front end.       */

/* text-transform:uppercase maps mu (U+03BC) to Greek capital MU (U+039C),
   which is indistinguishable from a Latin M. Opt the glyph out wherever it
   sits inside an uppercased heading. */
.mulaw-glyph { text-transform: none; }

.mulaw-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Drop target --- */

.mulaw-drop {
  display: block;
  width: 100%;
  background: #ffffff;
  border: 4px dashed darkorange;
  padding: 2.5em 1em;
  margin: 1em 0 0;
  text-align: center;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.mulaw-drop:hover,
.mulaw-drop:focus-visible {
  background: #fff8ee;
  border-color: #cc0000;
}

.mulaw-drop:focus-visible {
  outline: 3px solid #000080;
  outline-offset: 3px;
}

.mulaw-drop.hot {
  background: #ffffcc;
  border-style: solid;
  border-color: #008000;
}

.mulaw-drop-main {
  display: block;
  font-family: Impact, "Arial Black", monospace;
  font-size: 1.5em;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #000080;
  margin-bottom: 0.4em;
}

.mulaw-drop-sub {
  display: block;
  font-family: monospace;
  font-size: 0.85em;
  color: #555555;
  letter-spacing: 1px;
}

/* --- Conversion queue --- */

.mulaw-queue { margin-top: 1.5em; }

.mulaw-queue:empty { display: none; }

.mulaw-queue-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  flex-wrap: wrap;
  font-family: Impact, "Arial Black", monospace;
  font-size: 0.95em;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ffffff;
  background: #000080;
  background-image: linear-gradient(90deg, #000055, #000099, #000055);
  padding: 6px 16px;
  border-top: 3px solid darkorange;
  border-bottom: 3px solid darkorange;
}

.mulaw-row {
  background: #ffffff;
  border-top:    2px solid #ffffff;
  border-left:   2px solid #ffffff;
  border-right:  2px solid #808080;
  border-bottom: 2px solid #808080;
  padding: 0.7em 1em;
  margin: 0.5em 0;
  display: grid;
  grid-template-columns: 2.2em 1fr auto auto;
  gap: 0 1em;
  align-items: baseline;
}

.mulaw-row.failed { background: #ffeeee; }

.mulaw-idx {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85em;
  color: #808080;
}

.mulaw-name {
  font-family: monospace;
  font-size: 0.95em;
  overflow-wrap: anywhere;
  color: #1d1e19;
}

.mulaw-meta {
  display: block;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78em;
  color: #555555;
  margin-top: 3px;
}

.mulaw-row.failed .mulaw-meta { color: #cc0000; }

.mulaw-state {
  font-family: Impact, "Arial Black", monospace;
  font-size: 0.85em;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.mulaw-state.working { color: #000080; }
.mulaw-state.done    { color: #008000; }
.mulaw-state.failed  { color: #cc0000; }

/* --- Per-row and bulk actions --- */

.mulaw-get {
  background: darkorange;
  color: #000000;
  font-family: Impact, "Arial Black", monospace;
  font-size: 0.8em;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 5px 12px;
  border-top:    2px solid #ffcc66;
  border-left:   2px solid #ffcc66;
  border-right:  2px solid #884400;
  border-bottom: 2px solid #884400;
  cursor: pointer;
}

.mulaw-get:hover { background: #ffaa33; }

.mulaw-get:active {
  border-top:    2px solid #884400;
  border-left:   2px solid #884400;
  border-right:  2px solid #ffcc66;
  border-bottom: 2px solid #ffcc66;
}

.mulaw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.2em;
}

/* display:flex above outranks the UA [hidden] rule, so restate it */
.mulaw-actions[hidden] { display: none; }

.mulaw-actions .win95-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .mulaw-row { grid-template-columns: 2.2em 1fr; }
  .mulaw-state { grid-column: 2; margin-top: 6px; }
  .mulaw-get { grid-column: 2; justify-self: start; margin-top: 8px; }
}
