/* 3M-Editor Styles */

.three-m-editor-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.three-m-editor-modal--fullscreen {
  background: rgba(0, 0, 0, 0.8);
}

.three-m-editor-modal .pm-modal__box {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: 1000px;
  max-height: 90vh;
  width: 100%;
  height: auto;
}

.three-m-editor-box--fullscreen {
  max-width: 100% !important;
  max-height: 100vh !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.three-m-editor-modal .pm-modal__header {
  padding: 0px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.three-m-editor-modal .pm-modal__header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.three-m-editor-modal .pm-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.three-m-editor-modal .pm-modal__close:hover {
  color: #333;
}

/* Tabs */
.three-m-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e0e0e0;
  background: #f5f5f5;
}

.three-m-tab {
  flex: 1;
  padding: 8px 14px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.three-m-tab:hover {
  background: #ececec;
  color: #333;
}

.three-m-tab.active {
  background: white;
  color: #007bff;
  border-bottom-color: #007bff;
}

.three-m-tab i {
  font-size: 1.1rem;
}

/* Content */
.three-m-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.three-m-section {
  padding: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.form-row {
  display: flex;
  gap: 20px;
  margin: 0 -10px;
}

.form-row .form-group {
  flex: 1;
  margin: 0 10px 20px;
}

/* Access Rights Section */
.three-m-access-group {
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.three-m-access-group h4 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.three-m-access-group .text-muted {
  margin-bottom: 15px;
  font-size: 14px;
}

.three-m-access-group .alert {
  margin: 0;
}

/* Content Elements */
.three-m-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.three-m-content-header h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.three-m-add-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 25px !important;
}

.three-m-add-buttons .btn {
  font-size: 0.8rem;
  padding: 6px 12px;
}

.three-m-content-elements {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.three-m-content-element {
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.2s;
  background: white;
}

.three-m-content-element:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.three-m-content-element.drag-over {
  border-color: #28a745;
  background: #f0fff4;
}

.three-m-element-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  cursor: move;
}

.three-m-element-type {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #495057;
}

.three-m-element-type i {
  color: #007bff;
}

.three-m-element-controls {
  display: flex;
  gap: 5px;
}

.btn-icon {
  padding: 4px 8px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover:not(:disabled) {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.btn-icon.btn-danger:hover {
  background: #dc3545;
  border-color: #dc3545;
}

.btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.three-m-element-body {
  padding: 15px;
}

/* Resource Items */
.resource-item {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.resource-item .form-control {
  flex: 1;
}

.resource-item .btn {
  flex-shrink: 0;
}

/* File Items */
.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 8px;
}

.file-item i {
  color: #007bff;
  font-size: 1.2rem;
}

.file-item .file-name {
  flex: 1;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item .file-size {
  color: #666;
  font-size: 0.85rem;
}

.file-upload-area label {
  cursor: pointer;
  margin: 0;
}

/* Empty State */
.three-m-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.three-m-empty-state i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #ddd;
}

.three-m-empty-state p {
  margin: 0;
  font-size: 1.1rem;
}

/* Footer */
.pm-modal__footer {
  padding: 5px 5px;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  flex: 1;
}

.footer-right {
  display: flex;
  gap: 10px;
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #007bff;
  font-size: 0.9rem;
}

.upload-progress i {
  font-size: 1rem;
}

/* Buttons */
.btn {
  padding: 8px 14px;
  border: none;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px !important;
}

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0056b3;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background: #545b62;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.875rem;
}

.btn-outline-primary {
  background: white;
  border: 1px solid #007bff;
  color: #007bff;
}

.btn-outline-primary:hover {
  background: #007bff;
  color: white;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

/* Alert */
.alert {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 15px;
}

.alert-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.alert i {
  margin-right: 8px;
}

/* Fullscreen Modal Adjustments */
.three-m-editor-modal--fullscreen .three-m-editor-box--fullscreen .pm-modal__content {
  padding: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .three-m-editor-modal:not(.three-m-editor-modal--fullscreen) .pm-modal__box {
    max-width: 95% !important;
    max-height: 95vh !important;
  }

  .three-m-tabs {
    flex-wrap: wrap;
  }

  .three-m-tab {
    flex: 1 1 50%;
    font-size: 0.9rem;
    padding: 12px 15px;
  }

  .three-m-add-buttons {
    flex-direction: column;
  }

  .three-m-add-buttons .btn {
    width: 100%;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-row .form-group {
    margin: 0 0 20px 0;
  }
}

