/* cb-aacf7 管理画面スタイル */

.contact-form-editor-panel#cb-aacf7-panel h3 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin: 0;
  padding: 20px 30px;
  font-size: 20px;
  font-weight: 600;
  border-radius: 8px 8px 0 0;
  border-bottom: none;
  position: relative;
}

.contact-form-editor-panel#cb-aacf7-panel h3::before {
  content: "🤖";
  margin-right: 15px;
  font-size: 24px;
}

.contact-form-editor-panel#cb-aacf7-panel > div:not(:first-child) {
  padding: 30px;
}

.contact-form-editor-panel#cb-aacf7-panel fieldset {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 30px;
  transition: box-shadow 0.3s ease;
}

.contact-form-editor-panel#cb-aacf7-panel fieldset:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-form-editor-panel#cb-aacf7-panel fieldset legend {
  background: white;
  color: #495057;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid #dee2e6;
  margin-left: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-form-editor-panel#cb-aacf7-panel input[type="text"],
.contact-form-editor-panel#cb-aacf7-panel input[type="email"],
.contact-form-editor-panel#cb-aacf7-panel input[type="password"],
.contact-form-editor-panel#cb-aacf7-panel textarea,
.contact-form-editor-panel#cb-aacf7-panel select {
  width: 100%;
  max-width: 500px;
  padding: 10px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  transition: all 0.3s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.contact-form-editor-panel#cb-aacf7-panel input[type="text"]:focus,
.contact-form-editor-panel#cb-aacf7-panel input[type="email"]:focus,
.contact-form-editor-panel#cb-aacf7-panel input[type="password"]:focus,
.contact-form-editor-panel#cb-aacf7-panel textarea:focus,
.contact-form-editor-panel#cb-aacf7-panel select:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.contact-form-editor-panel#cb-aacf7-panel label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 8px;
  display: inline-block;
}

.contact-form-editor-panel#cb-aacf7-panel .button {
  border-radius: 4px;
  font-weight: 600;
  padding: 10px 20px;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid #007cba;
  background: #007cba;
  color: white;
  cursor: pointer;
}

.contact-form-editor-panel#cb-aacf7-panel .button:hover {
  background: #005a87;
  border-color: #005a87;
  color: white;
}

.contact-form-editor-panel#cb-aacf7-panel .button-secondary {
  background: white;
  color: #007cba;
  border: 1px solid #007cba;
}

.contact-form-editor-panel#cb-aacf7-panel .button-secondary:hover {
  background: #007cba;
  color: white;
}

#cb-aacf7-preview-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

#cb-aacf7-preview-btn::before {
  content: "📧";
  margin-right: 8px;
}

#cb-aacf7-preview-btn:hover {
  background: linear-gradient(135deg, #5a6fd8, #6a4190);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

#cb-aacf7-preview-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#cb-aacf7-preview-container {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 25px;
  margin-top: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#cb-aacf7-preview-container h4 {
  color: #495057;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 2px solid #007cba;
  padding-bottom: 10px;
}

#cb-aacf7-preview-container h4::before {
  content: "📧";
  margin-right: 10px;
}

.cb-aacf7-preview-section {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.cb-aacf7-preview-section:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.cb-aacf7-preview-section:last-child {
  margin-bottom: 0;
}

.cb-aacf7-preview-section strong {
  display: block;
  margin-bottom: 10px;
  color: #495057;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cb-aacf7-preview-content {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 15px;
  min-height: 40px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #495057;
}

.cb-aacf7-preview-content pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: "Courier New", monospace;
  background: #2c3e50;
  color: #ecf0f1;
  padding: 15px;
  border-radius: 4px;
}

.cb-aacf7-preview-format-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #007cba;
}

.cb-aacf7-preview-format-badge.format-text {
  background: #6c757d;
}

.cb-aacf7-preview-format-badge.format-html {
  background: #dc3545;
}

.cb-aacf7-preview-format-badge.format-both {
  background: #007cba;
}

#cb-aacf7-preview-loading {
  color: #667eea;
  font-style: italic;
  font-weight: 600;
}

#cb-aacf7-preview-loading::before {
  content: "⏳";
  margin-right: 8px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.contact-form-editor-panel#cb-aacf7-panel #shortcode-settings,
.contact-form-editor-panel#cb-aacf7-panel #email-settings {
  background: white;
  border: 1px solid #dee2e6;
  border-left: 4px solid #007cba;
  border-radius: 4px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.contact-form-editor-panel#cb-aacf7-panel #shortcode-settings:hover,
.contact-form-editor-panel#cb-aacf7-panel #email-settings:hover {
  transform: translateX(3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-form-editor-panel#cb-aacf7-panel span[onclick] {
  background: #007cba;
  color: white;
  padding: 6px 12px;
  margin: 3px;
  border-radius: 4px;
  cursor: pointer;
  font-family: monospace;
  font-size: 12px;
  display: inline-block;
  transition: all 0.3s ease;
  border: 1px solid #007cba;
}

