/* Clean Talk Editor Modal CSS - No conflicts, no overrides */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

/* Modal Container */
.talk-editor-modal {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Header */
.talk-editor-modal .modal-header {
  background-color: #2c5aa0;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.talk-editor-modal .modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.talk-editor-modal .modal-close {
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
  padding: 0.25rem;
  color: white;
}

.talk-editor-modal .modal-close:hover {
  opacity: 1;
}

/* Modal Body */
.talk-editor-modal .modal-body {
  padding: 1.5rem;
  background-color: #1a252f;
  overflow-y: auto;
  flex: 1;
  margin: 0;
}

/* Form element reset */
.talk-editor-modal form {
  margin: 0;
  padding: 0;
}

/* Form Groups */
.talk-editor-modal .form-group {
  margin-bottom: 1.5rem;
  display: block;
  width: 100%;
}

.talk-editor-modal .form-group:last-child {
  margin-bottom: 0;
}

/* Labels */
.talk-editor-modal label {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: white;
  font-size: 1rem;
}

/* Form Fields */
.talk-editor-modal input,
.talk-editor-modal select,
.talk-editor-modal textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #cccccc;
  border-radius: 4px;
  background-color: white;
  color: black;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  display: block;
  height: 2.8rem;
}

.talk-editor-modal input:focus,
.talk-editor-modal select:focus,
.talk-editor-modal textarea:focus {
  outline: none;
  border-color: #2c5aa0;
  box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.2);
}

.talk-editor-modal textarea {
  resize: vertical;
  min-height: 80px;
  height: auto;
}

/* Categories Checkboxes */
.talk-editor-modal .checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.talk-editor-modal .checkbox-group label {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  font-weight: normal;
  font-size: 0.9rem;
  color: white;
  padding: 0.25rem 0;
}

.talk-editor-modal .checkbox-group input[type="checkbox"] {
  margin: 0 0.25rem 0 0;
  padding: 0;
  width: auto;
  max-width: 20px;
  flex-shrink: 0;
  transform: scale(0.9);
}

/* Help Text */
.talk-editor-modal .char-counter,
.talk-editor-modal .help-text {
  display: block;
  font-size: 0.85rem;
  color: white;
  margin-top: 0.25rem;
  font-style: italic;
}

/* Quill Editor */
.talk-editor-modal .editor-container {
  width: 100%;
  margin-top: 0.5rem;
}

.talk-editor-modal .ql-toolbar {
  border: none;
  border-bottom: 1px solid #cccccc;
  background-color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 4px 4px 0 0;
}

.talk-editor-modal .ql-container {
  border: none;
  border-radius: 0 0 4px 4px;
  background-color: white;
}

.talk-editor-modal .ql-editor {
  min-height: 160px;
  max-height: 300px;
  padding: 0.75rem;
  color: black;
  background-color: white;
  line-height: 1.5;
  font-family: inherit;
  font-size: 1rem;
}

.talk-editor-modal .ql-editor.ql-blank::before {
  color: #999;
  font-style: italic;
  left: 0.75rem;
}

.talk-editor-modal .ql-toolbar button {
  padding: 0.25rem;
  margin: 0 0.125rem;
  border-radius: 3px;
  border: 1px solid #cccccc;
  background-color: white;
  color: black;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.talk-editor-modal .ql-toolbar button:hover {
  background-color: rgba(44, 90, 160, 0.1);
  border-color: #2c5aa0;
}

.talk-editor-modal .ql-toolbar button.ql-active {
  background-color: #2c5aa0;
  color: white;
  border-color: #2c5aa0;
}

/* Modal Footer */
.talk-editor-modal .modal-footer {
  padding: 0.75rem 0.75rem;
  margin: 0;
  background-color: #1a252f;
  border-top: 1px solid rgba(204, 204, 204, 0.2);
  border-radius: 0 0 8px 8px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Buttons */
.talk-editor-modal .btn--cta,
.talk-editor-modal .btn-secondary {
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
  min-width: 120px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

.talk-editor-modal .btn--cta {
  background-color: #2c5aa0;
  color: white;
  border: none;
  font-weight: 600;
  margin: 0;
}

.talk-editor-modal .btn--cta:hover {
  background-color: #1e3f73;
  transform: translateY(-1px);
}

.talk-editor-modal .btn-secondary {
  background-color: #6c757d;
  color: white;
  border: 1px solid #6c757d;
}

.talk-editor-modal .btn-secondary:hover {
  background-color: #5a6268;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  .modal-overlay {
    padding: 1rem;
  }

  .talk-editor-modal {
    width: 95%;
    max-height: 95vh;
  }

  .talk-editor-modal .modal-body {
    padding: 1.5rem;
  }

  .talk-editor-modal .modal-header {
    padding: 1rem;
  }

  .talk-editor-modal .modal-footer {
    padding: 1rem;
    flex-direction: column;
  }

  .talk-editor-modal .checkbox-group {
    grid-template-columns: 1fr;
  }
}