/*
 * Tobalt LT — "Darbo eiga" process timeline (.tp).
 * Author: Tobalt — https://tobalt.lt
 * Moved from prod homepage Elementor HTML widget b9a476a (Tobalt's own code); markup now rendered by
 * template-parts/sections/process.php, behaviour in assets/js/site.js.
 */
.tp {
  --tp-primary: #E3FF04;
  --tp-primary-dim: rgba(227, 255, 4, 0.15);
  --tp-purple: #c8b6ff;
  --tp-dark: #0A0C00;
  --tp-dark-secondary: #202020;
  --tp-white: #ffffff;
  --tp-radius: 20px;
  --tp-radius-pill: 9999px;
  --tp-font-heading: 'Unbounded', sans-serif;
  --tp-font-body: 'Poppins', sans-serif;
  --tp-timeline-width: 3px;
  --tp-node-size: 52px;
  --tp-timeline-left: 26px;
  position: relative;
  font-family: var(--tp-font-body);
  max-width: 480px;
  margin: 0 auto;
  color: var(--tp-dark);
  line-height: 1.5;
}
.tp-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: calc(var(--tp-node-size) + 20px);
  list-style: none;
  margin: 0;
}
.tp-steps::before {
  content: '';
  position: absolute;
  left: var(--tp-timeline-left);
  top: 0;
  bottom: 0;
  width: var(--tp-timeline-width);
  background: var(--tp-white);
  transform: translateX(-50%);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}
.tp-steps::after {
  content: '';
  position: absolute;
  left: var(--tp-timeline-left);
  top: 0;
  width: var(--tp-timeline-width);
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--tp-primary), transparent);
  transform: translateX(-50%);
  border-radius: 2px;
  animation: flowDown 3s ease-in-out infinite;
}
@keyframes flowDown {
  0% { top: -60px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: calc(100% + 60px); opacity: 0; }
}
.tp-step {
  position: relative;
  padding: 6px 0;
  opacity: 0;
  transform: translateX(-20px);
  animation: slideIn 0.5s ease forwards;
}
.tp-step:nth-child(1) { animation-delay: 0.1s; }
.tp-step:nth-child(2) { animation-delay: 0.2s; }
.tp-step:nth-child(3) { animation-delay: 0.3s; }
.tp-step:nth-child(4) { animation-delay: 0.4s; }
@keyframes slideIn {
  to { opacity: 1; transform: translateX(0); }
}
.tp-step::before {
  content: attr(data-step);
  position: absolute;
  left: calc(-1 * (var(--tp-node-size) + 20px) + var(--tp-timeline-left));
  top: 50%;
  width: var(--tp-node-size);
  height: var(--tp-node-size);
  background: var(--tp-primary);
  color: var(--tp-dark);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--tp-font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  z-index: 2;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 20px rgba(10, 12, 0, 0.2);
  border: 3px solid var(--tp-dark);
}
.tp-step:hover::before {
  background: var(--tp-dark);
  color: var(--tp-white);
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 0 0 6px var(--tp-primary-dim), 0 8px 30px rgba(10, 12, 0, 0.3);
  border-color: var(--tp-white);
}
.tp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 160px;
  width: 100%;
  padding: 20px 20px 20px 24px;
  border: 2px solid var(--tp-dark);
  border-radius: var(--tp-radius);
  cursor: pointer;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background-color: var(--tp-primary);
  margin-left: 0;
  box-shadow: 0 4px 16px rgba(10, 12, 0, 0.12);
}
.tp-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 3px;
  background: var(--tp-dark);
  transform: translateX(-100%) translateY(-50%);
  opacity: 0.3;
}
.tp-card:hover {
  transform: translateX(8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(10, 12, 0, 0.15);
  border-color: var(--tp-white);
}
.tp-card:focus { outline: none; }
.tp-card:focus-visible {
  outline: 3px solid var(--tp-dark);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--tp-primary-dim);
}
.tp-card:active { transform: translateX(4px) scale(1.01); }
.tp-card--photo {
  background: var(--bg) center/cover no-repeat;
  height: 160px;
  width: 100%;
  justify-content: flex-end;
  padding: 20px 20px 20px 24px;
  border: 2px solid var(--tp-white);
}
.tp-card--photo::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 3px;
  background: var(--tp-white);
  transform: translateX(-100%) translateY(-50%);
  opacity: 0.5;
}
.tp-card--photo .tp-card-title {
  background: var(--tp-white);
  color: var(--tp-dark);
  padding: 14px 18px;
  border-radius: var(--tp-radius-pill);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9375rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.tp-card--photo .tp-card-title .tp-icon {
  background: var(--tp-dark-secondary);
  width: 36px;
  height: 36px;
  opacity: 0;
}
.tp-card--photo:hover .tp-card-title .tp-icon { opacity: 1; }
.tp-card--photo .tp-card-title .tp-icon svg { width: 18px; height: 18px; }
.tp-card--photo .tp-card-title .tp-plus { margin-left: auto; font-size: 1.5rem; }
.tp-card-top { display: flex; align-items: center; gap: 12px; }
.tp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--tp-dark);
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.tp-card:hover .tp-icon { transform: rotate(-10deg) scale(1.1); opacity: 1; }
.tp-icon svg { width: 22px; height: 22px; fill: var(--tp-white); }
.tp-plus {
  margin-left: auto;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  color: var(--tp-dark);
  background: rgba(10, 12, 0, 0.08);
  border-radius: 50%;
  opacity: 0.7;
  transition: all 0.3s ease;
}
.tp-card:hover .tp-plus {
  opacity: 1;
  background: var(--tp-dark);
  color: var(--tp-primary);
  transform: rotate(90deg);
}
.tp-card-title {
  font-family: var(--tp-font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  color: var(--tp-dark);
  letter-spacing: -0.01em;
}
.tp-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.tp-overlay[data-open] { opacity: 1; visibility: visible; }
.tp-popup {
  position: relative;
  width: 100%;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  background: var(--tp-primary);
  border-radius: var(--tp-radius);
  padding: 28px;
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  box-shadow: 0 20px 60px rgba(10, 12, 0, 0.2), 0 0 0 1px rgba(10, 12, 0, 0.05);
  border: 2px solid var(--tp-dark);
}
.tp-overlay[data-open] .tp-popup { transform: scale(1) translateY(0); opacity: 1; }
.tp-popup[data-color="purple"] { background: var(--tp-purple); }
.tp-popup[data-color="lime"] { background: var(--tp-primary); }
.tp-popup[data-color="photo"] {
  background: var(--bg) center/cover no-repeat;
  padding: 24px;
  overflow: hidden;
  border-color: var(--tp-white);
}
.tp-popup[data-color="photo"] .tp-popup-inner {
  background: var(--tp-white);
  padding: 24px;
  border-radius: var(--tp-radius);
  margin-top: 100px;
}
.tp-popup[data-color="photo"] .tp-popup-header { position: static; margin-bottom: 16px; }
.tp-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}
.tp-popup-header .tp-num {
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tp-white);
  border-radius: var(--tp-radius-pill);
  font-family: var(--tp-font-heading);
  font-weight: 600;
  color: var(--tp-dark);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--tp-dark);
}
.tp-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--tp-dark);
  color: var(--tp-white);
  border: 2px solid var(--tp-white);
  border-radius: 50%;
  font-size: 1.75rem;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}
