/* ==========================================
   COLOR PALETTE EXTRACTOR
========================================== */

.color-palette-page .tool-page-title {
    font-size: 2.25rem;
    font-weight: 700;
}

.color-palette-page .tool-page-description {
    font-size: 1.075rem;
    color: var(--gray-color, #6b7280);
    max-width: 760px;
    margin: 0 auto;
}

/* ---------- Preview ---------- */
.cp-preview {
    background: #f1f3f5;
    background-image:
        linear-gradient(45deg, #e9ecef 25%, transparent 25%),
        linear-gradient(-45deg, #e9ecef 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e9ecef 75%),
        linear-gradient(-45deg, transparent 75%, #e9ecef 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.cp-preview img {
    max-height: 260px;
    max-width: 100%;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* ---------- Swatch grid ---------- */
.cp-swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.cp-swatch {
    position: relative;
    border: none;
    border-radius: 12px;
    min-height: 96px;
    padding: 12px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.cp-swatch:hover {
    transform: translateY(-3px);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 10px 20px rgba(0, 0, 0, 0.18);
}

.cp-swatch-code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.cp-swatch-copy {
    position: absolute;
    top: 10px;
    right: 12px;
    opacity: 0.55;
    font-size: 0.85rem;
    transition: opacity 0.15s ease;
}

.cp-swatch:hover .cp-swatch-copy {
    opacity: 1;
}

/* ---------- Palette strip ---------- */
.cp-strip {
    display: flex;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.cp-strip-seg {
    flex: 1 1 0;
    min-width: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .color-palette-page .tool-page-title {
        font-size: 1.75rem;
    }

    .cp-preview img {
        max-height: 200px;
    }
}

@media (max-width: 575px) {
    .cp-swatch-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