.contact-form-editor-panel#cb-aacf7-panel span[onclick]:hover {
  background: #005a87;
  border-color: #005a87;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.contact-form-editor-panel#cb-aacf7-panel small {
  font-size: 12px;
  color: #6c757d;
  margin-top: 5px;
  display: block;
}

.cb-aacf7-status-good {
  color: #28a745;
  font-weight: 600;
}

.cb-aacf7-status-error {
  color: #dc3545;
  font-weight: 600;
}

@media (max-width: 768px) {
  .contact-form-editor-panel#cb-aacf7-panel {
    margin: 10px 0;
    border-radius: 4px;
  }

  .contact-form-editor-panel#cb-aacf7-panel > div:not(:first-child) {
    padding: 20px;
  }

  .contact-form-editor-panel#cb-aacf7-panel fieldset {
    padding: 20px;
    margin-bottom: 20px;
  }

  .contact-form-editor-panel#cb-aacf7-panel h3 {
    padding: 15px 20px;
    font-size: 18px;
  }

  .contact-form-editor-panel#cb-aacf7-panel input[type="text"],
  .contact-form-editor-panel#cb-aacf7-panel input[type="email"],
  .contact-form-editor-panel#cb-aacf7-panel input[type="password"],
  .contact-form-editor-panel#cb-aacf7-panel textarea,
  .contact-form-editor-panel#cb-aacf7-panel select {
    max-width: 100%;
  }
}

#cb-aacf7-preview-container.has-preview {
  display: block !important;
  animation: slideIn 0.5s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cb-aacf7-tooltip-container {
  position: relative;
  display: inline-block;
}

.cb-aacf7-tooltip-trigger {
  color: #666;
  cursor: help;
  margin-left: 5px;
  text-decoration: none;
}

.cb-aacf7-tooltip-trigger:hover {
  color: #0073aa;
}

.cb-aacf7-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  padding: 8px 12px;
  background: #333;
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  max-width: 500px;
  min-width: 200px;
  white-space: normal;
  word-wrap: break-word;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cb-aacf7-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
}

.cb-aacf7-tooltip-trigger:hover .cb-aacf7-tooltip {
  opacity: 1;
  visibility: visible;
}

.cb-aacf7-info-section {
  background: #e8f4fd;
  border: 1px solid #0073aa;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.cb-aacf7-info-section h4 {
  margin-top: 0;
  color: #0073aa;
  font-weight: bold;
}

.cb-aacf7-section-header {
  font-weight: bold;
  color: #333;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
  margin-bottom: 8px;
  margin-top: 10px;
}

.cb-aacf7-section-content {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 20px;
  background-color: #fafafa;
}

.cb-aacf7-subsection {
  margin-top: 15px;
  padding: 10px;
  background-color: #f0f8ff;
  border-left: 4px solid #0073aa;
}

.cb-aacf7-db-version-notice {
  background-color: #e8f4fd;
  border: 1px solid #0073aa;
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 20px;
}

.cb-aacf7-db-version-title {
  margin: 0;
  color: #0073aa;
  font-weight: bold;
}

.cb-aacf7-db-version-text {
  margin: 5px 0 0 0;
  font-size: 13px;
  color: #555;
}

.cb-aacf7-status-text {
  color: #666;
}

.cb-aacf7-help-text {
  color: #666;
}

.cb-aacf7-note-text {
  color: #888;
  font-style: italic;
}

.cb-aacf7-textarea {
  font-family: monospace;
  min-height: 50px;
}

.cb-aacf7-field-tags-section {
  margin-top: 15px;
  padding: 15px;
  background-color: #f0f8ff;
  border: 1px solid #b3d9ff;
  border-radius: 5px;
}

.cb-aacf7-field-tags {
  margin-top: 10px;
}

.cb-aacf7-field-tag {
  display: inline-block;
  background-color: #0073aa;
  color: white;
  padding: 4px 8px;
  margin: 2px;
  border-radius: 3px;
  cursor: pointer;
  font-family: monospace;
  font-size: 12px;
  transition: background-color 0.2s ease;
}

.cb-aacf7-field-tag:hover {
  background-color: #005a87;
}

.cb-aacf7-no-tags {
  color: #666;
  font-style: italic;
}

@media screen and (max-width: 768px) {
  .cb-aacf7-tooltip {
    max-width: 300px;
    font-size: 11px;
  }

  .cb-aacf7-section-content {
    padding: 10px;
  }

  .cb-aacf7-subsection {
    padding: 8px;
  }

  .cb-aacf7-field-tag {
    font-size: 11px;
    padding: 3px 6px;
  }
}