/* Protocol Page Specific Styles */

/* Protocol disclaimer styling - light background version */
.protocol-disclaimer {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 0.85rem 1.25rem;
  border-radius: 25px;
  margin-bottom: 2.5rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
  color: #6b7280;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 300;
}

.protocol-disclaimer strong {
  color: #374151;
  font-weight: 600;
}

/* Main content wrapper */
.protocol-main-content {
  padding: 3rem 0 5rem;
  min-height: calc(100vh - 200px);
  position: relative;
}

/* Removed unused .protocol-page-wrapper class */

/* Content area */
.protocol-content {
  width: 100%;
}

/* Sidebar - positioned absolutely on desktop */
.protocol-sidebar {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  overflow-y: auto;
}

/* Large desktop - sidebar on side */
@media (min-width: 1800px) {
  .protocol-main-content {
    position: relative;
  }

  .protocol-sidebar {
    position: absolute;
    left: max(20px, calc((100vw - 1200px) / 2 - 280px));
    top: 20px;
    width: 260px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    padding: 1.5rem;
  }

  .protocol-sidebar.sticky {
    position: fixed;
    top: 80px;
  }
}

/* Tablet and desktop below 1800px - sidebar on top */
@media (min-width: 769px) and (max-width: 1800px) {
  .protocol-sidebar {
    position: static;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
    background: transparent;
    box-shadow: none;
    border: none;
  }

  .sidebar-header {
    display: none;
  }

  .protocol-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .protocol-nav-item {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .protocol-nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--white);
  }

  .protocol-nav-link:hover {
    background: var(--bg-light);
    border-color: #0891b2;
  }

  .protocol-nav-link.active {
    background: #0891b2;
    color: white;
    border-color: #0891b2;
  }

  .nav-step-number {
    display: none;
  }

  .progress-section {
    display: none;
  }
}

/* Mobile - sidebar on top, compact */
@media (max-width: 768px) {
  .protocol-sidebar {
    position: static;
    width: calc(100% - 40px);
    margin: 0 20px 2rem;
    padding: 1rem;
  }

  .protocol-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .protocol-nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }

  .nav-step-number {
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
  }

  .progress-section {
    display: none;
  }
}

/* Sidebar scrollbar styling */
.protocol-sidebar::-webkit-scrollbar {
  width: 6px;
}

.protocol-sidebar::-webkit-scrollbar-track {
  background: var(--bg-light);
}

.protocol-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.protocol-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

.sidebar-header {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.protocol-nav-item {
  margin-bottom: 0.5rem;
}

.protocol-nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.2s;
  position: relative;
}

.protocol-nav-link:hover {
  background: var(--bg-light);
  color: #0891b2;
}

.protocol-nav-link.active {
  background: #0891b2;
  color: white;
}

.protocol-nav-link.completed {
  color: var(--secondary-color);
}

.protocol-nav-link.completed::after {
  content: "✓";
  position: absolute;
  right: 1rem;
  color: var(--secondary-color);
  font-weight: bold;
}

.protocol-nav-link.active.completed::after {
  color: white;
}

/* Ensure text is white when active */
.protocol-nav-link.active {
  color: white !important;
}

.nav-step-number {
  width: 24px;
  height: 24px;
  margin-right: 0.75rem;
  transition: all 0.2s;
  background: var(--bg-light);
  color: var(--text-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.protocol-nav-link.active .nav-step-number {
  background: white;
  color: #0891b2;
}

.protocol-nav-link.completed .nav-step-number {
  background: #0891b2;
  color: white;
}

.progress-bar-container {
  background: var(--bg-light);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-bar {
  height: 100%;
  background: #0891b2;
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Remove old mobile menu code as we're not using it anymore */

.protocol-hero {
  background: linear-gradient(135deg, #0891b2 0%, #0891b2 100%);
  padding: 3rem 0;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.protocol-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(255, 255, 255, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.3) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(255, 255, 255, 0.2) 0%,
      transparent 50%
    );
  animation: shimmer 15s ease-in-out infinite;
}

.protocol-hero::after {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
  animation: drift 20s linear infinite;
  transition: transform 0.3s ease-out;
}

.protocol-hero.mouse-active::after {
  transform: translate(
    calc((var(--mouse-x) - 50%) * 0.1),
    calc((var(--mouse-y) - 50%) * 0.1)
  );
}

@keyframes shimmer {
  0%,
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1) rotate(1deg);
  }
}

@keyframes drift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(100px, 100px);
  }
}

.protocol-hero h1 {
  font-family: "Raleway", sans-serif;
  font-size: 1.9rem;
  font-weight: 200;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.2;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  letter-spacing: 1px;
}

.protocol-hero .hero-subtitle {
  font-family: "Raleway", sans-serif;
  font-size: 1.35rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  font-weight: 300;
  letter-spacing: 0.5px;
}

.protocol-hero .container {
  position: relative;
  z-index: 1;
}

.protocol-overview {
  background: #f0fdf4;
  border: 2px solid #0891b2;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 3rem;
}

/* Protocol Components Grid */
.protocol-components-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

