/* Essential Addons Code Snippet Frontend Styles */
.eael-code-snippet-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "Courier New", monospace;
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  -webkit-transition: -webkit-box-shadow 0.3s ease;
  transition: -webkit-box-shadow 0.3s ease;
  transition: box-shadow 0.3s ease;
  transition: box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease;
  /* Light */
  /* Dark Theme */
}
.eael-code-snippet-wrapper:hover {
  -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.eael-code-snippet-wrapper.theme-light {
  background-color: #ffffff;
  border: 1px solid #e1e5e9;
}
.eael-code-snippet-wrapper.theme-light .eael-code-snippet-header,
.eael-code-snippet-wrapper.theme-light .eael-file-preview-header {
  background-color: #f6f8fa;
  border-bottom: 1px solid #e1e5e9;
}
.eael-code-snippet-wrapper.theme-light .eael-code-snippet-language {
  color: #586069;
}
.eael-code-snippet-wrapper.theme-light .eael-file-name .file-name-text {
  color: #24292e;
}
.eael-code-snippet-wrapper.theme-light .eael-traffic-lights .traffic-light.traffic-light-red {
  background-color: #ff5f57;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.eael-code-snippet-wrapper.theme-light .eael-traffic-lights .traffic-light.traffic-light-yellow {
  background-color: #ffbd2e;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.eael-code-snippet-wrapper.theme-light .eael-traffic-lights .traffic-light.traffic-light-green {
  background-color: #28ca42;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.eael-code-snippet-wrapper.theme-light .eael-code-snippet-code {
  background-color: #ffffff;
  color: #24292e;
}
.eael-code-snippet-wrapper.theme-light .eael-code-snippet-line-numbers {
  background-color: #f6f8fa;
  color: #586069;
  border-right: 1px solid #e1e5e9;
}
.eael-code-snippet-wrapper.theme-light .eael-code-snippet-copy-button {
  background: transparent;
  color: #6c757d;
  border: 1px solid currentColor;
  border-radius: 8px;
  padding: 8px;
  width: 32px;
  height: 32px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  cursor: pointer;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
.eael-code-snippet-wrapper.theme-light .eael-code-snippet-copy-button svg {
  width: 16px;
  height: 16px;
}
.eael-code-snippet-wrapper.theme-dark {
  background-color: #0d1117;
  border: 1px solid #30363d;
}
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-header,
.eael-code-snippet-wrapper.theme-dark .eael-file-preview-header {
  background-color: #161b22;
  border-bottom: 1px solid #30363d;
}
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-language {
  color: #8b949e;
}
.eael-code-snippet-wrapper.theme-dark .eael-file-name .file-name-text {
  color: #e6edf3;
}
.eael-code-snippet-wrapper.theme-dark .eael-traffic-lights .traffic-light.traffic-light-red {
  background-color: #ff6058;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.eael-code-snippet-wrapper.theme-dark .eael-traffic-lights .traffic-light.traffic-light-yellow {
  background-color: #ffbd2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.eael-code-snippet-wrapper.theme-dark .eael-traffic-lights .traffic-light.traffic-light-green {
  background-color: #28ca42;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-code {
  background-color: #0d1117;
  color: #e6edf3;
}
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-line-numbers {
  background-color: #161b22;
  color: #656d76;
  border-right: 1px solid #30363d;
}
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-copy-button {
  background: transparent;
  color: #a0aec0;
  border: 1px solid currentColor;
  border-radius: 8px;
  padding: 8px;
  width: 32px;
  height: 32px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  cursor: pointer;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-copy-button svg {
  width: 16px;
  height: 16px;
}
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-copy-button:hover {
  color: #e2e8f0;
  border-color: #e2e8f0;
}
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-copy-button:active {
  color: #cbd5e0;
  border-color: #cbd5e0;
}
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-copy-button:focus {
  outline: none;
}
/* File Preview Header Styles */
.eael-file-preview-header {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 3rem;
}
.eael-file-preview-header .eael-file-preview-left {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 0.75rem;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
}
.eael-file-preview-header .eael-file-preview-right {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 0.5rem;
}
/* Traffic Lights */
.eael-traffic-lights {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 0.5rem;
}
.eael-traffic-lights .traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: block;
}
.eael-traffic-lights .traffic-light.traffic-light-red {
  background-color: #ff5f57;
}
.eael-traffic-lights .traffic-light.traffic-light-yellow {
  background-color: #ffbd2e;
}
.eael-traffic-lights .traffic-light.traffic-light-green {
  background-color: #28ca42;
}
/* File Info */
.eael-file-info {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 0.5rem;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  min-width: 0; /* Allow text truncation */
}
.eael-file-icon {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  width: 20px;
  height: 20px;
  -ms-flex-negative: 0;
      flex-shrink: 0;
}
.eael-file-icon img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  border-radius: 2px;
}
.eael-file-icon .eael-file-icon-emoji {
  font-size: 16px;
  line-height: 1;
  display: block;
}
.eael-file-name {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  min-width: 0;
}
.eael-file-name .file-name-text {
  font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "Courier New", monospace;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
/* Legacy header styles for backward compatibility */
.eael-code-snippet-header:not(.eael-file-preview-header) {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 3rem;
}
.eael-code-snippet-language {
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  font-size: 0.8125rem;
}
.eael-code-snippet-copy-button {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.eael-code-snippet-copy-button:hover {
  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
          box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.eael-code-snippet-copy-button:active {
  -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.eael-code-snippet-copy-button:focus {
  outline: none;
}
.eael-code-snippet-copy-button svg {
  width: 16px;
  height: 16px;
  -ms-flex-negative: 0;
      flex-shrink: 0;
}
.eael-code-snippet-content {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  position: relative;
  overflow: hidden;
  -webkit-box-align: stretch;
      -ms-flex-align: stretch;
          align-items: stretch;
}
.eael-code-snippet-line-numbers,
.eael-code-snippet-code,
.eael-code-snippet-code code {
  font-size: 0.875rem;
  line-height: 1.5;
}
.eael-code-snippet-code,
.eael-code-snippet-code code {
  white-space: pre;
  word-break: normal;
  overflow-x: auto;
}
.eael-code-snippet-line-numbers {
  white-space: pre;
}
.eael-code-snippet-line-numbers {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  padding: 1rem 0.75rem;
  text-align: right;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  min-width: 3rem;
  -ms-flex-negative: 0;
      flex-shrink: 0;
}
.eael-code-snippet-line-numbers .line-number {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: end;
      -ms-flex-pack: end;
          justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}
.eael-code-snippet-code {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  margin: 0;
  padding: 1rem;
  font-family: inherit;
  white-space: pre;
  overflow-x: auto;
  background: transparent;
  border: none;
  min-height: 3rem;
  /* Custom scrollbar for webkit browsers */
}
.eael-code-snippet-code code {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  background: transparent;
  padding: 0;
  border: none;
  display: block;
  white-space: pre;
}
.eael-code-snippet-code::-webkit-scrollbar {
  height: 8px;
}
.eael-code-snippet-code::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
.eael-code-snippet-code::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}
.eael-code-snippet-code::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}
/* Tooltip Styles */
.eael-code-snippet-tooltip {
  position: fixed;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 6px;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 0.2s ease, visibility 0.2s ease;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  /* Light tooltip */
  background-color: #f6f8fa;
  color: #24292f;
  border: 1px solid #6c757d;
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  /* Show tooltip on hover */
}
.eael-code-snippet-tooltip.show {
  opacity: 1;
  visibility: visible;
}
/* Dark theme tooltip */
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-tooltip {
  background-color: #24292f;
  color: #f6f8fa;
  border-color: #a0aec0;
  -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
          box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.eael-code-snippet-wrapper.theme-dark .eael-code-snippet-tooltip::after {
  border-top-color: #24292f;
}
/* Copy button container for tooltip positioning */
.eael-code-snippet-copy-container {
  position: relative;
  display: inline-block;
}
/* Responsive Design */
@media (max-width: 768px) {
  .eael-code-snippet-wrapper {
    margin: 1rem 0;
    border-radius: 6px;
  }
  .eael-code-snippet-header,
  .eael-file-preview-header {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    min-height: auto;
  }
  .eael-file-preview-header .eael-file-preview-left {
    gap: 0.5rem;
  }
  .eael-file-preview-header .eael-traffic-lights {
    gap: 0.375rem;
  }
  .eael-file-preview-header .eael-traffic-lights .traffic-light {
    width: 10px;
    height: 10px;
  }
  .eael-file-preview-header .eael-file-name .file-name-text {
    font-size: 0.8125rem;
  }
  /* Legacy header responsive styles */
  .eael-code-snippet-header:not(.eael-file-preview-header) {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 0.5rem;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
  }
  .eael-code-snippet-copy-button {
    padding: 0.375rem 0.625rem;
    font-size: 0.8125rem;
    -ms-flex-item-align: end;
        align-self: flex-end;
  }
  .eael-code-snippet-copy-button svg {
    width: 14px;
    height: 14px;
  }
  .eael-code-snippet-line-numbers {
    padding: 0.75rem 0.5rem;
    font-size: 0.75rem;
    min-width: 2.5rem;
  }
  .eael-code-snippet-code {
    padding: 0.75rem;
    font-size: 0.8125rem;
  }
}
@media (max-width: 480px) {
  .eael-code-snippet-wrapper {
    margin: 0.75rem 0;
    border-radius: 4px;
  }
  .eael-code-snippet-header,
  .eael-file-preview-header {
    padding: 0.5rem;
  }
  .eael-file-preview-header .eael-file-preview-left {
    gap: 0.375rem;
  }
  .eael-file-preview-header .eael-traffic-lights {
    gap: 0.25rem;
  }
  .eael-file-preview-header .eael-traffic-lights .traffic-light {
    width: 8px;
    height: 8px;
  }
  .eael-file-preview-header .eael-file-icon {
    width: 16px;
    height: 16px;
  }
  .eael-file-preview-header .eael-file-icon .eael-file-icon-emoji {
    font-size: 12px;
  }
  .eael-file-preview-header .eael-file-name .file-name-text {
    font-size: 0.75rem;
  }
  .eael-code-snippet-copy-button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    gap: 0.25rem;
  }
  .eael-code-snippet-copy-button svg {
    width: 12px;
    height: 12px;
  }
  .eael-code-snippet-line-numbers {
    padding: 0.5rem 0.375rem;
    font-size: 0.6875rem;
    min-width: 2rem;
  }
  .eael-code-snippet-code {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
}
/* High contrast mode support */
@media (prefers-contrast: high) {
  .eael-code-snippet-wrapper {
    border-width: 2px;
  }
  .eael-code-snippet-wrapper.theme-light {
    border-color: #000000;
  }
  .eael-code-snippet-wrapper.theme-light .eael-code-snippet-header {
    border-bottom-color: #000000;
  }
  .eael-code-snippet-wrapper.theme-light .eael-code-snippet-line-numbers {
    border-right-color: #000000;
  }
  .eael-code-snippet-wrapper.theme-dark {
    border-color: #ffffff;
  }
  .eael-code-snippet-wrapper.theme-dark .eael-code-snippet-header {
    border-bottom-color: #ffffff;
  }
  .eael-code-snippet-wrapper.theme-dark .eael-code-snippet-line-numbers {
    border-right-color: #ffffff;
  }
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .eael-code-snippet-wrapper,
  .eael-code-snippet-copy-button,
  .eael-code-snippet-tooltip {
    -webkit-transition: none;
    transition: none;
  }
}
/* Print styles */
@media print {
  .eael-code-snippet-wrapper {
    -webkit-box-shadow: none;
            box-shadow: none;
    border: 1px solid #000000;
    -webkit-column-break-inside: avoid;
       -moz-column-break-inside: avoid;
            break-inside: avoid;
  }
  .eael-code-snippet-header {
    background-color: #f5f5f5 !important;
    border-bottom: 1px solid #000000;
  }
  .eael-code-snippet-copy-button {
    display: none;
  }
  .eael-code-snippet-code {
    background-color: #ffffff !important;
    color: #000000 !important;
    overflow: visible;
    white-space: pre-wrap;
    word-wrap: break-word;
  }
  .eael-code-snippet-line-numbers {
    background-color: #f5f5f5 !important;
    color: #666666 !important;
    border-right: 1px solid #000000;
  }
}
