/* ===== SECTIONS - Footer, mobile banner, event cards, forms, layout ===== */

.font-style-italic {
  font-style: italic;
}

.footer-style {
  font-size: 12px;
  text-align: center;
  margin-top: 20px;
  color: #666;
}

.footer-style .social-icon {
  display: inline-block;
  margin: 0 4px;
  text-decoration: none;
  transition: opacity 0.2s ease;
  vertical-align: text-bottom;
  line-height: 1;
}

.footer-style .social-icon svg {
  height: 1em;
  width: auto;
  display: block;
}

.footer-style .linkedin-link {
  color: #0077b5;
}

.footer-style .linkedin-link:hover {
  opacity: 0.7;
}

.footer-style .github-link {
  color: #333;
}

.footer-style .github-link:hover {
  opacity: 0.7;
}

/* Mobile banner styles */
.mobile-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff3cd;
  border-bottom: 1px solid #ffeaa7;
  color: #856404;
  z-index: 1000;
  padding: 8px 12px;
  font-size: 14px;
}

.mobile-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto;
}

.mobile-banner-close {
  background: none;
  border: none;
  color: #856404;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  margin-left: 12px;
  line-height: 1;
}

.mobile-banner-close:hover {
  color: #533f03;
}

.btn-error:hover {
  background-color: #c82333 !important;
}

.btn-warn {
  background-color: #ffc107 !important;
  color: #212529 !important;
}
.btn-warn:hover {
  background-color: #e0a800 !important;
}

/* Duplicate button styles removed - using base styles above */

/*
   Event card styling.  Each event is a card with a grey
   header bar containing the event name and action buttons.  The
   textarea aligns with the header and occupies the rest of the
   card. */
.preset-wrapper {
  border: 1px solid #eceff3;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  /* Remove custom width and padding - let it flow naturally like journey sections */
}
.preset-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f7fa;
  border-bottom: 1px solid #eceff3;
  padding: 12px 16px;
  font-weight: 600;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  /* Remove custom width - let it flow naturally */
}

/* Left side of the event header holds the primary action and the event name. */
.preset-header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
}
.preset-header-left button {
  margin-right: 10px;
  flex-shrink: 0;
}

.preset-header-title {
  font-size: 17px;
  margin-left: 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status indicators section (above code editor, styled like links-container) */
.status-indicators-section {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  flex-wrap: nowrap;
}

.status-indicators-section > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicators-section label {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
}

.status-select {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  min-width: 140px;
}

.status-select:hover {
  border-color: #999;
}

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

.preset-header-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 0;
  flex-shrink: 0;
}
.preset-header-actions button {
  margin-left: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Buttons in grey headers should have white backgrounds (unless specifically colored) */
/* Exclude collapse-toggle which should remain grey */
.preset-header-bar
  button.btn-sm:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(
    .queued
  ):not(.queue-clear-btn):not(.collapse-toggle),
.preset-header-actions
  button.btn-sm:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(
    .queued
  ):not(.queue-clear-btn):not(.collapse-toggle),
.preset-header-left
  button.btn-sm:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(
    .queued
  ):not(.queue-clear-btn):not(.collapse-toggle),
.preset-header-bar
  button:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.queued):not(
    .queue-clear-btn
  ):not(.collapse-toggle),
.preset-header-actions
  button:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.queued):not(
    .queue-clear-btn
  ):not(.collapse-toggle),
.preset-header-left
  button:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.queued):not(
    .queue-clear-btn
  ):not(.collapse-toggle) {
  background-color: #fff !important;
  border: 1px solid #ced4da;
  color: #495057;
}

.preset-header-bar
  button.btn-sm:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(
    .queued
  ):not(.queue-clear-btn):not(.collapse-toggle):hover,
.preset-header-actions
  button.btn-sm:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(
    .queued
  ):not(.queue-clear-btn):not(.collapse-toggle):hover,
.preset-header-left
  button.btn-sm:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(
    .queued
  ):not(.queue-clear-btn):not(.collapse-toggle):hover,
.preset-header-bar
  button:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.queued):not(
    .queue-clear-btn
  ):not(.collapse-toggle):hover,
.preset-header-actions
  button:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.queued):not(
    .queue-clear-btn
  ):not(.collapse-toggle):hover,
.preset-header-left
  button:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.queued):not(
    .queue-clear-btn
  ):not(.collapse-toggle):hover {
  background-color: #e9ecef !important;
  border-color: #adb5bd;
}

/* Override queue-btn grey background when in grey header */
.preset-header-bar .queue-btn:not(.queued),
.preset-header-actions .queue-btn:not(.queued) {
  background-color: #fff !important;
  border: 1px solid #ced4da;
  color: #495057;
}

.preset-header-bar .queue-btn:not(.queued):hover,
.preset-header-actions .queue-btn:not(.queued):hover {
  background-color: #e9ecef !important;
  border-color: #adb5bd;
}

.preset-wrapper textarea {
  border: none;
  border-radius: 0 0 4px 4px;
  padding: 12px 16px;
  min-height: 120px;
  resize: vertical;
  width: 100%;
  box-sizing: border-box;
}

/* Layout for event content: status section above, then code area and comment area side by side */
.preset-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0; /* Remove all padding to align with header edge */
}

/* Container for code and comment areas (side by side) */
.code-comment-container {
  display: flex;
  gap: 20px;
}

