/* Стили для модуля платного контента (Paid Media) */

/* Модальное окно */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99999;
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 100000;
  animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f5f8fa;
  color: #1a1a1a;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e1e8ed;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Форма */
.form-section {
  margin-bottom: 24px;
}

.form-section:last-child {
  margin-bottom: 0;
}

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

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: #1a1a1a;
  font-size: 14px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #2f7df6;
  box-shadow: 0 0 0 3px rgba(47, 125, 246, 0.1);
}

.form-help {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.required {
  color: #e74c3c;
  margin-left: 4px;
}

.optional {
  color: #999;
  font-weight: 400;
  font-size: 13px;
  margin-left: 4px;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #2f7df6;
}

.checkbox-label span {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

/* Info boxes */
.info-box {
  background: #f5f8fa;
  border: 1px solid #e1e8ed;
  border-radius: 12px;
  padding: 16px;
}

.info-box-success {
  background: #e8f5e9;
  border-color: #81c784;
}

.info-box h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.info-box p {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: #333;
  line-height: 1.5;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.info-box ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
  font-size: 13px;
  color: #333;
  line-height: 1.6;
}

.info-box li {
  margin-bottom: 6px;
}

.info-box li:last-child {
  margin-bottom: 0;
}

/* Индикатор платного контента */
#paid-media-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#paid-media-indicator svg {
  width: 20px;
  height: 20px;
}

#paid-media-indicator.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#paid-media-indicator.active:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653b8e 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Кнопка в toolbar - по умолчанию обычная */
#btn-paid-media {
  transition: all 0.2s ease;
}

/* Кнопка активна - показываем градиент */
#btn-paid-media.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #fff !important;
  border-color: transparent !important;
}

#btn-paid-media.active:hover {
  background: linear-gradient(135deg, #5568d3 0%, #653b8e 100%) !important;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Адаптивность */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95vw;
    max-height: 95vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 12px 20px;
    flex-direction: column-reverse;
  }

  .modal-footer .btn,
  .modal-footer .btn-primary {
    width: 100%;
  }
}
