/* ==========================================================================
   EIC Sidebar Theme Customizer Widget Stylesheet
   ========================================================================== */

/* Toggle Button in Header or Floating */
.sidebar-theme-trigger-btn {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: #2563eb;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  margin-right: 12px;
}

.sidebar-theme-trigger-btn:hover {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

/* Safe Top Header Polishing (No float/layout breaking) */
.header {
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.header .search-link h5 {
  color: #1e293b !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
}

.header .search-link h5 .bold {
  color: #2563eb !important;
  font-weight: 700 !important;
}

.header .font-heading {
  color: #1e293b !important;
  font-weight: 600 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

.header .profile-dropdown {
  border-radius: 10px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
  padding: 6px !important;
}

.header .profile-dropdown > li > a,
.profile-dropdown > li > a {
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.header .profile-dropdown > li > a > i,
.profile-dropdown > li > a > i {
  font-size: 15px !important;
  width: 20px !important;
  text-align: center !important;
  display: inline-block !important;
}

/* Floating Trigger Button */
.sidebar-theme-floating-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-theme-floating-btn:hover {
  transform: scale(1.1) rotate(12deg);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* Modal Overlay & Drawer Panel */
#sidebar-theme-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 99999;
  display: none;
  pointer-events: none;
}

#sidebar-theme-modal.show {
  display: block;
}

.sidebar-theme-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  pointer-events: auto;
}

#sidebar-theme-modal.show .sidebar-theme-panel {
  right: 0;
}

/* Panel Header */
.stp-header {
  padding: 18px 20px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stp-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stp-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.stp-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Panel Body */
.stp-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.stp-section {
  margin-bottom: 24px;
}

.stp-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Presets Grid */
.stp-presets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stp-preset-card {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stp-preset-card:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.stp-preset-card.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.stp-preset-preview {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.stp-preset-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
}

/* Custom Color Controls */
.stp-color-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.stp-color-row label {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.stp-color-picker {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: none;
}

.stp-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.stp-color-picker::-webkit-color-swatch {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Footer Buttons */
.stp-footer {
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 10px;
}

.stp-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-align: center;
}

.stp-btn-reset {
  background: #e2e8f0;
  color: #334155;
}

.stp-btn-reset:hover {
  background: #cbd5e1;
}

.stp-btn-save {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.stp-btn-save:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}
