/*
 * GB Printer Web Interface Styles
 * Based on gb-tetris-web styling
 */

/* Links */
a,
a:focus,
a:hover {
  color: #fff;
}

/* Custom default button */
.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus {
  color: #333;
  text-shadow: none;
  background-color: #fff;
  border: .05rem solid #fff;
}

/*
 * Base structure
 */
html,
body {
  height: 100%;
  background-color: #333;
}

body {
  display: flex;
  color: #fff;
  text-shadow: 0 .05rem .1rem rgba(0, 0, 0, .5);
  box-shadow: inset 0 0 5rem rgba(0, 0, 0, .5);
}

.cover-container {
  max-width: 50em;
}

/*
 * Header
 */
.masthead {
  margin-bottom: 2rem;
}

.masthead-brand {
  margin-bottom: 0;
}

/*
 * Cover
 */
.cover {
  padding: 0 1.5rem;
}

.cover .btn-lg {
  padding: .75rem 1.25rem;
  font-weight: 700;
}

/*
 * Footer
 */
.mastfoot {
  color: rgba(255, 255, 255, .5);
}

/* Hide all screens by default */
.screen {
  display: none;
}

.connect {
  text-align: center;
}

/* Status container */
#status-container {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

#status-text {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

#data-received {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0;
}

/* Canvas styling */
#canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.print-canvas-wrapper {
  background-color: #fff;
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.print-canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* Scale canvas for better visibility */
.print-canvas-wrapper canvas {
  width: 320px;  /* 2x scale */
  height: auto;
}

/* Print gallery */
#print-gallery h4 {
  margin-bottom: 1rem;
}

/* Button spacing */
#btn-download-all {
  margin-right: 1rem;
}

/* Spinner for connecting */
.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Status indicators */
.status-idle {
  color: rgba(255, 255, 255, 0.7);
}

.status-receiving {
  color: #4CAF50;
}

.status-printing {
  color: #FFC107;
}
