.slide-out-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1050;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.slide-out-panel {
  background-color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
  max-width: 90vw;
  position: relative;
}

.slide-out-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  z-index: 10;
}
.slide-out-resize-handle::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 40px;
  border-radius: 2px;
  background-color: #c4c4cd;
  opacity: 0;
  transition: opacity 0.15s;
}
.slide-out-resize-handle:hover::after {
  opacity: 1;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
.slide-out-panel-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0e0e0;
  background-color: #f8f8f8;
  flex-shrink: 0;
}
.slide-out-panel-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #2e2e38;
}
.slide-out-panel-header .close-button {
  min-width: 36px;
  padding: 6px;
  border-radius: 4px;
}

.slide-out-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}
.slide-out-panel-content .form-group {
  margin-bottom: 20px;
}
.slide-out-panel-content .form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
  color: #2e2e38;
}
.slide-out-panel-content .form-group .form-help {
  font-size: 12px;
  color: #747480;
  margin-top: 4px;
}
.slide-out-panel-content .form-group .form-error {
  font-size: 12px;
  color: #c4262e;
  margin-top: 4px;
}
.slide-out-panel-content .form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.slide-out-panel-content .form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}
.slide-out-panel-content .form-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e0e0e0;
}
.slide-out-panel-content .form-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.slide-out-panel-content .form-section .section-title {
  font-size: 14px;
  font-weight: 600;
  color: #747480;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.slide-out-panel-footer {
  padding: 16px 20px;
  border-top: 1px solid #e0e0e0;
  background-color: #f8f8f8;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-shrink: 0;
}

body.motif-theme-dark .slide-out-overlay {
  background-color: rgba(0, 0, 0, 0.6);
}
body.motif-theme-dark .slide-out-panel {
  background-color: #2e2e38;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
}
body.motif-theme-dark .slide-out-resize-handle::after {
  background-color: #4d4d5d;
}
body.motif-theme-dark .slide-out-panel-header {
  background-color: #23232d;
  border-bottom-color: #3d3d47;
}
body.motif-theme-dark .slide-out-panel-header h4 {
  color: #f0f0f0;
}
body.motif-theme-dark .slide-out-panel-content {
  background-color: #2e2e38;
}
body.motif-theme-dark .slide-out-panel-content .form-group label {
  color: #f0f0f0;
}
body.motif-theme-dark .slide-out-panel-content .form-group .form-help {
  color: #a0a0a8;
}
body.motif-theme-dark .slide-out-panel-content .form-section {
  border-bottom-color: #3d3d47;
}
body.motif-theme-dark .slide-out-panel-content .form-section .section-title {
  color: #a0a0a8;
}
body.motif-theme-dark .slide-out-panel-footer {
  background-color: #23232d;
  border-top-color: #3d3d47;
}

@media (max-width: 600px) {
  .slide-out-panel {
    width: 100% !important;
    max-width: 100vw;
  }
}