/* Code area - let it take natural width */
.preset-content .code-area {
  flex: 1;
  min-width: 0; /* Allow shrinking */
}
/* Remove the divider - use gap instead */
.preset-content .divider {
  display: none; /* Remove divider, use gap for spacing */
}
/* Comment area - let it take natural width */
.preset-content .comment-area {
  flex: 1;
  min-width: 0; /* Allow shrinking */
}
.comment-area textarea {
  width: 100%;
  border: 1px solid #eceff3;
  border-radius: 4px;
  padding: 12px 16px;
  min-height: 148px; /* Match code editor height minus space for links list and add link button above */
  resize: vertical;
  font-family: var(--font-monospace);
  font-size: 14px;
  line-height: 1.4;
  color: #495057;
}

/* Ace editor gutter styling to match header and reduce width */
.ace_editor .ace_gutter {
  background-color: #f5f7fa !important; /* Same as header background */
  border-right: 1px solid #eceff3 !important; /* Match header border */
  width: 40px !important; /* Reduce width since max 99 lines */
}
.ace_editor .ace_gutter-cell {
  color: #6c757d !important; /* Subtle text color */
  font-size: 12px !important; /* Smaller font for narrower gutter */
}

/* List of manually added links for each event. */
/* Container for links list and add button */
.links-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.links-list {
  font-size: 13px;
  flex: 1;
}
.links-list a {
  color: #007bff;
  text-decoration: none;
  display: block;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.links-list a:hover {
  background-color: #f8f9fa;
  text-decoration: underline;
}
/* Button to add a new link. Placed inside the comment area. */
.add-link-btn {
  flex-shrink: 0;
}

/* Individual link item with edit and delete controls */
.link-item {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}
.link-item button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  color: #6c757d;
}
.link-item button:hover {
  color: #007bff;
}

/* Collapsed state for individual event items */
.preset-wrapper.collapsed .preset-content {
  display: none;
  max-height: 0;
  overflow: hidden;
}

.preset-wrapper.collapsed .collapse-toggle {
  transform: rotate(-90deg);
}

.collapse-toggle {
  transition: transform 0.3s ease;
  display: inline-block;
  background-color: #e2e6ea !important; /* Keep grey background for collapse toggle */
  color: #333 !important;
  border: none !important;
}

.collapse-toggle:hover {
  background-color: #d4dadd !important;
}

/* Main section collapsed states - now handled by smooth animations in components.css */
/* Removed display: none to allow smooth slide-up/down animations */

/* Sub-section collapsed states - now handled by smooth animations in components.css */
/* Removed display: none to allow smooth slide-up/down animations */

/* Smooth transitions for all sections - now handled by components.css with better easing */

/* Warning label for events that are only stored in localStorage or
   have been edited locally.  This label appears next to the event
   name and uses a muted orange colour to draw attention without
   overwhelming the interface. */
.change-warning {
  font-size: 12px;
  color: #d97706;
  margin-left: 8px;
}

/* Simple inline form for adding a link (URL and description) */
.link-form {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  gap: 8px;
  padding: 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
}
.link-form input {
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}
.link-form input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
.link-form .link-form-actions {
  display: flex;
  gap: 8px;
}

/* Ace editor container inherits similar styling to the textarea it replaces. */
.ace-editor-container {
  width: 100%;
  min-height: 148px; /* Match comment textarea height for consistent layout */
}

/* Example Events - grouped by category (using standard section classes) */
.section-sub[data-testid*='section_sub_examples'] {
  margin-bottom: 30px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.section-sub[data-testid*='section_sub_examples'] .section-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  border-radius: 8px 8px 0 0;
}

.section-sub[data-testid*='section_sub_examples'] .section-sub-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #495057;
}

.section-sub[data-testid*='section_sub_examples'] .text-muted {
  font-size: 14px;
  color: #6c757d;
  margin-left: 8px;
}

.example-events-container {
  padding: 0;
}

.example-events-container .preset-wrapper {
  margin-bottom: 15px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  background: #fff;
}

.example-events-container .preset-wrapper:last-child {
  margin-bottom: 0;
}

/* Example event specific styling */
.example-events-container .preset-header-bar {
  background: #fafbfc;
  border-bottom: 1px solid #f1f3f4;
}

.example-events-container .preset-header-title {
  color: #495057;
}

/* Preset links styling for examples */
.preset-links {
  margin-top: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.preset-links strong {
  color: #495057;
  font-size: 13px;
  margin-bottom: 8px;
  display: block;
}

.preset-link {
  color: #007bff;
  text-decoration: none;
  font-size: 13px;
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 4px;
}

.preset-link:hover {
  text-decoration: underline;
}

/* Headings use a modern size/weight and extra spacing around
   sections. */
.label {
  font-weight: 600;
  margin: 40px 0 15px;
  font-size: 28px;
}

/* Log output adopts a card-like style similar to events. */
.log {
  margin-top: 15px;
  background: #fff;
  padding: 10px;
  border: 1px solid #eceff3;
  border-radius: 4px;
  font-family: var(--font-monospace);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/*
 * Layout helpers for the top action buttons.  These classes group the three
 * event actions (save, copy all and reset) together near the top of the
 * page and arrange them horizontally.  Each group contains the primary
 * button and its descriptive caption stacked vertically.  The flex
 * container allows the groups to sit side‑by‑side and wrap on narrow
 * screens.
 */
