/* ============================================================
   PHANTOM MSG — KLIPY Stickers & GIFs Picker
   Estilos para el picker unificado: Emojis | Stickers | GIFs
   ============================================================ */

/* Top tabs del picker unificado */
.picker-top-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    background: var(--bg-card);
}
.picker-top-tab {
    flex: 1;
    padding: 10px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dim);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-family: var(--font-display);
    gap: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.picker-top-tab:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}
.picker-top-tab.active {
    color: var(--primary-400);
    border-bottom-color: var(--primary-400);
}
.picker-top-tab svg {
    width: 16px;
    height: 16px;
}

/* Secciones del picker */
.picker-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Subtabs dentro de la seccion Stickers */
.sticker-subtabs {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}
.sticker-subtab {
    flex: 1;
    padding: 8px 6px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    border-bottom: 2px solid transparent;
    text-align: center;
}
.sticker-subtab:hover {
    color: var(--text-primary);
}
.sticker-subtab.active {
    color: var(--primary-400);
    border-bottom-color: var(--primary-400);
}

/* Subsecciones dentro del tab stickers */
.sticker-subsection {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Header de Mis Stickers: contador + boton subir */
.my-stickers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-light);
}
.my-stickers-count {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 500;
}
.my-stickers-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--primary-100);
    color: var(--primary-400);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.my-stickers-upload-btn:hover {
    background: var(--primary-200);
    transform: scale(1.05);
}
.my-stickers-upload-btn:active {
    transform: scale(0.95);
}

/* Boton eliminar en celdas de Mis Stickers */
.my-sticker-cell {
    position: relative;
}
.my-sticker-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(220, 50, 50, 0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
    z-index: 2;
    pointer-events: auto;
}
.my-sticker-cell:hover .my-sticker-delete {
    opacity: 1;
}
.my-sticker-delete:hover {
    transform: scale(1.2);
    background: rgba(220, 50, 50, 1);
}

/* Boton "+" para guardar GIF como sticker */
.gif-save-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s, background 0.15s;
    z-index: 2;
    pointer-events: auto;
}
.klipy-gif-cell-masonry:hover .gif-save-btn {
    opacity: 1;
}
.gif-save-btn:hover {
    background: var(--primary-400);
    transform: scale(1.15);
}
.gif-save-btn.gif-saved {
    opacity: 1;
    background: rgba(40, 167, 69, 0.85);
    pointer-events: none;
}
.gif-edit-btn {
    position: absolute;
    bottom: 4px;
    right: 32px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 13px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s, background 0.15s;
    z-index: 2;
    pointer-events: auto;
}
.klipy-gif-cell-masonry:hover .gif-edit-btn {
    opacity: 1;
}
.gif-edit-btn:hover {
    background: var(--accent, #f59e0b);
    transform: scale(1.15);
}

/* Grid de stickers (4 columnas) */
.klipy-sticker-grid {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    align-content: start;
}
.klipy-sticker-grid::-webkit-scrollbar { width: 4px; }
.klipy-sticker-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.klipy-sticker-cell {
    border-radius: 8px;
    background: var(--hover-bg);
    border: none;
    cursor: pointer;
    padding: 6px;
    transition: transform 0.15s ease, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
}
.klipy-sticker-cell:hover {
    transform: scale(1.08);
    background: var(--primary-100);
}
.klipy-sticker-cell:active {
    transform: scale(0.95);
}
.klipy-sticker-cell img {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    object-fit: contain;
    pointer-events: none;
}

/* ============================================================
   GIF GRID — Masonry layout (Pinterest-style)
   ============================================================ */
.klipy-gif-grid {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    column-count: 2;
    column-gap: 8px;
}
.klipy-gif-grid::-webkit-scrollbar { width: 4px; }
.klipy-gif-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.klipy-gif-cell-masonry {
    break-inside: avoid;
    border-radius: 8px;
    background: var(--hover-bg);
    border: none;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    margin-bottom: 8px;
    display: inline-block;
    width: 100%;
    transition: transform 0.12s ease;
    position: relative;
}
.klipy-gif-cell-masonry:hover {
    transform: scale(1.03);
}
.klipy-gif-cell-masonry:active {
    transform: scale(0.97);
}

/* Inner wrapper keeps aspect ratio for masonry */
.klipy-gif-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
}
.klipy-gif-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    border-radius: 8px;
}

