/* ============================================================
   Theme Customizer (Modal & FAB)
   ============================================================ */

/* FAB (Floating Action Button) */
.kida-theme-fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ds-point, #fff);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 9999;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kida-theme-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.kida-theme-fab i {
  font-size: 24px;
}

/* Modal Overlay */
.kida-theme-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}

.kida-theme-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Modal Content */
.kida-theme-modal {
  position: fixed;
  bottom: 90px;
  right: var(--space-6);
  width: 320px;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: var(--space-6);
  z-index: 10001;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, visibility 0.3s ease;
  color: #fff;
}

.kida-theme-modal.is-open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.kida-theme-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.kida-theme-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.kida-theme-close {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  padding: var(--space-1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.kida-theme-close:hover {
  color: #fff;
}

.kida-theme-group {
  margin-bottom: var(--space-4);
}

.kida-theme-group label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #ccc;
  margin-bottom: var(--space-2);
}

.kida-theme-checkbox-label {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: var(--space-2);
  font-size: 14px !important;
  color: #fff !important;
  cursor: pointer;
}

.kida-theme-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.kida-theme-input-wrap input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  background: none;
}

.kida-theme-input-wrap input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.kida-theme-input-wrap input[type="color"]::-webkit-color-swatch {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
}

.kida-theme-hex {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
}

input[type="range"] {
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.1);
  height: 4px;
  border-radius: 2px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.kida-theme-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.kida-theme-btn {
  flex: 1;
  padding: var(--space-2);
  border-radius: 8px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.kida-theme-btn-reset {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.kida-theme-btn-reset:hover {
  background: rgba(255,255,255,0.2);
}

.kida-theme-btn-apply {
  background: #fff;
  color: #000;
}

.kida-theme-btn-apply:hover {
  background: #f0f0f0;
}

@media (max-width: 767px) {
  .kida-theme-modal {
    width: calc(100vw - 48px);
  }
}
