/* Tailwaters Boat Customizer Styles */

/* Theme variables (defaults) */
:root {
  --bg: #EBECEC;
  --muted: #CAD3DC;
  --accent: #9E431F;
  --accent-2: #8295A7;
  --text: #2B2A29;
  --radius: 8px;
  --gap: 12px;
}

/* Container */
.tailwaters-boat-customizer-container {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 20px;
  border-radius: 10px;
}

.tailwaters-boat-customizer-container h1 {
  margin-top: 0;
}

.tailwaters-boat-customizer-container h2 {
  margin-top: 0;
  font-size: 1.5em;
}

.tailwaters-boat-customizer-container h3 {
  font-size: 1.2em;
  margin-top: 16px;
  margin-bottom: 12px;
}

/* Buttons */
.tailwaters-boat-customizer-container .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.1s ease;
}

.tailwaters-boat-customizer-container .btn:hover {
  opacity: 0.9;
}

.tailwaters-boat-customizer-container .btn:active {
  transform: translateY(1px);
}

/* Palette UI */
#color-palette {
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(0,0,0,0.02));
  border-radius: 10px;
  padding: 16px;
	display:flex;
}
.right-panel {
	width:60%;
}
.left-panel{
	width:40%
}
.left-panel {
    margin-left: 20px;
}
.right-panel {
    display: flex;
    align-items: center;
    background: #1c5287;
}
.palette-presets {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.preset {
  background: var(--muted);
  border: 1px solid rgba(0,0,0,0.06);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset:hover {
  background: var(--accent);
  color: #fff;
}

.swatches-group {
  margin-bottom: 16px;
}

.swatches {
  display: flex;
  gap: var(--gap);
  flex-wrap: wrap;
  max-width: 100%;
}

.swatch {
  width: 80px;
  height: 40px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  cursor: pointer;
  border: 2px solid rgba(0,0,0,0.05);
  transition: all 0.2s ease;
  font-size: 10px;
  text-align: center;
  line-height: 1.1;
}

.swatch[data-var] {
  font-size: 12px;
}

.swatch:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.palette-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.palette-desc {
  margin: 6px 0 12px;
  font-size: 14px;
  color: #666;
}

/* Boat SVG wrapper with dark background for visibility */
.boat-wrap {
  background: #155387;
  padding: 12px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 20px;
}

.boat-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Map variables to swatches using inline styles from JS or fallback colors */
.swatch.var-bg {
  background: var(--bg);
  color: var(--text);
}

.swatch.var-muted {
  background: var(--muted);
  color: var(--text);
}

.swatch.var-accent {
  background: var(--accent);
  color: #fff;
}

.swatch.var-accent-2 {
  background: var(--accent-2);
  color: #fff;
}

.swatch.var-text {
  background: var(--text);
  color: #fff;
}

/* Mode Toggle Styles */
.customizer-mode-toggle {
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
}

.mode-btn {
  background: var(--muted);
  color: var(--text);
  border: 1px solid rgba(0,0,0,0.1);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.mode-btn:hover {
  background: var(--accent);
  color: #fff;
}

.mode-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Single Color Mode Styles */
#single-color-group h3 {
  padding-bottom: 4px;
  display: inline-block;
}

.swatch.var-single {
  position: relative;
}

.swatch.var-single::after {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 10px;
  color: #ff6b35;
  font-weight: bold;
}

/* Small responsive adjustments */
@media (max-width: 768px) {
  .swatch {
    width: 70px;
    height: 35px;
    font-size: 9px;
  }
  
  .swatches {
    gap: 8px;
  }
}

@media (max-width: 640px) {
	#color-palette {
		display: block;
		padding: 0;
	}
	.right-panel {
    width: 100%;
}
	.left-panel {
    width: 100%;
		margin-left: 0px;
}
	.swatch {
    width: 60px !important;
    height: 30px !important;
    font-size: 8px !important;
}
}

@media (max-width: 480px) {
  .swatch {
    width: 60px;
    height: 60px;
  }
  
  .tailwaters-boat-customizer-container {
    padding: 12px;
  }
}