/* ============================================================
   BLUR-UP PLACEHOLDERS + LAZY LOAD
   ============================================================ */

/* Blur-up: cell shows tiny blurred preview as background */
.klipy-blur {
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.klipy-blur::after {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}
.klipy-blur.klipy-loaded::after {
    opacity: 0;
}

/* Lazy image: hidden until loaded */
.klipy-lazy-img {
    opacity: 0;
    transition: opacity 0.35s ease;
}
.klipy-lazy-img.klipy-img-loaded {
    opacity: 1;
}

/* ============================================================
   INFINITE SCROLL: sentinel + loading spinner
   ============================================================ */
.klipy-sentinel {
    height: 1px;
    width: 100%;
    flex-shrink: 0;
}
.klipy-loading-more {
    display: flex;
    justify-content: center;
    padding: 12px 0;
    grid-column: 1 / -1;
    break-inside: avoid;
}
.klipy-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-400);
    border-radius: 50%;
    animation: klipySpin 0.7s linear infinite;
}
@keyframes klipySpin {
    to { transform: rotate(360deg); }
}

/* Label KLIPY powered */
.klipy-powered {
    font-size: 9px;
    color: var(--text-dim);
    text-align: center;
    padding: 4px 8px;
    opacity: 0.6;
    flex-shrink: 0;
}

/* Empty state */
.klipy-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    padding: 32px 16px;
}

/* Loading skeleton */
.klipy-skeleton {
    background: linear-gradient(90deg, var(--hover-bg) 25%, var(--border-light) 50%, var(--hover-bg) 75%);
    background-size: 200% 100%;
    animation: klipyShimmer 1.2s ease-in-out infinite;
    border-radius: 8px;
    width: 100%;
    height: 0;
    padding-bottom: 100%;
}
/* Masonry skeletons have explicit height instead of padding */
.klipy-gif-cell-masonry.klipy-skeleton {
    height: auto;
    padding-bottom: 0;
    min-height: 80px;
}
@keyframes klipyShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Label trending */
.klipy-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--primary-400);
    padding: 4px 12px 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* Categoria chips para stickers */
.klipy-categories {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    overflow-x: auto;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-light);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.klipy-categories::-webkit-scrollbar { display: none; }

.klipy-cat-btn {
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: var(--font-display);
}
.klipy-cat-btn:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}
.klipy-cat-btn.active {
    background: var(--primary-100);
    color: var(--primary-400);
    border-color: var(--primary-300);
}

/* ============================================================
   RENDERIZADO DE STICKERS Y GIFS EN EL CHAT
   ============================================================ */

/* Sticker en burbuja de mensaje */
.msg-sticker {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    max-width: 180px;
    min-height: 120px;
}
.msg-sticker img {
    max-width: 170px;
    max-height: 170px;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}
/* Sticker propio: alinear a la derecha */
.msg-mine .msg-sticker {
    margin-left: auto;
}

/* GIF en burbuja de mensaje */
.msg-gif {
    overflow: hidden;
    border-radius: 8px;
    max-width: 280px;
    min-width: 140px;
    min-height: 120px;
    line-height: 0;
}
.msg-gif img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    display: block;
}
.msg-gif-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* Burbuja sin fondo para stickers (como WhatsApp) */
.msg-sticker-wrap {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 4px 0 !important;
    margin-bottom: 14px;
    min-width: auto !important;
    white-space: normal !important;
    position: relative;
    padding-bottom: 22px !important;
}
.msg-sticker-wrap .msg-content {
    padding: 0;
}
.msg-sticker-wrap .msg-meta {
    background: rgba(0, 0, 0, 0.45);
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
    display: inline-block;
    font-size: 10px;
    position: absolute;
    bottom: 0;
    right: 0;
}
.msg-sticker-wrap.msg-mine .msg-meta {
    text-align: right;
}

