@import url('https://fonts.googleapis.com/icon?family=Material+Icons');

@font-face {
  font-family: 'Product Sans';
  src: url('/colorlab/fonts/ProductSans-Regular.woff2') format('woff2'),
       url('/colorlab/fonts/ProductSans-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

body {
  font-family: 'Product Sans', sans-serif;
  margin: 0;
  padding: 30px 20px;
  background: #f8f9fb;
  color: #333;
  text-align: center;
}

h1 {
  margin-bottom: 10px;
  font-size: 26px;
  color: #222;
}

.return-link {
  background: #0077cc;
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.return-link:hover {
  background: #005fa3;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.palette {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
  background: white;
  transition: transform 0.2s ease;
  min-width: 240px;
  max-width: 240px;
  position: relative;
}

.palette:hover {
  transform: scale(1.02);
}

.palette-label {
  position: absolute;
  top: 8px;
  left: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  background: rgba(255,255,255,0.85);
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 2;
}

.palette .swatches {
  display: flex;
  height: 100px;
}

.swatch {
  flex: 1;
  height: 100%;
  position: relative;
  transition: flex-grow 0.2s ease;
}

.swatch:hover {
  flex-grow: 1.5;
}

.swatch:hover::after {
  content: attr(data-color);
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.95);
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 4px;
  color: #222;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px; /* add spacing between buttons */
  padding: 8px;
  background: #f1f1f1;
  border-top: 1px solid #ddd;
}

.gallery-controls button,
.gallery-controls a {
  background: #0077cc;
  color: white;
  border: none;
  border-radius: 4px;
  width: auto;
  height: 32px;
  padding-left: 10px;padding-right:10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s ease;
  font-size: 0; /* hide any spacing from text */
}

.gallery-controls button:hover,
.gallery-controls a:hover {
  background: #005fa3;
}

.gallery-controls .material-icons {
  font-size: 18px;
  line-height: 1;
}

.gallery-controls {
  flex-wrap: wrap;
}


.gallery-controls button[title],
.gallery-controls a[title] {
  position: relative;
}

.gallery-controls button[title]::after,
.gallery-controls a[title]::after {
  content: attr(title);
  position: absolute;
  bottom: 125%;
  background: #333;
  color: #fff;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.gallery-controls button[title]:hover::after,
.gallery-controls a[title]:hover::after {
  opacity: 1;
}



#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
}
