/* Palette Generator Tool Specific Styles */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.2em 1.2em 1.6em 1.2em;
  }
  
  .palette-generator {
    background: #fff;
    border-radius: 1.2em;
    box-shadow: 0 2px 12px 0 rgba(50,50,93,0.08);
    padding: 2em 2em 1.2em 2em;
    margin-bottom: 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 2em 2.5em;
    margin-bottom: 1.5em;
  }
  
  .control-group {
    display: flex;
    flex-direction: column;
    min-width: 180px;
    margin-bottom: 0.7em;
  }
  
  label {
    font-weight: 600;
    font-size: 1em;
    margin-bottom: 0.4em;
  }
  
  input[type="color"] {
    border: none;
    width: 2.4em;
    height: 2.4em;
    border-radius: 0.5em;
    margin-right: 0.7em;
    cursor: pointer;
  }
  
  input[type="text"] {
    width: 7.2em;
    padding: 0.4em 0.7em;
    border: 1.5px solid #ccc;
    border-radius: 0.5em;
    font-size: 1em;
    margin-left: 0.5em;
  }
  
  input[type="range"] {
    width: 100%;
    accent-color: #34B2A4;
  }
  
  select {
    border-radius: 0.5em;
    padding: 0.4em 1.2em 0.4em 0.7em;
    border: 1.5px solid #ccc;
    font-size: 1em;
  }
  
  .btn {
    background: #34B2A4;
    color: #fff;
    border: none;
    border-radius: 0.5em;
    padding: 0.5em 1.3em;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    margin-right: 0.5em;
    margin-bottom: 0.5em;
    display: inline-flex;
    align-items: center;
  }
  .btn:hover, .btn:focus {
    background: #289d92;
    color: #fff;
  }
  .btn.secondary {
    background: #eac50b;
    color: #222;
  }
  .btn.neutral {
    background: #e5e5e5;
    color: #222;
  }
  .btn.neutral:hover, .btn.neutral:focus {
    background: #d0d0d0;
  }
  
  .palette-actions {
    display: flex;
    gap: 1.2em;
    align-items: center;
    margin-bottom: 2em;
  }
  .export-options {
    display: flex;
    gap: 0.5em;
    margin-left: 1em;
  }
  .export-options button {
    background: #f7fbfc;
    border: 1px solid #ccc;
    border-radius: 0.5em;
    padding: 0.3em 1em;
    font-size: 0.97em;
    cursor: pointer;
    transition: background 0.15s;
  }
  .export-options button:hover {
    background: #eac50b;
    color: #222;
  }
  
  /* ---- PALETTE PREVIEW ---- */
  .palette-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.2rem;
    margin: 2.5rem 0 1.5rem 0;
  }
  
  .color-swatches {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: flex-end !important;
    gap: 0 !important;
    margin: 2em auto 1em auto !important;
    min-height: 120px !important;
    width: max-content !important;
  }
  
  .palette-swatch {
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.11), 0 1.5px 5px rgba(0,0,0,0.11);
    transition: transform 0.22s cubic-bezier(.4,1.5,.7,1), box-shadow 0.22s;
    cursor: pointer;
    position: relative;
    overflow: visible;
    min-height: 90px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 0 !important;
  }
  .palette-swatch:hover {
    transform: translateY(-6px) scale(1.045);
    box-shadow: 0 8px 32px rgba(0,0,0,0.16), 0 2.5px 10px rgba(0,0,0,0.13);
    z-index: 2;
  }
  .palette-code {
    background: rgba(255,255,255,0.82);
    border-radius: 9px;
    padding: 0.35em 0.95em;
    margin: 0.7em 0.6em;
    font-size: 1.07em;
    font-family: 'Fira Mono', 'Menlo', 'Consolas', monospace;
    font-weight: 600;
    color: #222;
    box-shadow: 0 1.5px 4px rgba(0,0,0,0.08);
    transition: background 0.17s, color 0.17s;
    user-select: all;
  }
  .palette-swatch:active {
    transform: scale(0.99);
  }
  .palette-popover {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 110%;
    transform: translateX(-50%);
    min-width: 150px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.17);
    padding: 1em 1.2em 0.7em 1.2em;
    font-size: 0.97em;
    color: #222;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.21s;
  }
  .palette-swatch:hover .palette-popover,
  .palette-swatch:focus-within .palette-popover {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
  .palette-popover-title {
    font-weight: 700;
    margin-bottom: 0.3em;
    font-size: 1.07em;
  }
  .palette-popover-row {
    margin-bottom: 0.3em;
  }
  .palette-popover-row:last-child {
    margin-bottom: 0;
  }
  
  /* ---- TABS & PALETTE CARDS ---- */
  .tabs {
    background: #fff;
    border-radius: 1.2em;
    box-shadow: 0 2px 12px 0 rgba(50,50,93,0.08);
    padding: 2em 2em 1.2em 2em;
    margin-bottom: 2em;
  }
  .tab-headers {
    display: flex;
    gap: 1.2em;
    margin-bottom: 1.2em;
  }
  .tab-btn {
    background: #f7fbfc;
    border: 1.5px solid #34B2A4;
    border-radius: 0.5em 0.5em 0 0;
    padding: 0.7em 2em;
    font-size: 1em;
    font-weight: 600;
    color: #34B2A4;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
  }
  .tab-btn.active, .tab-btn:hover {
    background: #34B2A4;
    color: #fff;
  }
  .tab-content {
    background: #f7fbfc;
    border-radius: 0 0 1.2em 1.2em;
    padding: 1.2em 1.8em;
  }
  .tab-pane {
    display: none;
  }
  .tab-pane.active {
    display: block;
  }
  .preset-palettes, .saved-palettes, .history-palettes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.2em 1.4em;
    margin-bottom: 1.8em;
  }
  .preset-palette, .saved-palette, .history-palette {
    background: #fff;
    border-radius: 1.1em;
    box-shadow: 0 2px 12px 0 rgba(50,50,93,0.10);
    padding: 1.2em 1.2em 1em 1.2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 180px;
    max-width: 260px;
    cursor: pointer;
    transition: box-shadow 0.18s, border 0.18s, transform 0.18s;
    border: 2px solid transparent;
    position: relative;
  }
  .preset-palette:hover, .preset-palette:focus, .saved-palette:hover, .saved-palette:focus, .history-palette:hover, .history-palette:focus {
    border: 2px solid #34B2A4;
    box-shadow: 0 6px 24px rgba(52,178,164,0.16);
    transform: translateY(-4px) scale(1.025);
    z-index: 2;
  }
  .preset-palette .colors, .saved-palette .colors, .history-palette .colors {
    display: flex;
    gap: 0.38em;
    margin-bottom: 1.1em;
  }
  .preset-palette .color, .saved-palette .color, .history-palette .color {
    width: 34px;
    height: 68px;
    border-radius: 0.7em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.09);
    transition: transform 0.13s;
  }
  .preset-palette span, .saved-palette span, .history-palette span {
    font-size: 1.09em;
    font-weight: 600;
    color: #222;
    letter-spacing: 0.01em;
    margin-top: 0.3em;
    text-align: center;
  }
  @media (max-width: 900px) {
    .preset-palettes, .saved-palettes, .history-palettes {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 1.1em 0.6em;
    }
    .preset-palette, .saved-palette, .history-palette {
      min-width: 110px;
      max-width: 160px;
      padding: 0.7em 0.7em 0.6em 0.7em;
    }
    .preset-palette .color, .saved-palette .color, .history-palette .color {
      width: 22px;
      height: 38px;
    }
  }
  @media (max-width: 600px) {
    .palette-preview {
      grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    }
    .preset-palette, .saved-palette, .history-palette {
      min-width: 100px;
      max-width: 130px;
      padding: 0.6em 0.5em;
    }
    .tab-btn {
      padding: 0.7em 0.8em;
      font-size: 0.96em;
    }
  }
  
  .active-color-btn {
    border: 2.5px solid #37B5A7 !important;
    background: #e0f7fa !important;
    color: #1a4742 !important;
    box-shadow: 0 2px 8px rgba(55,181,167,0.13);
    font-weight: 700;
    z-index: 2;
  }
  
  .active-format-btn {
    border: 2.5px solid #1e88e5 !important;
    background: #e3f2fd !important;
    color: #0d47a1 !important;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(30,136,229,0.13);
    z-index: 2;
  }
  