/* GIF bubble: reduce padding para que la imagen llene mas */
.msg:has(.msg-gif) {
    padding: 4px !important;
    overflow: hidden;
}
.msg:has(.msg-gif) .msg-content {
    padding: 0;
}
/* Fallback para navegadores sin :has() */
.msg-gif-wrap {
    padding: 4px !important;
    overflow: hidden;
    white-space: normal !important;
    margin-bottom: 6px;
}
.msg-gif-wrap .msg-content {
    padding: 0;
}
.msg-gif-wrap .msg-meta {
    padding: 4px 8px 2px;
}

/* ============================================================
   SKELETON LOADING — Placeholders while media loads
   ============================================================ */

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.msg-skeleton {
    border-radius: 8px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--overlay-medium) 50%, var(--bg-tertiary) 75%);
    background-size: 400px 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

.msg-skeleton-sticker {
    width: 150px;
    height: 150px;
    border-radius: 8px;
}

.msg-skeleton-gif {
    width: 240px;
    height: 160px;
    border-radius: 8px;
}

.msg-skeleton-image {
    width: 100%;
    min-height: 160px;
    border-radius: 10px;
}

/* ============================================================
   RESPONSIVE / MOBILE
   ============================================================ */

@media (max-width: 768px) {
    .picker-top-tab {
        padding: 8px 4px;
        font-size: 11px;
    }
    .sticker-subtab {
        padding: 6px 4px;
        font-size: 11px;
    }
    .my-stickers-header {
        padding: 6px 8px;
    }
    .klipy-sticker-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        padding: 6px;
    }
    .klipy-gif-grid {
        column-gap: 4px;
        padding: 6px;
    }
    .klipy-gif-cell-masonry {
        margin-bottom: 4px;
    }
    .my-sticker-delete {
        opacity: 0.8;
    }
    .gif-save-btn {
        opacity: 0.7;
    }
    .gif-edit-btn {
        opacity: 0.7;
    }
    .msg-sticker img {
        max-width: 130px;
        max-height: 130px;
    }
    .msg-gif {
        max-width: 200px;
    }
    .msg-gif img {
        max-height: 180px;
    }
}

/* ============================================================
   STICKER EDITOR — Fullscreen overlay
   ============================================================ */

.sticker-editor-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-base, #0d1117);
    display: flex;
    flex-direction: column;
}

.sticker-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.sticker-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sticker-editor-cancel {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
}
.sticker-editor-cancel:hover { color: var(--text-primary); }
.sticker-editor-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.sticker-editor-save {
    background: var(--primary-400);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.sticker-editor-save:hover { opacity: 0.9; }
.sticker-editor-save:disabled { opacity: 0.5; cursor: not-allowed; }

.sticker-editor-canvas-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    min-height: 280px;
    overflow: hidden;
}

.sticker-editor-canvas-wrap {
    position: relative;
    width: 256px;
    height: 256px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px dashed var(--border);
}
.sticker-editor-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

/* Crop overlay */
.sticker-crop-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    pointer-events: none;
}
.sticker-crop-box {
    position: absolute;
    border: 2px solid var(--primary-400);
    background: transparent;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.4);
    pointer-events: auto;
    cursor: move;
    left: 10%;
    top: 10%;
    width: 80%;
    height: 80%;
}
.crop-handle {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 2px solid var(--primary-400);
    border-radius: 3px;
    pointer-events: auto;
}
.crop-handle-tl { top: -7px; left: -7px; cursor: nw-resize; }
.crop-handle-tr { top: -7px; right: -7px; cursor: ne-resize; }
.crop-handle-bl { bottom: -7px; left: -7px; cursor: sw-resize; }
.crop-handle-br { bottom: -7px; right: -7px; cursor: se-resize; }

/* Tool panels */
.sticker-editor-panel {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}
.sticker-editor-hint {
    font-size: 12px;
    color: var(--text-dim);
    margin: 0 0 10px;
}

