/**
 * FRONT-END STYLES: Colors
 */

$sm: 640px;
$md: 960px;
$lg: 1200px;


/**
 * Block container.
 */

.cp-palette {
  max-width: 100%;
  width: 100%;
}


/**
 * Palette container.
 */

.cp-colors {
  @media screen and ( min-width: $sm ) {
    display: grid;
    grid-column-gap: 2rem;
    grid-template-columns: repeat( 2, 1fr );
  }

  @media screen and ( min-width: $md ) {
    grid-template-columns: repeat( 3, 1fr );
  }

  @media screen and ( min-width: $lg ) {
    grid-template-columns: repeat( 4, 1fr );
  }
}


/**
 * Special grid styles for circle color display.
 */

.cp-palette.is-style-circle {
  .cp-colors {
    display: grid;
    grid-column-gap: 4rem;
    grid-template-columns: repeat( 2, 1fr );

    @media screen and ( min-width: $sm ) {
      grid-column-gap: 6rem;
      grid-template-columns: repeat( 4, 1fr );
    }

    @media screen and ( min-width: $md ) {
      grid-template-columns: repeat( 4, 1fr );
    }

    @media screen and ( min-width: $lg ) {
      grid-template-columns: repeat( 6, 1fr );
    }
  }
}


/**
 * Search container.
 */
.cp-palette-search {
  margin-block-end: 1rem;

  fieldset {
    border: 0;
  }

  &-label {
    display: block;
    margin-block-end: 0.25rem;
  }

  &-input {
    margin-inline-end: 0.5rem;
    min-width: 25vw;
    padding: 0.25rem;
  }

  &-submit {
    cursor: pointer;
    padding: 0.25rem 1rem;
  }
}
