/**
 * Emoji Finder Styles
 * 이모지 검색기/복사기 전용 스타일
 *
 * @package Zipper
 */

/* ===== 메인 레이아웃 ===== */
.ef-container {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

/* ===== 상단 검색 바 ===== */
.ef-search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}

.ef-search-input-wrapper {
    flex: 1;
    position: relative;
}

.ef-search-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #5f5a56;
    font-size: 16px;
}

.ef-search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    font-size: 15px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ef-search-input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: #fff;
}

.ef-search-input::placeholder {
    color: #a09a94;
}

.ef-skintone-wrapper {
    position: relative;
}

.ef-skintone-select {
    padding: 12px 40px 12px 16px;
    font-size: 14px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #2d2a26;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    min-width: 140px;
}

.ef-skintone-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: #fff;
}

.ef-skintone-wrapper::after {
    content: '\f282';
    font-family: 'bootstrap-icons';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #5f5a56;
    pointer-events: none;
}

/* ===== 카테고리 탭 ===== */
.ef-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: #d4af37 #faf9f7;
}

.ef-categories::-webkit-scrollbar {
    height: 6px;
}

.ef-categories::-webkit-scrollbar-track {
    background: #faf9f7;
    border-radius: 3px;
}

.ef-categories::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 3px;
}

.ef-category-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    background: #faf9f7;
    color: #5f5a56;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.ef-category-tab:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.ef-category-tab.active {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border-color: #d4af37;
    color: #fff;
}

.ef-category-tab i {
    font-size: 16px;
}

.ef-category-tab .ef-emoji {
    font-size: 18px;
    line-height: 1;
}

/* ===== 이모지 그리드 ===== */
.ef-grid-wrapper {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    min-height: 380px;
    max-height: 480px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d4af37 #fff;
}

.ef-grid-wrapper::-webkit-scrollbar {
    width: 8px;
}

.ef-grid-wrapper::-webkit-scrollbar-track {
    background: #fff;
    border-radius: 4px;
}

.ef-grid-wrapper::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

.ef-emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
}

.ef-emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    font-size: 32px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.ef-emoji-item:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    border-color: #d4af37;
    z-index: 10;
}

.ef-emoji-item:active {
    transform: scale(1.05);
}

.ef-emoji-item.favorite::after {
    content: '⭐';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
}

/* 빈 상태 */
.ef-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #a09a94;
    text-align: center;
}

.ef-empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
}

.ef-empty-state p {
    font-size: 15px;
    margin: 0;
}

.ef-hidden {
    display: none !important;
}

/* ===== 하단 정보 바 ===== */
.ef-info-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
}

.ef-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    font-size: 48px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    flex-shrink: 0;
}

.ef-info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ef-info-name {
    font-size: 15px;
    font-weight: 600;
    color: #2d2a26;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ef-info-keywords {
    font-size: 13px;
    color: #5f5a56;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ef-info-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ef-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ef-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.ef-copy-btn:active {
    transform: translateY(0);
}

.ef-copy-btn i {
    font-size: 16px;
}

.ef-favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 18px;
    color: #5f5a56;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ef-favorite-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.ef-favorite-btn.active {
    color: #ffc107;
    border-color: #ffc107;
}

/* 정보 바 초기 상태 (이모지 선택 전) */
.ef-info-bar.ef-initial {
    justify-content: center;
    padding: 20px;
}

.ef-info-bar.ef-initial .ef-info-placeholder {
    font-size: 14px;
    color: #a09a94;
    text-align: center;
}

.ef-info-bar.ef-initial .ef-info-placeholder i {
    display: block;
    font-size: 32px;
    margin-bottom: 8px;
}

/* ===== 반응형 - 태블릿 ===== */
@media (max-width: 768px) {
    .ef-container {
        padding: 16px;
    }

    .ef-search-bar {
        flex-direction: column;
        gap: 10px;
    }

    .ef-skintone-select {
        width: 100%;
    }

    .ef-categories {
        gap: 6px;
    }

    .ef-category-tab {
        padding: 6px 12px;
        font-size: 13px;
    }

    .ef-category-tab .ef-emoji {
        font-size: 16px;
    }

    .ef-emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
        gap: 6px;
    }

    .ef-emoji-item {
        font-size: 28px;
    }

    .ef-grid-wrapper {
        min-height: 320px;
        max-height: 400px;
        padding: 12px;
    }

    .ef-info-bar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .ef-preview {
        width: 56px;
        height: 56px;
        font-size: 42px;
    }

    .ef-info-actions {
        width: 100%;
    }

    .ef-copy-btn {
        flex: 1;
    }
}

/* ===== 반응형 - 모바일 ===== */
@media (max-width: 480px) {
    .ef-emoji-grid {
        grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
        gap: 4px;
    }

    .ef-emoji-item {
        font-size: 24px;
        border-radius: 6px;
    }

    .ef-grid-wrapper {
        min-height: 280px;
        max-height: 360px;
    }

    .ef-category-tab {
        padding: 6px 10px;
        font-size: 12px;
    }

    .ef-category-tab .ef-emoji {
        font-size: 14px;
    }

    .ef-preview {
        width: 48px;
        height: 48px;
        font-size: 36px;
    }

    .ef-info-name {
        font-size: 14px;
    }

    .ef-info-keywords {
        font-size: 12px;
    }

    .ef-copy-btn {
        font-size: 13px;
        padding: 8px 16px;
    }

    .ef-favorite-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}