/* Frame strip */
.sticker-frame-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 6px 8px;
    display: none;
}
.sticker-frame-bar.visible {
    display: block;
}
.sticker-frame-strip {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.sticker-frame-strip::-webkit-scrollbar { height: 4px; }
.sticker-frame-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sticker-frame-thumb {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 4px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: border-color 0.15s;
    background: var(--bg-elevated);
}
.sticker-frame-thumb:hover { border-color: var(--text-secondary); }
.sticker-frame-thumb.active { border-color: var(--primary-400); box-shadow: 0 0 0 1px var(--primary-400); }

.sticker-frame-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.sticker-frame-counter {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: center;
}

/* Editor buttons */
.sticker-editor-btn {
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.sticker-editor-btn:hover { background: var(--hover-bg); }
.sticker-editor-btn.active {
    background: var(--primary-100);
    color: var(--primary-400);
    border-color: var(--primary-300);
}

/* Controls rows */
.sticker-crop-controls,
.sticker-bg-controls,
.sticker-scale-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.sticker-editor-label {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 55px;
}
.sticker-editor-val {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 36px;
    text-align: right;
}
.sticker-bg-controls input[type="range"],
.sticker-scale-controls input[type="range"] {
    flex: 1;
    min-width: 100px;
}

/* Color pick indicator for background removal */
.sticker-bg-color-pick {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--text-primary);
    vertical-align: middle;
    margin-left: 6px;
}

/* Background tool sub-mode tabs */
.sticker-bg-modes {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}
.sticker-bg-mode {
    flex: 1;
    padding: 6px 4px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sticker-bg-mode:hover { background: var(--hover-bg); }
.sticker-bg-mode.active {
    background: var(--primary-100);
    color: var(--primary-400);
    border-color: var(--primary-300);
}

/* Color palette swatches */
.sticker-color-palette {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.sticker-color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.12s, border-color 0.12s;
}
.sticker-color-swatch:hover {
    transform: scale(1.15);
}
.sticker-color-swatch.active {
    border-color: var(--text-primary);
    transform: scale(1.15);
}

/* Shapes toolbar */
.sticker-shapes-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.sticker-shape-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s, background 0.15s;
    color: var(--text-secondary);
}
.sticker-shape-btn svg {
    width: 18px;
    height: 18px;
}
.sticker-shape-btn:hover {
    background: var(--hover-bg);
}
.sticker-shape-btn.active {
    border-color: var(--primary-400);
    background: var(--primary-100);
    color: var(--primary-400);
}

/* Text tool input */
.sticker-text-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input, var(--bg-elevated));
    color: var(--text-primary);
    font-size: 13px;
}
.sticker-text-input:focus {
    outline: none;
    border-color: var(--primary-400);
}

/* Font select dropdown */
.sticker-font-select {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 12px;
    min-width: 90px;
}

/* Color palette swatches */
.sticker-color-palette {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.sticker-color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.1s, border-color 0.15s;
}
.sticker-color-swatch:hover {
    transform: scale(1.15);
}
.sticker-color-swatch.active {
    border-color: var(--text-primary);
    transform: scale(1.15);
}

/* Shapes bar */
.sticker-shapes-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.sticker-shape-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.15s;
    padding: 0;
}
.sticker-shape-btn svg {
    width: 20px;
    height: 20px;
}
.sticker-shape-btn:hover {
    background: var(--hover-bg);
}
.sticker-shape-btn.active {
    border-color: var(--primary-400);
    color: var(--primary-400);
    background: var(--primary-100);
}

/* Text tool input */
.sticker-text-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-input, var(--bg-elevated));
    color: var(--text-primary);
    font-size: 13px;
}
.sticker-text-input:focus {
    outline: none;
    border-color: var(--primary-400);
}

/* Font select */
.sticker-font-select {
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 12px;
    min-width: 90px;
}

/* Editor tabs: scrollable on small screens */
.sticker-editor-tabs {
    display: flex;
    gap: 3px;
    padding: 6px 8px;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sticker-editor-tabs::-webkit-scrollbar { display: none; }

.sticker-editor-tab {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.sticker-editor-tab:hover { background: var(--hover-bg); }
.sticker-editor-tab.active {
    background: var(--primary-400);
    color: #fff;
}
