/* ==========================================================================
   PSDreviews — Box Shadow Generator
   ========================================================================== */

.bs-wrap {
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 32px rgba(13, 14, 20, 0.08), 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
}

/* ── Presets strip ───────────────────────────────────────────────────────── */

.bs-presets-strip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    background: #f8f8fb;
    border-bottom: 2px solid #e0e4ed;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bs-presets-strip::-webkit-scrollbar { display: none; }

.bs-presets-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 0.25rem;
}

.bs-preset-btn {
    padding: 0.32rem 0.82rem;
    background: #fff;
    border: 1.5px solid #d0d5e8;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    line-height: 1.4;
}

.bs-preset-btn:hover     { background: #fff2f3; border-color: #c8001c; color: #c8001c; }
.bs-preset-btn--active   { background: #0d0e14; border-color: #0d0e14; color: #fff; }

/* ── Main two-column layout ──────────────────────────────────────────────── */

.bs-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 380px;
}

/* ── Controls panel (left) ───────────────────────────────────────────────── */

.bs-controls-panel {
    padding: 1.5rem;
    border-right: 1.5px solid #eef0fb;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
}

.bs-layers-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* ── Layer card ──────────────────────────────────────────────────────────── */

.bs-layer {
    background: #f8f8fb;
    border: 1.5px solid #e0e4ed;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.bs-layer:hover { border-color: #c8d4e0; }

.bs-layer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    background: #fff;
    border-bottom: 1.5px solid #eef0fb;
    gap: 0.5rem;
}

.bs-layer-num {
    font-size: 0.76rem;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.bs-layer-header-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1;
    justify-content: flex-end;
}

.bs-inset-label {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.bs-inset-check {
    width: 14px;
    height: 14px;
    accent-color: #c8001c;
    cursor: pointer;
    flex-shrink: 0;
}

.bs-layer-color-swatch {
    -webkit-appearance: none;
    width: 100%;
    height: 32px;
    border: 2px solid #d0d5e8;
    border-radius: 7px;
    cursor: pointer;
    padding: 2px;
    background: #fff;
    flex-shrink: 0;
    transition: border-color 0.2s;
    display: block;
}

.bs-layer-color-swatch:hover                        { border-color: #0d0e14; }
.bs-layer-color-swatch::-webkit-color-swatch-wrapper { padding: 0; }
.bs-layer-color-swatch::-webkit-color-swatch         { border: none; border-radius: 4px; }
.bs-layer-color-swatch::-moz-color-swatch            { border: none; border-radius: 4px; }

.bs-remove-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1.5px solid #d0d5e8;
    border-radius: 6px;
    font-size: 0.72rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.18s, border-color 0.18s, background 0.18s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.bs-remove-btn:hover { color: #ef4444; border-color: #ef4444; background: #fee2e2; }

/* ── Sliders ─────────────────────────────────────────────────────────────── */

.bs-sliders {
    padding: 0.7rem 0.85rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.bs-slider-row {
    display: grid;
    grid-template-columns: 72px 1fr 46px;
    align-items: center;
    gap: 0.5rem;
}

.bs-slider-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.bs-slider-val {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1a1a2e;
    text-align: right;
    font-family: "Fira Code", "Courier New", monospace;
    white-space: nowrap;
}

/* ── Add layer button ────────────────────────────────────────────────────── */

.bs-add-layer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.6rem 1rem;
    background: #fff;
    color: #006ab8;
    border: 1.5px dashed #b8d9f4;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    margin-top: 0.1rem;
}

.bs-add-layer-btn:hover   { background: #eff7ff; border-color: #006ab8; }
.bs-add-layer-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-style: dashed;
}

/* ── Preview panel (right) ───────────────────────────────────────────────── */

.bs-preview-panel {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ── Background toggle ───────────────────────────────────────────────────── */

.bs-bg-toggle {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.bs-bg-toggle-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 0.25rem;
}

.bs-bg-btn {
    padding: 0.28rem 0.75rem;
    font-size: 0.76rem;
    font-weight: 700;
    background: #fff;
    border: 1.5px solid #d0d5e8;
    border-radius: 20px;
    cursor: pointer;
    color: #666;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.bs-bg-btn:hover    { border-color: #0d0e14; color: #0d0e14; }
.bs-bg-btn--active  { background: #0d0e14; border-color: #0d0e14; color: #fff; }

/* ── Canvas (preview area) ───────────────────────────────────────────────── */

.bs-canvas {
    flex: 1;
    min-height: 190px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    position: relative;
}

.bs-canvas--light {
    background: #fdfdfd;
}

.bs-canvas--dark {
    background: #1a1a2e;
}

.bs-canvas--grid {
    background-color: #fdfdfd;
    background-image:
        linear-gradient(rgba(0,0,0,0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.07) 1px, transparent 1px);
    background-size: 20px 20px;
}

.bs-preview-box {
    width: 150px;
    height: 105px;
    background: #ffffff;
    border-radius: 12px;
    transition: box-shadow 0.22s ease, border-radius 0.18s, background 0.18s;
    will-change: box-shadow;
}

/* ── Preview box options ─────────────────────────────────────────────────── */

.bs-preview-opts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: end;
}

.bs-opt-field {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.bs-opt-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bs-radius-badge {
    font-family: "Fira Code", "Courier New", monospace;
    font-weight: 700;
    color: #1a1a2e;
    font-size: 0.75rem;
    text-transform: none;
    letter-spacing: 0;
}

.bs-color-row {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.bs-box-color-picker {
    -webkit-appearance: none;
    width: 100%;
    flex: 1;
    height: 36px;
    border: 2px solid #d0d5e8;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: #fff;
    min-width: 60px;
    transition: border-color 0.2s;
}

.bs-box-color-picker:hover                          { border-color: #0d0e14; }
.bs-box-color-picker::-webkit-color-swatch-wrapper  { padding: 0; }
.bs-box-color-picker::-webkit-color-swatch          { border: none; border-radius: 5px; }
.bs-box-color-picker::-moz-color-swatch             { border: none; border-radius: 5px; }

.bs-box-color-hex {
    font-family: "Fira Code", "Courier New", monospace;
    font-size: 0.88rem;
    min-width: 0;
}

/* ── CSS output section ──────────────────────────────────────────────────── */

.bs-output {
    padding: 1.5rem;
    border-top: 1.5px solid #eef0fb;
    background: #fff;
    border-radius: 0 0 18px 18px;
}

.bs-output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.bs-output-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.bs-css-output {
    display: block;
    word-break: break-all;
    white-space: pre-wrap;
    background: #111827;
    color: #f3f4f6;
    border-radius: 12px;
    padding: 1.1rem 1.35rem;
    min-height: 54px;
    font-family: "Fira Code", "Courier New", monospace;
    font-size: 0.88rem;
    line-height: 1.65;
}

.bs-copy-row {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
    justify-content: center;
}

/* Copy buttons — dark navy style to match screenshot */
.bs-output .psdt-copy-btn {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
    font-weight: 600;
}
.bs-output .psdt-copy-btn:hover {
    background: #c8001c;
    border-color: #c8001c;
    color: #fff;
}

/* ── Shadow colour swatch label wrapper ──────────────────────────────────── */

.bs-color-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    cursor: pointer;
    min-width: 110px;
    max-width: 160px;
    flex: 1;
}

.bs-color-lbl {
    font-size: 0.6rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
    text-align: center;
}

/* ── Empty state (no layers) ─────────────────────────────────────────────── */

.bs-empty-state {
    text-align: center;
    padding: 1.5rem 0.75rem;
    color: #bbb;
    font-size: 0.85rem;
    line-height: 1.5;
}

.bs-empty-state strong { color: #c8001c; }

/* ── Responsive — Tablet ─────────────────────────────────────────────────── */

@media (max-width: 760px) {
    .bs-main {
        grid-template-columns: 1fr;
    }

    .bs-controls-panel {
        border-right: none;
        border-bottom: 1.5px solid #eef0fb;
        padding: 1.25rem;
    }

    .bs-preview-panel {
        padding: 1.25rem;
    }

    .bs-output {
        padding: 1.25rem;
    }

    .bs-canvas { min-height: 170px; }
}

/* ── Responsive — Small phone ────────────────────────────────────────────── */

@media (max-width: 480px) {
    .bs-presets-strip {
        padding: 0.7rem 1rem;
        gap: 0.45rem;
    }

    .bs-preset-btn {
        font-size: 0.73rem;
        padding: 0.26rem 0.65rem;
    }

    .bs-slider-row {
        grid-template-columns: 65px 1fr 42px;
    }

    .bs-slider-label { font-size: 0.72rem; }
    .bs-slider-val   { font-size: 0.72rem; }

    .bs-preview-opts {
        grid-template-columns: 1fr;
    }

    .bs-canvas         { min-height: 150px; }
    .bs-preview-box    { width: 120px; height: 90px; }

    .bs-copy-row                { flex-direction: column; align-items: center; }
    .bs-copy-row .psdt-copy-btn { width: 100%; justify-content: center; }
}

/* ── Responsive — Very small phone ──────────────────────────────────────── */

@media (max-width: 380px) {
    .bs-slider-row {
        grid-template-columns: 58px 1fr 40px;
    }

    .bs-layer-header { flex-wrap: wrap; gap: 0.4rem; }
}
