/* swatches.css — v0.3.10 */

.monarch-swatches {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 18px;

    flex-wrap: wrap;
    overflow: visible;
}

/* ----------------------------------------
   BASE SWATCH (CARD DEFAULT)
---------------------------------------- */

.monarch-swatch {
    all: unset;
    box-sizing: border-box;

    width: auto;
    min-width: 0;            /* 🔥 THIS is the real fix */

    padding: 10px 6px;

    cursor: pointer;

    border: 1px solid #ccc;
    background: #fff;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    transition: all 0.2s ease;
}

/* ----------------------------------------
   HOVER
---------------------------------------- */

.monarch-swatch:hover {
    border-color: #7A8EA1;
    background: #f5f7f9;
}

/* ----------------------------------------
   SELECTED
---------------------------------------- */

.monarch-swatch.selected {
    border-color: #7A8EA1;
    background: #f3f6f8;
    box-shadow: 0 0 0 1px #7A8EA1 inset;
}

/* ----------------------------------------
   IMAGE (CARD STYLE)
---------------------------------------- */

.monarch-swatch-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    margin-bottom: 6px;
    display: block;
}

.monarch-swatch-img.no-image {
    background: #eee;
}

/* ----------------------------------------
   LABEL
---------------------------------------- */

.monarch-swatch-label {
    font-size: 13px;
    font-weight: 600;
    color: #000;
    margin: 0;
    line-height: 1.15;

    text-align: center;
}

/* ----------------------------------------
   INLINE SWATCH
---------------------------------------- */

.monarch-swatch.inline {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;

    width: auto;
    max-width: 240px;

    padding: 10px 6px;
    gap: 10px;

    white-space: normal;
    text-align: left;
}

/* INLINE IMAGE */
.monarch-swatch.inline .monarch-swatch-img {
    width: 45px;
    height: 45px;
    margin: 0;
    flex-shrink: 0;
}

/* INLINE LABEL */
.monarch-swatch.inline .monarch-swatch-label {
    font-size: 13px;
    line-height: 1.15;

    display: block;
    overflow: visible;

    text-align: left;
}

/* ----------------------------------------
   DISABLED
---------------------------------------- */

.monarch-swatch.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ----------------------------------------
   FOCUS / ACTIVE
---------------------------------------- */

.monarch-swatch:focus,
.monarch-swatch:active {
    outline: none;
    border-color: #7A8EA1;
}