/* Desktop: 2 rows of 3 cards */
@media (min-width: 768px) {
  .protocol-components-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: 1 column */
@media (max-width: 767px) {
  .protocol-components-grid {
    grid-template-columns: 1fr;
  }
}

.component-card {
  background: var(--white);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
}

.component-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-color);
}

.component-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--card-color);
}

.component-target {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--card-color);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.target-icon {
  font-size: 1.25rem;
}

.component-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.component-subtitle {
  font-size: 0.875rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 1rem;
}

.component-action {
  background: var(--bg-light);
  padding: 0.75rem;
  position: relative;
  overflow: visible;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  z-index: 1;
}

.component-action sup {
  font-size: 0.7rem;
}

.component-dose {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.dose-label {
  font-size: 0.875rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dose-amount {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--card-color);
}

.component-product {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  border: 1px dashed var(--border-color);
}

.product-rec-label {
  font-size: 0.75rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-rec-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
}

@media (max-width: 768px) {
  .protocol-components-grid {
    grid-template-columns: 1fr;
  }

  .component-product {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

.protocol-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.summary-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.summary-card h3 {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.summary-card .number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0.5rem 0;
}

.summary-card p {
  font-size: 0.875rem;
  color: var(--text-dark);
}

.dosing-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.dosing-card h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Dosing Schedule Grid */
.dosing-schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

/* Mobile responsive - stack vertically */
@media (max-width: 768px) {
  .dosing-schedule-grid {
    grid-template-columns: 1fr;
  }
}

.dose-time-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.dose-time-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.morning-card .dose-header {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
}

.midday-card .dose-header {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
}

.evening-card .dose-header {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
}

.dose-header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dose-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dose-icon {
  font-size: 1.5rem;
}

.dose-time h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-dark);
}

.dose-timing {
  font-size: 0.8rem;
  color: var(--text-dark);
  opacity: 0.8;
  font-weight: 500;
}

.dose-compounds {
  padding: 1rem 1.25rem;
  flex: 1;
}

.compound-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-light);
  border-radius: 6px;
  transition: background 0.2s;
}

.compound-item:hover {
  background: var(--bg-alt);
}

.compound-item:last-child {
  margin-bottom: 0;
}

.compound-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.compound-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.compound-details .compound-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.875rem;
  line-height: 1.2;
}

.compound-details .compound-dose {
  color: var(--text-light);
  font-size: 0.8rem;
  line-height: 1.2;
}

.compound-note {
  font-size: 0.7rem;
  color: var(--primary-color);
  font-style: italic;
  line-height: 1.2;
}

