/**
 * ZAX Stickers Stylesheet
 * Sticker picker and inline sticker display styles
 *
 * @package ZAX_Comments
 * @version 1.0.0
 */

/* Sticker picker */
.zax-sticker-picker {
    position: absolute;
    top: 0;
    left: 0;
    margin-top: 12px;
    background: rgba(12, 16, 34, 0.92);
    border: 1px solid rgba(124, 144, 255, 0.25);
    border-radius: 16px;
    padding: 18px;
    width: clamp(260px, 40vw, 420px);
    max-height: 420px;
    overflow-y: auto;
    z-index: 2000;
    box-shadow: 0 28px 60px rgba(8, 12, 32, 0.65);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: none;
}

.zax-sticker-picker__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.zax-sticker-picker__controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.zax-sticker-search {
    width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
    font-size: 13px;
}

.zax-sticker-search:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.zax-sticker-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zax-sticker-category {
    border: none;
    background: rgba(148, 163, 184, 0.15);
    color: #dce3ff;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.zax-sticker-category.is-active {
    background: linear-gradient(135deg, rgba(124, 144, 255, 0.85), rgba(93, 224, 230, 0.85));
    color: #0f172a;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.zax-sticker-category.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.zax-sticker-picker__category {
    margin-bottom: 12px;
}

.zax-sticker-picker__category-title {
    font-size: 11px;
    font-weight: 700;
    color: #94befe;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 0.18em;
    position: relative;
}

.zax-sticker-picker__category-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 42px;
    height: 2px;
    background: linear-gradient(90deg, rgba(124, 144, 255, 0.8), rgba(93, 224, 230, 0));
}

.zax-sticker-picker__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 12px;
}

.zax-sticker-picker__item {
    background: rgba(15, 20, 44, 0.9);
    border: 1px solid rgba(124, 144, 255, 0.26);
    border-radius: 14px;
    padding: 6px;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    overflow: visible;
    position: relative;
}

.zax-sticker-picker__item:hover {
    border-color: rgba(124, 144, 255, 0.6);
    transform: translateY(-2px) scale(1.05);
}

.zax-sticker-picker__item.is-favorite {
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.7);
}

.zax-sticker-picker__item.is-locked {
    cursor: not-allowed;
    border-color: rgba(124, 144, 255, 0.18);
    background: rgba(15, 20, 44, 0.65);
}

.zax-sticker-picker__item.is-locked img {
    opacity: 0.35;
    filter: grayscale(1);
}

.zax-sticker-picker__item.is-locked:hover {
    transform: none;
}

.zax-sticker-picker__lock {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 16px;
    color: rgba(223, 231, 255, 0.72);
}

.zax-sticker-picker__lock-label {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: rgba(214, 222, 255, 0.85);
    background: rgba(11, 16, 34, 0.9);
    padding: 2px 10px;
    border-radius: 999px;
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.zax-sticker-picker__item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(74, 158, 255, 0.35));
}

.zax-sticker-picker__favorite {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 14px;
    color: rgba(250, 204, 21, 0.75);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.zax-sticker-picker__item.is-favorite .zax-sticker-picker__favorite {
    color: rgba(250, 204, 21, 1);
}

.zax-sticker-picker__loading,
.zax-sticker-picker__empty,
.zax-sticker-picker__error {
    padding: 20px;
    text-align: center;
    color: #97a4cc;
    font-size: 14px;
}

.zax-sticker-picker__error {
    color: #ff8e8e;
}

/* Inline sticker display */
.zax-sticker {
    display: inline-block;
    vertical-align: middle;
    max-width: 54px;
    max-height: 54px;
    margin: 0 4px;
    cursor: pointer;
    transition: transform 0.22s ease, filter 0.22s ease;
    filter: drop-shadow(0 14px 30px rgba(74, 158, 255, 0.35));
}

.zax-sticker:hover {
    transform: translateY(-3px) scale(1.15);
    filter: drop-shadow(0 20px 38px rgba(74, 158, 255, 0.45));
}

/* Tooltip for stickers */
.zax-sticker[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: rgba(11, 15, 32, 0.95);
    color: #dfe7ff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10000;
    margin-top: 8px;
    margin-left: -8px;
    border: 1px solid rgba(124, 144, 255, 0.25);
    box-shadow: 0 12px 28px rgba(8, 12, 32, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .zax-sticker-picker {
        max-width: 100%;
        max-height: 300px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .zax-sticker-picker__grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

@media (max-width: 480px) {
    .zax-sticker-picker__grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .zax-sticker-picker__item,
    .zax-sticker {
        transition: none;
    }
    
    .zax-sticker-picker__item:hover {
        transform: none;
    }
    
    .zax-sticker:hover {
        transform: none;
    }
}

