/* ── component-explore (shared) ── */

.portfolio-builder-trigger {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 450;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 14px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(42, 42, 42, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgb(255, 255, 255);
  transition: background 0.2s ease;
  isolation: isolate;
}

.portfolio-builder-trigger::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 100px;
  border: 1.5px solid rgba(100, 160, 255, 0.5);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.25s ease;
}

.portfolio-builder-trigger:hover::after {
  opacity: 1;
  animation: explore-stroke-breathe 2s ease-in-out infinite;
}

@keyframes explore-stroke-breathe {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(100, 160, 255, 0.35);
    box-shadow: 0 0 3px rgba(100, 160, 255, 0.1);
  }
  50% {
    transform: scale(1.03);
    border-color: rgba(167, 139, 250, 0.95);
    box-shadow: 0 0 8px rgba(100, 160, 255, 0.35);
  }
}

.portfolio-builder-trigger:hover {
  background: rgba(58, 58, 58, 0.95);
}

.portfolio-builder-trigger i {
  font-size: 16px;
  line-height: 1;
}

.portfolio-builder-modal {
  position: fixed;
  inset: 0;
  z-index: 4500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.portfolio-builder-modal.is-open {
  opacity: 1;
  pointer-events: all;
}

.portfolio-builder-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.portfolio-builder-panel {
  position: relative;
  width: min(560px, 100%);
  height: min(435px, calc(100vh - 3rem));
  max-height: min(435px, calc(100vh - 3rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(32, 32, 32, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.portfolio-builder-modal.is-open .portfolio-builder-panel {
  transform: translateY(0) scale(1);
}

.portfolio-builder-esc {
  flex-shrink: 0;
  border: none;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-darkmode-dim);
  padding: 4px 8px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: lowercase;
  pointer-events: none;
}

.explore-panel-header {
  flex-shrink: 0;
  padding: 0 16px;
}

.explore-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px 8px;
}

.explore-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
}

.explore-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: var(--text-darkmode-dim);
}

.explore-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-dark);
  padding: 0;
  margin: 0;
  outline: none;
}

.explore-search-input::placeholder {
  color: var(--text-darkmode-dim);
}

.explore-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.explore-search i {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.explore-search-label {
  margin: 0;
  color: var(--text-darkmode-dim);
  line-height: 1;
}

.explore-section + .explore-section {
  margin-top: 22px;
}

.explore-section.is-empty {
  display: none;
}

.explore-no-results {
  display: none;
  padding: 12px;
  color: var(--text-darkmode-dim);
  text-align: center;
}

.explore-no-results.is-visible {
  display: block;
}

.explore-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 -16px 0;
}

.explore-actions {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: calc(100% + 16px);
  margin: 0 -8px;
  padding-top: 16px;
}

.explore-section-label {
  margin: 0 0 4px;
  padding: 0 12px;
  color: var(--text-darkmode-dim);
}

.explore-action.is-filtered-out {
  display: none;
}

.explore-action {
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 12px;
  margin: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.explore-action:hover {
  background: rgba(255, 255, 255, 0.06);
}

.explore-action-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(245, 245, 245, 0.55);
}

.explore-action-icon i {
  font-size: 18px;
  line-height: 1;
}

.explore-action-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.explore-action-title {
  color: var(--text-dark);
  margin: 0;
  line-height: 1.15;
}

.explore-action-desc {
  color: var(--text-darkmode-dim);
  margin: 0;
  line-height: 1.2;
}

.explore-action--passport {
  position: relative;
  margin-bottom: 8px;
  background: linear-gradient(
    135deg,
    rgba(88, 28, 135, 0.22),
    rgba(59, 130, 246, 0.14),
    rgba(236, 72, 153, 0.12),
    rgba(167, 139, 250, 0.18)
  );
  background-size: 300% 300%;
  animation: explore-passport-fill 6s ease infinite;
}

.explore-action--passport:hover {
  background: linear-gradient(
    135deg,
    rgba(88, 28, 135, 0.22),
    rgba(59, 130, 246, 0.14),
    rgba(236, 72, 153, 0.12),
    rgba(167, 139, 250, 0.18)
  );
  background-size: 300% 300%;
  animation: explore-passport-fill 4s ease infinite;
}

.explore-action--passport .explore-action-icon {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.35), rgba(96, 165, 250, 0.28));
  color: #ddd6fe;
}

.explore-action--passport .explore-action-title {
  background: linear-gradient(90deg, #ddd6fe, #bae6fd, #f5d0fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.explore-action--passport .explore-action-desc {
  color: rgba(196, 181, 253, 0.7);
}

@keyframes explore-passport-fill {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.component-explore .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .portfolio-builder-trigger {
    top: 16px;
    right: 16px;
    padding: 9px 14px 9px 12px;
  }

  .portfolio-builder-trigger span {
    display: none;
  }
}
