/* DRAWER OVERLAY */
.global-drawer-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-drawer-overlay);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

/* ACTIVE */
.global-drawer-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* DRAWER */
.global-drawer {
  width: 420px;
  max-width: 100%;
  height: 100vh;
  min-height: 0;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: var(--transition-normal);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* OPEN */
.global-drawer-overlay.active .global-drawer {
  transform: translateX(0);
}

/* HEADER */
.global-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-xl-24);
  border-bottom: 1px solid var(--color-border-light);
  flex-shrink: 0;
}

.global-drawer-title {
  font-size: var(--font-xl-18);
  font-weight: var(--font-bold-700);
  color: var(--color-text);
}

.global-drawer-subtitle {
  margin-top: var(--space-xs-04);
  font-size: var(--font-sm-12);
  color: var(--color-text-secondary);
}

/* SEARCH */
.global-drawer-search {
  padding: var(--space-lg-16) var(--space-xl-24);
  flex-shrink: 0;
}

.global-drawer-search-box {
  height: 52px;
  background: var(--color-surface-secondary);
  border-radius: var(--radius-lg-16);
  display: flex;
  align-items: center;
  gap: var(--space-md-12);
  padding: 0 var(--space-lg-16);
}

.global-drawer-search-box i {
  color: var(--color-text-secondary);
}

.global-drawer-search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--color-text);
  font-size: var(--font-md-14);
}

/* BODY */
.global-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--space-xl-24) var(--space-xl-24);
}

/* ICONS GRID */
.global-drawer-icons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm-08);
  align-content: start;
}

/* ICON ITEM */
.global-drawer-icon-item {
  background: var(--color-surface-secondary);
  border-radius: var(--radius-form);
  padding: var(--space-md-12) var(--space-sm-08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm-08);
  cursor: pointer;
  transition: var(--transition-fast);
  min-height: 88px;
}

.global-drawer-icon-item:hover {
  background: var(--color-primary-light);
  transform: translateY(-2px);
}

.global-drawer-icon-preview {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md-12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-white);
  font-size: var(--font-xl-18);
}

.global-drawer-icon-name {
  text-align: center;
  font-size: var(--font-xs-11);
  line-height: 1.2;
  color: var(--color-text);
  font-weight: var(--font-medium-500);
}

/* COLORS GRID */
.global-drawer-colors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md-12);
  align-content: start;
}

/* COLOR ITEM */
.global-drawer-color-item {
  background: var(--color-surface-secondary);
  border-radius: var(--radius-lg-16);
  padding: var(--space-md-12);
  display: flex;
  align-items: center;
  gap: var(--space-md-12);
  cursor: pointer;
  transition: var(--transition-fast);
}

.global-drawer-color-item:hover {
  background: var(--color-primary-light);
}

.global-drawer-color-preview {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md-12);
  flex-shrink: 0;
}

.global-drawer-color-info {
  flex: 1;
}

.global-drawer-color-name {
  font-size: var(--font-md-14);
  font-weight: var(--font-semibold-600);
  color: var(--color-text);
}

.global-drawer-color-code {
  margin-top: 2px;
  font-size: var(--font-sm-12);
  color: var(--color-text-secondary);
}

/* SELECTOR BUTTON */
.global-drawer-selector-btn {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg-16);
  background: var(--color-surface);
  padding: var(--space-sm-08) var(--space-md-12);
  display: flex;
  align-items: center;
  gap: var(--space-md-12);
  cursor: pointer;
  transition: var(--transition-fast);
}

.global-drawer-selector-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-drawer-hover);
}

.global-drawer-selector-btn span {
  font-size: var(--font-md-14);
  font-weight: var(--font-medium-500);
  color: var(--color-text);
}

/* SELECTOR PREVIEW */
.global-drawer-selector-preview,
.global-drawer-color-selector-preview {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md-12);
  background: var(--color-preview-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ICONS */
.global-drawer-selector-preview i,
.global-drawer-color-selector-preview i {
  font-size: var(--font-xl-18);
  color: var(--color-primary);
  line-height: 1;
}

/* SELECTED */
.global-drawer-selector-preview.selected {
  border: none;
  background: var(--color-primary);
  color: var(--color-text-white);
  box-shadow: var(--shadow-sm);
}

/* PREVIEW ICON */
.global-drawer-preview-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-lg-16);
  background: var(--color-primary);
  color: var(--color-text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.global-drawer-preview-icon i {
  font-size: 24px;
}

/* RIGHT PANEL */
.global-drawer-right {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* MOBILE */
@media (max-width: 768px) {
  .global-drawer,
  .global-drawer-large {
    width: 100%;
    max-width: 100%;
  }

  .global-drawer-icons-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .global-drawer-colors-grid {
    grid-template-columns: 1fr;
  }
}
