/**
 * Colour Stack Block Styles (Frontend & Editor)
 */

.brand-colour-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: var(--bcs-radius, 0px);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.brand-colour-stack-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: var(--bcs-base-height, 54px);
    position: relative;
    box-sizing: border-box;
    transition: transform 0.15s ease, filter 0.15s ease, height 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    user-select: none;
}

.brand-colour-stack-item:last-child {
    border-bottom: none;
}

/* 4th colour is slightly taller than the other 6 */
.brand-colour-stack-item:nth-child(4),
.brand-colour-stack-item--fourth,
.brand-colour-stack-item.is-tall {
    height: var(--bcs-highlight-height, 82px) !important;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.brand-colour-stack-item.is-copyable {
    cursor: pointer;
}

.brand-colour-stack-item.is-copyable:hover {
    filter: brightness(0.97);
}

/* Colour Name */
.brand-colour-stack-name {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 12px;
}

.brand-colour-stack-item:nth-child(4) .brand-colour-stack-name,
.brand-colour-stack-item--fourth .brand-colour-stack-name {
    font-size: 1.05rem;
    font-weight: 700;
}

/* Hex Wrapper */
.brand-colour-stack-hex-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.brand-colour-stack-hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 0px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    letter-spacing: 0.5px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

/* Copy feedback overlay */
.brand-colour-stack-copy-hint {
    opacity: 0;
    pointer-events: none;
    background: #3B3B3B;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 0px;
    transition: opacity 0.2s ease;
}

.brand-colour-stack-item.is-copyable:hover .brand-colour-stack-copy-hint {
    opacity: 1;
}

/* ==========================================================================
   Editor-Specific Styles
   ========================================================================== */

.brand-colour-stack-editor-wrapper {
    margin: 1rem 0;
}

.brand-colour-control-row {
    background: #ffffff;
    border: 1px solid rgba(0,0,0 0.5);
    border-radius: 0px;
    padding: 10px;
    margin-bottom: 10px;
}

.brand-colour-control-row.is-fourth-row {
    border-color: rgba(0,0,0 0.5);
    background: #f8faff;
    box-shadow: 0 0 0 1px rgba(0,0,0 0.5);
}

.brand-colour-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.brand-colour-num-badge {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-colour-control-row.is-fourth-row .brand-colour-num-badge {
    color: #2563eb;
}

.brand-colour-row-actions {
    display: flex;
    gap: 2px;
}

.brand-colour-control-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-colour-swatch-picker-btn {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.brand-colour-swatch-picker-btn:hover {
    transform: scale(1.08);
    border-color: #0f172a;
}

.brand-colour-control-inputs .components-base-control {
    margin-bottom: 0 !important;
}

.brand-colour-hex-input {
    width: 100px;
    flex-shrink: 0;
}

.brand-stack-limit-notice {
    margin-top: 12px;
}

