/**
 * Brand Color Grid Styles
 */

.brand-color-grid {
    display: grid;
    grid-template-columns: repeat(var(--bcg-cols-desktop, 4), minmax(0, 1fr));
    gap: var(--bcg-gap, 20px);
    width: 100%;
    box-sizing: border-box;
}

/* Tablet Portrait Breakpoint (601px - 1024px) */
@media screen and (max-width: 1024px) {
    .brand-color-grid {
        grid-template-columns: repeat(var(--bcg-cols-tablet, 2), minmax(0, 1fr));
    }
}

/* Mobile Portrait Breakpoint (<= 600px) */
@media screen and (max-width: 600px) {
    .brand-color-grid {
        grid-template-columns: repeat(var(--bcg-cols-mobile, 1), minmax(0, 1fr));
    }
}

/* Card Styling */
.brand-color-card {
    background-color: #ffffff;
    border-radius: var(--bcg-radius, 0px);
    border: var(--bcg-border, 1px solid #efefef);
    box-shadow: var(--bcg-shadow, none);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.brand-color-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.20);
}

/* Swatch Area */
.brand-color-swatch {
    height: var(--bcg-swatch-height, 130px);
    width: 100%;
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-color-swatch.is-copyable {
    cursor: pointer;
}

/* Swatch Copy Overlay Hint */
.brand-color-swatch-copy-hint {
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 0px;
    transition: opacity 0.2s ease;
}

.brand-color-swatch.is-copyable:hover .brand-color-swatch-copy-hint {
    opacity: 1;
}

/* Card Content Details */
.brand-color-details {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.brand-color-title {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.3;
    color: #3b3b3b;
}

/* Code Badge */
.brand-color-hex-wrapper {
    margin-bottom: 8px;
}

.brand-color-hex {
    display: inline-block;
    background-color: #efefef;
    color: #3b3b3b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 0px;
    border: 1px solid #e2e2e2;
    user-select: all;
    margin-bottom: 15px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.brand-color-hex.is-copyable {
    cursor: pointer;
}

.brand-color-hex.is-copyable:hover {
    background-color: #e2e2e2;
    color: #3b3b3b;
}

.brand-color-hex.is-copied {
    background-color: #05d17c !important;
    color: #3b3b3b !important;
    border-color: #05d17c !important;
}

/* Usage Guidance Link */
.brand-color-usage-wrapper {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.brand-color-usage-link {
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: #4365e2;
    text-decoration: underline;
    text-underline-offset: 3px;
    line-height: 1.4;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.brand-color-usage-link:hover {
    color: #1f3fbc;
}

/* Usage Rules (legacy) */
.brand-color-usage {
    margin: 4px 0 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
    word-break: break-word;
}

/* Empty State / Notice */
.brand-color-grid-empty {
    padding: 24px;
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 0px;
    color: #64748b;
    font-size: 0.95rem;
    text-align: center;
    margin: 1rem 0;
}

/* Editor Wrapper */
.brand-color-grid-editor-wrapper {
    width: 100%;
}

