body {
    font-family: sans-serif;
    margin: 0;
    padding: 12px; 
    max-width: none;
    font-size: 16px;
    line-height: 1.5;
}

/* Tablet */
@media (min-width: 700px) {
  body {
    max-width: 700px;
    margin: 0 auto;            /* recenter on wider screens */
    padding: 20px;
    font-size: 17px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  body {
    max-width: 900px;          /* comfortable reading width */
  }
}

form, .order {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 30px;
}

label {
    display: block;
    margin: 10px 0 5px;
}

input[type="text"],
input[type="range"],
input[type="file"] {
    width: 100%;
    padding: 10px;             /* bigger touch target */
    margin-bottom: 12px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 16px;           /* prevents iOS zoom-on-focus */
}

input[type="submit"],
button {
    font-family: inherit;
    padding: 10px 16px;
    margin-top: 10px;
    font-size: 16px;           /* consistent with inputs */
}

input[type="checkbox"] {
    margin-right: 5px;
}

pre {
    background: #eee;
    padding: 10px;
    border-radius: 5px;
    white-space: pre-wrap;
    margin-bottom: 30px;
}

img, video {
    max-width: 100%;
    margin-top: 10px;
}

.order .toggle-btn {
    all: unset;
    color: #4da3ff;
    cursor: pointer;
    font-weight: normal;
    margin-left: 0.3em;
    font-size: 1em;
}

.order .toggle-btn:hover {
    text-decoration: underline;
}

#priorityButtons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
}

#priorityButtons button {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    background: #eee;
    cursor: pointer;
    font-family: inherit;
}

#priorityButtons button.selected {
    background: #4da3ff;
    color: white;
    font-weight: bold;
}

.priority-low {
    color: #00c851; /* Green */
    font-weight: bold;
}

.priority-medium {
    color: #ffbb33; /* Amber / Yellow */
    font-weight: bold;
}

.priority-high {
    color: #ff4444; /* Red */
    font-weight: bold;
}

.priority-unknown {
    color: #999;
    font-style: italic;
}

/* --- Media grid & lightbox (orders iframe) --- */
.media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.media-thumb {
  position: relative;
  width: 160px;
  height: 120px;
  overflow: hidden;
  border-radius: 6px;
  background: #ddd;
  cursor: pointer;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-thumb .play-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
  pointer-events: none;
}

/* full-screen overlay (lightbox) */
.lightbox {
  position: fixed;
  /*inset: 0;*/
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /*z-index: 9999;*/
  z-index: 999999; /* above iframe */
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto; /* if media is larger than viewport */
}

.lightbox__inner {
  max-width: 92vw;
  max-height: 92vh;
}

.lightbox__inner img,
.lightbox__inner video {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.lightbox__close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
}