.tp-close:hover { transform: scale(1.1) rotate(90deg); background: var(--tp-dark-secondary); }
.tp-close:focus { outline: none; }
.tp-close:focus-visible {
  outline: 3px solid var(--tp-primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(227, 255, 4, 0.3);
}
.tp-popup-title {
  font-family: var(--tp-font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--tp-dark);
  line-height: 1.25;
  color: var(--tp-dark);
  letter-spacing: -0.02em;
}
.tp-popup-content { font-size: 0.9375rem; line-height: 1.65; color: var(--tp-dark); }
.tp-popup-section { margin-bottom: 18px; }
.tp-popup-section:last-child { margin-bottom: 0; }
.tp-popup-label {
  font-family: var(--tp-font-body);
  font-weight: 700;
  margin: 0 0 4px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
.tp-popup-text { margin: 0; }
.tp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .tp-step, .tp-card, .tp-popup, .tp-overlay, .tp-icon, .tp-plus, .tp-close, .tp-steps::after {
    animation: none !important;
    transition: none !important;
  }
}
@media (max-width: 520px) {
  .tp { --tp-node-size: 44px; --tp-timeline-left: 22px; max-width: 100%; }
  .tp-steps { padding-left: calc(var(--tp-node-size) + 16px); }
  .tp-step::before { left: calc(-1 * (var(--tp-node-size) + 16px) + var(--tp-timeline-left)); font-size: 1rem; }
  .tp-card { height: 140px; padding: 16px 16px 16px 20px; }
  .tp-card::before { margin-left: -16px; width: 16px; }
  .tp-card--photo { height: 140px; }
  .tp-card-title { font-size: 1rem; }
  .tp-icon { width: 38px; height: 38px; }
  .tp-icon svg { width: 18px; height: 18px; }
  .tp-plus { width: 36px; height: 36px; font-size: 1.5rem; }
  .tp-popup { padding: 20px; }
  .tp-popup-header .tp-num, .tp-close { width: 48px; height: 48px; font-size: 1.25rem; }
  .tp-close { font-size: 1.5rem; }
  .tp-popup-title { font-size: 1.25rem; }
  .tp-popup[data-color="photo"] .tp-popup-inner { padding: 20px; margin-top: 60px; }
}
