/**
 * @file
 * Styles for Cloudflare Images text editor buttons.
 */

.cloudflare-editor-buttons {
  margin-bottom: 10px;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.cloudflare-editor-buttons::before {
  content: "📷";
  font-size: 16px;
  margin-right: 8px;
}

/* Better integration with Drupal's text format wrapper */
.text-format-wrapper .cloudflare-editor-buttons {
  background: #fff;
  border: 1px solid #d4d4d8;
  margin-bottom: 5px;
  border-radius: 6px;
}

/* Integration with CKEditor */
.ck-editor + .cloudflare-editor-buttons,
.cloudflare-editor-buttons + .ck-editor {
  margin-top: 0;
  margin-bottom: 5px;
}

.cloudflare-browse-btn,
.cloudflare-upload-btn {
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.cloudflare-browse-btn:hover,
.cloudflare-upload-btn:hover {
  background: #f0f0f0;
  border-color: #999;
}

.cloudflare-upload-btn {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
}

.cloudflare-upload-btn:hover {
  background: #005a87;
  border-color: #005a87;
}

.cloudflare-browse-btn:focus,
.cloudflare-upload-btn:focus {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
  .cloudflare-editor-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cloudflare-browse-btn,
  .cloudflare-upload-btn {
    width: 100%;
    margin-bottom: 5px;
  }
}

/* Integration with Drupal admin theme */
.admin-toolbar .cloudflare-editor-buttons {
  background: #f5f5f5;
  border-color: #ddd;
}

/* Make sure buttons don't interfere with other form elements */
.cloudflare-editor-buttons + .form-textarea-wrapper {
  margin-top: 0;
}

.cloudflare-editor-buttons + .text-format-wrapper {
  margin-top: 0;
}
.field--type-string-long .cloudflare-editor-buttons {
  display: none;
}