/* PLUR Factory - Inline Edit System Styles */

/* Editor overlay */
.inline-editor-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.inline-editor-box {
  background: #12121A;
  border: 1px solid #1E1E2E;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 255, 255, 0.1);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slide-up 0.3s ease-out;
}

@keyframes slide-up {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.inline-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #1E1E2E;
}

.inline-editor-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: #F0F0F5;
  margin: 0;
  word-break: break-word;
}

.inline-editor-close {
  background: none;
  border: none;
  color: #8888A0;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  flex-shrink: 0;
  margin-left: 20px;
}

.inline-editor-close:hover {
  color: #FF2D7B;
}

.inline-editor-textarea {
  flex: 1;
  padding: 20px;
  background: #0A0A0F;
  border: none;
  color: #F0F0F5;
  font-family: 'DM Sans', monospace;
  font-size: 1rem;
  line-height: 1.6;
  resize: none;
  outline: none;
}

.inline-editor-textarea:focus {
  outline: 1px solid rgba(0, 255, 255, 0.3);
}

.inline-editor-textarea::placeholder {
  color: #8888A0;
}

.inline-editor-actions {
  display: flex;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #1E1E2E;
  justify-content: flex-end;
}

.inline-editor-cancel,
.inline-editor-save {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inline-editor-cancel {
  background: transparent;
  border: 1px solid #1E1E2E;
  color: #8888A0;
}

.inline-editor-cancel:hover {
  background: rgba(136, 136, 160, 0.1);
  color: #F0F0F5;
}

.inline-editor-save {
  background: linear-gradient(135deg, #FF2D7B, #00F0FF);
  color: #0A0A0F;
}

.inline-editor-save:hover {
  box-shadow: 0 0 20px rgba(255, 45, 123, 0.5);
  transform: translateY(-2px);
}

/* Toast notifications */
.inline-edit-toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 16px 24px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  z-index: 9999;
  white-space: nowrap;
  transition: bottom 0.3s ease-out;
}

.inline-edit-toast-show {
  bottom: 30px;
}

.inline-edit-toast-success {
  background: rgba(57, 255, 20, 0.2);
  border: 1px solid rgba(57, 255, 20, 0.5);
  color: #39FF14;
}

.inline-edit-toast-error {
  background: rgba(255, 45, 123, 0.2);
  border: 1px solid rgba(255, 45, 123, 0.5);
  color: #FF2D7B;
}

.inline-edit-toast-info {
  background: rgba(0, 240, 255, 0.2);
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: #00F0FF;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
  .inline-editor-box {
    width: 95%;
    max-height: 90vh;
    border-radius: 8px;
  }

  .inline-editor-header,
  .inline-editor-actions {
    padding: 16px;
  }

  .inline-editor-header h3 {
    font-size: 1rem;
  }

  .inline-editor-textarea {
    padding: 16px;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  .inline-editor-close {
    width: 28px;
    height: 28px;
    font-size: 1.3rem;
    margin-left: 12px;
  }

  .inline-editor-cancel,
  .inline-editor-save {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .inline-edit-toast {
    width: 90%;
    white-space: normal;
    text-align: center;
  }
}