.dose-summary {
  padding: 0.75rem 1.25rem;
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.pill-count {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.8rem;
}

.dose-total {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Quick Reference Grid */
.dosing-quick-reference {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.compound-totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.compound-total-card {
  background: var(--white);
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.compound-total-card .compound-icon {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.compound-total-card .compound-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.75rem;
  line-height: 1.1;
}

.compound-total-card .total-dose {
  font-size: 0.8rem;
  color: var(--secondary-color);
  font-weight: 700;
  line-height: 1.1;
}

.compound-total-card .pill-count {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Pro Tips Section - Compact and Pretty */
.dosing-tips {
  background: var(--white);
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--secondary-color);
  margin-top: 2rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.dosing-tips h3 {
  text-align: center;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.tip-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem;
}

.tip-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-radius: 50%;
  margin-bottom: 0.5rem;
}

.tip-card h4 {
  color: var(--text-dark);
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.tip-card p {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.3;
  margin: 0;
}

@media (max-width: 768px) {
  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .tip-card {
    padding: 0.5rem;
  }
}

/* Twice Daily Dosing Section */
.twice-daily-section {
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 2rem;
  margin-top: 3rem;
}

.twice-daily-section h3 {
  color: #374151;
  margin-bottom: 1rem;
  font-size: 1.375rem;
  text-align: center;
}

.twice-daily-intro {
  font-size: 1rem;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-align: center;
}

.twice-daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.twice-daily-option {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #fbbf24;
}

.twice-daily-option h4 {
  color: #374151;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.twice-daily-option .pros,
.twice-daily-option .cons {
  margin: 0.75rem 0;
}

.twice-daily-option .pros h5,
.twice-daily-option .cons h5 {
  color: var(--text-dark);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.twice-daily-option .pros {
  color: #0891b2;
}

.twice-daily-option .cons {
  color: #374151;
}

.twice-daily-option ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

.twice-daily-tip {
  background: rgba(251, 191, 36, 0.1);
  padding: 1.25rem;
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
  margin-top: 1.5rem;
}

.twice-daily-tip strong {
  color: #374151;
  display: block;
  margin-bottom: 0.5rem;
}

.twice-daily-tip p {
  color: #374151;
  margin: 0;
  line-height: 1.6;
}

.twice-daily-bottom-line {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  border: 1px dashed var(--border-color);
}

.twice-daily-bottom-line h5 {
  color: var(--text-dark);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.twice-daily-bottom-line p {
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .compound-totals-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .twice-daily-grid {
    grid-template-columns: 1fr;
  }
}

.time-icon {
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: bold;
}

.dose-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.dose-item:last-child {
  border-bottom: none;
}

.dose-amount {
  color: var(--text-light);
  font-size: 0.9rem;
}

.phase-section {
  margin: 3rem 0;
}

.phase-header {
  background: var(--bg-alt);
  padding: 1rem 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.summary-card .number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--secondary-color);
}

/* Timeline styles for protocol page */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin: 2rem 0;
}

.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-dark)
  );
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.875rem;
  white-space: nowrap;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.timeline-content {
  background: var(--white);
  padding: 1.75rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  width: calc(50% - 2rem);
  margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 0;
  margin-right: auto;
}

.timeline-content:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.timeline-content h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.timeline-content p {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.phase-details {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.phase-details strong {
  color: var(--text-dark);
  display: block;
  margin-bottom: 0.5rem;
}

.phase-details ul {
  margin: 0;
  padding-left: 1.5rem;
}

.phase-details li {
  margin: 0.25rem 0;
  color: var(--text-light);
}

/* Important notes styling */
.important-notes {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.important-notes h3 {
  color: #374151;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.important-notes ul {
  margin: 0;
  padding-left: 1.5rem;
}

.important-notes li {
  margin: 0.5rem 0;
  color: #374151;
}

/* Responsive timeline styles */
@media (max-width: 768px) {
  .timeline::before {
    left: 20px;
    transform: none;
  }

  .timeline-marker {
    left: 20px;
    transform: none;
  }

  .timeline-content {
    width: calc(100% - 50px);
    margin-left: 50px !important;
    margin-right: 0 !important;
  }

  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 50px !important;
  }
}

/* Additional protocol styles */
.protocol-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Protocol sections */
.protocol-section {
  display: none;
}

.protocol-section.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-text {
  font-size: 0.875rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 0.5rem;
}

/* Mark as Complete button styling */
.mark-complete-btn {
  width: 100%;
  margin-top: 1rem;
  font-size: 0.875rem;
  background: linear-gradient(135deg, #0891b2 0%, #0891b2 100%);
  color: white !important;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.mark-complete-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(8, 145, 178, 0.2);
}

/* HTMX Loading States and Transitions */
.htmx-indicator {
  display: none;
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
  display: inline-block;
  opacity: 1;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(16, 185, 129, 0.3);
  border-radius: 50%;
  border-top-color: #10b981;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Content transitions */
#protocol-content.htmx-swapping {
  opacity: 0.6;
  transition: opacity 150ms ease-out;
}

#protocol-content {
  transition: opacity 150ms ease-in;
}

/* Skeleton loader for content */
.content-skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  height: 200px;
  border-radius: 8px;
  margin: 1rem 0;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Nav link loading state */
.protocol-nav-link.htmx-request {
  position: relative;
  pointer-events: none;
}

.protocol-nav-link.htmx-request::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: 50%;
  border-top-color: #10b981;
  animation: spin 1s ease-in-out infinite;
}

/* ===== Tooltips for Protocol Page ===== */
.protocol-main-content .tooltip {
    position: relative;
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    text-decoration-color: var(--primary-color);
}

.protocol-main-content .tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.75rem 1rem;
    background: white;
    color: var(--text-dark);
    font-size: 0.875rem;
    font-weight: normal;
    white-space: normal;
    min-width: 200px;
    max-width: 300px;
    text-align: center;
    line-height: 1.4;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    margin-bottom: 8px;
    z-index: 9999;
}

.protocol-main-content .tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 0 6px;
    border-color: white transparent transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 9999;
}

.protocol-main-content .tooltip:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.protocol-main-content .tooltip:hover::after {
    opacity: 1;
}

/* Info button educational tooltip */
.info-btn-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.info-btn-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    background: linear-gradient(white, white) padding-box,
                conic-gradient(from 0deg, #0891b2, #e5e7eb, #0891b2, #e5e7eb, #0891b2) border-box;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
    z-index: 10000;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: rotateGradient 4s linear infinite;
}

.info-btn-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
}

.info-btn-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.info-btn-tooltip-close {
    position: absolute;
    top: 2px;
    right: 4px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 16px;
    padding: 2px;
    line-height: 1;
}

.info-btn-tooltip-close:hover {
    color: #6b7280;
}

@keyframes rotateGradient {
    0% {
        background: linear-gradient(white, white) padding-box,
                    conic-gradient(from 0deg, #0891b2, #e5e7eb, #0891b2, #e5e7eb, #0891b2) border-box;
    }
    100% {
        background: linear-gradient(white, white) padding-box,
                    conic-gradient(from 360deg, #0891b2, #e5e7eb, #0891b2, #e5e7eb, #0891b2) border-box;
    }
}

/* Protocol nav link completed state */
.protocol-nav-link.completed {
  position: relative;
  color: #0891b2;
}

.protocol-nav-link.completed::after {
  content: "✓";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #0891b2;
  font-weight: bold;
  font-size: 1.1em;
}
