/**
 * Frontend styles — colour swatch grid.
 * Clean, flat, minimal aesthetic. No gradients or shadows.
 *
 * @package WC_Colour_Swatches
 */

/* ------------------------------------------------------------------ */
/*  Wrapper                                                           */
/* ------------------------------------------------------------------ */
.wccs-swatches-wrap {
    margin: 16px 0;
    font-family: inherit;
    line-height: 1.4;
}

/* ------------------------------------------------------------------ */
/*  Colour groups                                                     */
/* ------------------------------------------------------------------ */
.wccs-group {
    margin-bottom: 14px;
}

.wccs-group:last-child {
    margin-bottom: 0;
}

.wccs-group-heading {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    margin: 0 0 6px 0;
    padding: 0;
    border: none;
    background: none;
    line-height: 1.3;
}

/* ------------------------------------------------------------------ */
/*  Swatch grid                                                       */
/* ------------------------------------------------------------------ */
.wccs-swatch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

/* ------------------------------------------------------------------ */
/*  Individual swatch button                                          */
/* ------------------------------------------------------------------ */
.wccs-swatch {
    display: inline-block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #ccc;
    padding: 0;
    margin: 0;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #eee;
    position: relative;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    font-size: 0;
    line-height: 0;
}

.wccs-swatch:hover,
.wccs-swatch:focus-visible {
    border-color: #555;
}

/* Active / selected state — accent ring */
.wccs-swatch--active {
    border: 2px solid #333;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #333;
}

/* ------------------------------------------------------------------ */
/*  Info panel below the grid                                         */
/* ------------------------------------------------------------------ */
.wccs-swatch-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    min-height: 22px;
}

.wccs-colour-name {
    font-weight: 600;
}

.wccs-state-label {
    font-weight: 400;
    color: #666;
}

/* ------------------------------------------------------------------ */
/*  Status dot                                                        */
/* ------------------------------------------------------------------ */
.wccs-state-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wccs-state-dot--stocked {
    background-color: #22c55e; /* green */
}

.wccs-state-dot--offered {
    background-color: #f59e0b; /* amber */
}

.wccs-state-dot--special_order {
    background-color: #9ca3af; /* grey */
}

/* ------------------------------------------------------------------ */
/*  Hidden input (for future cart integration)                        */
/* ------------------------------------------------------------------ */
.wccs-selected-colour {
    display: none;
}

/* ------------------------------------------------------------------ */
/*  Screen reader text (WP convention)                                */
/* ------------------------------------------------------------------ */
.wccs-swatches-wrap .screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}
