/*
 * Новый пикер смайлов — стили
 */

#smiles_new {
  display: none;
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  width: 420px;
  max-height: 400px;
  overflow: hidden;
}

/* Левая панель — разделы */
.smiles_dirs_wrapper {
  width: 140px;
  min-width: 140px;
  border-right: 1px solid #eee;
  background: #f8f9fa;
  max-height: 400px;
  overflow-y: auto;
  flex-shrink: 0;
}

.smiles_dirs_title {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: bold;
  color: #666;
  text-align: center;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.smiles_dirs_list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.smiles_dirs_list a {
  display: block;
  padding: 8px 10px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smiles_dirs_list a:hover {
  background: #e8f4fd;
  color: #007bff;
}

.smiles_dirs_list a.smiles_dir_active {
  background: #007bff;
  color: #fff;
}

.smiles_dirs_list a.smiles_dir_active:hover {
  background: #0056b3;
  color: #fff;
}

/* Правая панель — смайлы */
.smiles_content_wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Заголовок с кнопками */
.smiles_new_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.smiles_new_header_buttons {
  display: flex;
  gap: 4px;
}

.smiles_new_header_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  color: #666;
  font-size: 14px;
  transition: background 0.2s;
}

.smiles_new_header_btn:hover {
  background: #e0e0e0;
  color: #333;
}

/* Информация о разделе */
.smiles_info_new {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: bold;
  color: #333;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}

/* Список смайлов */
.smiles_list_new {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px;
  overflow-y: auto;
  max-height: 320px;
  background: #fff;
}

.smiles_list_new span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
}

.smiles_list_new span:hover {
  background: #e8f4fd;
  transform: scale(1.15);
}

.smiles_list_new span:active {
  transform: scale(0.95);
}

.smiles_list_new img {
  max-width: 28px;
  max-height: 28px;
  pointer-events: none;
}

/* Скроллбар для разделов */
.smiles_dirs_wrapper::-webkit-scrollbar {
  width: 6px;
}

.smiles_dirs_wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.smiles_dirs_wrapper::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.smiles_dirs_wrapper::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Скроллбар для смайлов */
.smiles_list_new::-webkit-scrollbar {
  width: 6px;
}

.smiles_list_new::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.smiles_list_new::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.smiles_list_new::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Адаптив для мобильных */
@media (max-width: 500px) {
  #smiles_new {
    width: 95vw;
    max-height: 70vh;
  }
  
  .smiles_dirs_wrapper {
    width: 110px;
    min-width: 110px;
  }
  
  .smiles_list_new span {
    width: 36px;
    height: 36px;
  }
  
  .smiles_list_new img {
    max-width: 24px;
    max-height: 24px;
  }
}
