/* linklink-components.css */

/* Base safety */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Page */
.ll-page {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--ll-bg);
  color: var(--ll-text);
  overflow-x: hidden;
}

.ll-background {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100vw;
  max-width: 100vw;
  min-height: 100vh;
  overflow: hidden;
  pointer-events: none;
}

.ll-wave-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 1;
  pointer-events: none;
}

/* Main shell */
.ll-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 500px;
  min-width: 0;
  margin: 0 auto;
  padding: 16px;
  overflow-x: hidden;
}

/* Cover image */
.ll-cover-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--ll-radius);
}

.ll-cover {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--ll-radius);
  display: block;
}

/* Profile */
.ll-profile {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 12px;
  text-align: center;
}

.ll-avatar-wrap {
  width: 108px;
  max-width: 108px;
  margin: 0 auto;
}

.ll-avatar {
  width: 108px;
  height: 108px;
  max-width: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--ll-border);
  margin: 0 auto;
}

.ll-name {
  margin: 12px 0 4px;
  font-size: 1.4rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  color: var(--ll-name-color, var(--ll-text));
  -webkit-text-stroke: 0 transparent;
  text-shadow: var(--ll-name-stroke-shadow, 1px 1px 2px rgba(51, 51, 51, 0.75));
}

.ll-title,
.ll-profile-text,
.ll-description {
  max-width: 100%;
  color: var(--ll-muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Social buttons */
.ll-social-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 16px;
}

.ll-social-link {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--ll-border) 70%, rgba(255, 255, 255, 0.35) 30%);
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.16) 0%,
      rgba(255,255,255,0.08) 100%
    ),
    color-mix(in srgb, var(--ll-card-bg) 92%, transparent);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 0 0 1px rgba(255,255,255,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.ll-social-link:hover,
.ll-social-link:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255,255,255,0.34),
    0 0 0 1px rgba(255,255,255,0.08);
}

.ll-social-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ll-accent) 62%, #ffffff 38%);
  outline-offset: 2px;
}

.ll-social-link:active {
  transform: translateY(1px) scale(0.98);
}

.ll-social-link > svg,
.ll-social-link .ll-social-icon svg {
  width: 30px;
  height: 30px;
  display: block;
  flex: 0 0 auto;
}

.ll-social-link--website > svg {
  width: 32px;
  height: 32px;
  color: var(--ll-link-text, var(--ll-card-text));
}

.ll-social-link--contact > svg {
  width: 28px;
  height: 32px;
}

button.ll-social-link {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid color-mix(in srgb, var(--ll-border) 70%, rgba(255,255,255,0.35) 30%);
  cursor: pointer;
  font: inherit;
}

/* AI Chat */
.ll-chat-section {
  width: 100%;
  margin-top: 22px;
  margin-bottom: 18px;
}

.ll-chat-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 88px;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.14) 0%,
      rgba(255,255,255,0.07) 18%,
      rgba(255,255,255,0.03) 100%
    ),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--ll-link-bg) 78%, #ffffff 22%) 0%,
      color-mix(in srgb, var(--ll-accent) 84%, var(--ll-link-bg) 16%) 100%
    );
  color: var(--ll-link-text);
  padding: 18px 26px;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.01em;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.16) inset,
    0 0 28px rgba(255,255,255,0.16),
    0 0 52px color-mix(in srgb, var(--ll-accent) 34%, transparent),
    0 18px 42px rgba(0,0,0,0.34);
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ll-chat-toggle:hover,
.ll-chat-toggle:focus-visible {
  transform: translateY(-3px);
  filter: brightness(1.05) saturate(1.05);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.22) inset,
    0 0 36px rgba(255,255,255,0.20),
    0 0 68px color-mix(in srgb, var(--ll-accent) 44%, transparent),
    0 24px 52px rgba(0,0,0,0.42);
}

.ll-chat-toggle:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ll-accent) 62%, #ffffff 38%);
  outline-offset: 3px;
}

.ll-chat-toggle:active {
  transform: translateY(1px) scale(0.995);
  box-shadow:
    0 0 28px color-mix(in srgb, var(--ll-accent) 30%, transparent),
    0 0 54px color-mix(in srgb, var(--ll-accent) 14%, transparent),
    inset 0 1px 0 rgba(255,255,255,0.22),
    inset 0 0 0 2px rgba(255,255,255,0.10);
}

.ll-chat-toggle__icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.26), rgba(255,255,255,0.08) 60%, rgba(255,255,255,0.03) 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.35),
    0 0 24px rgba(255,255,255,0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ll-link-text, #ffffff);
}

.ll-ai-chat-icon {
  width: 38px;
  height: 38px;
  display: block;
  color: var(--ll-link-text, #ffffff);
}

.ll-chat-toggle__label {
  flex: 1 1 auto;
  text-align: left;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ll-chat-toggle__arrow {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 0;
  line-height: 0;
  color: var(--ll-link-text, var(--ll-card-text));
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.14) 0%,
      rgba(255,255,255,0.08) 100%
    );
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.26),
    0 0 18px rgba(255,255,255,0.08);
}

.ll-chat-toggle__help-svg {
  display: block;
  width: 28px;
  height: 28px;
}

.ll-chat-panel {
  margin-top: 10px;
  border: 1px solid var(--ll-border);
  background: var(--ll-card-bg);
  border-radius: 12px;
  padding: 10px;
}

.ll-chat-messages {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 4px;
}

.ll-chat-message {
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.5;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.ll-chat-message-ai {
  background: var(--ll-link-bg);
  color: var(--ll-link-text);
  align-self: flex-start;
}

.ll-chat-message-user {
  background: var(--ll-accent);
  color: var(--ll-card-bg);
  align-self: flex-end;
}

.ll-chat-form {
  margin-top: 10px;
}

.ll-chat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--ll-muted);
  margin-bottom: 6px;
}

.ll-chat-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ll-chat-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--ll-border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #111;
}

.ll-chat-submit {
  flex: 0 0 auto;
  border: 1px solid var(--ll-border);
  border-radius: 10px;
  background: var(--ll-link-bg);
  color: var(--ll-link-text);
  padding: 10px 12px;
  font-weight: 700;
}

/* Link cards */
.ll-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 18px;
}

.ll-link-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: var(--ll-link-bg);
  color: var(--ll-link-text);
  border: 1px solid color-mix(in srgb, var(--ll-border) 72%, transparent);
  border-radius: 16px;
  text-decoration: none;
  overflow: hidden;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255,255,255,0.10);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.ll-link-card:hover,
.ll-link-card:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.03);
  color: var(--ll-link-text);
  text-decoration: none;
  box-shadow:
    0 14px 28px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255,255,255,0.14);
}

.ll-link-card:active {
  transform: translateY(1px) scale(0.99);
}

.ll-link-card--text {
  display: block;
  padding: 16px 18px;
  text-align: left;
}

.ll-link-card--text .ll-link-body {
  display: block;
}

.ll-link-card--image {
  display: block;
  padding: 0;
}

.ll-link-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: color-mix(in srgb, var(--ll-card-bg) 82%, #ffffff 18%);
}

.ll-link-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ll-link-card--image .ll-link-body {
  display: block;
  padding: 14px 16px 16px;
  text-align: center;
}

.ll-link-card--icon {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 14px 16px;
  text-align: left;
}

.ll-link-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.08)),
    color-mix(in srgb, var(--ll-card-bg) 82%, transparent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ll-link-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.ll-link-icon .ll-inline-svg-icon {
  width: 44px;
  height: 44px;
  display: block;
}

.ll-link-icon .ll-inline-svg-icon--youtube {
  width: 52px;
  height: auto;
  max-width: 52px;
}

.ll-link-icon .ll-inline-svg-icon path[fill="currentColor"] {
  color: var(--ll-link-text, var(--ll-card-text));
}

.ll-link-icon-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  line-height: 1;
}

.ll-link-body {
  min-width: 0;
  flex: 1 1 auto;
}

.ll-link-title {
  display: block;
  max-width: 100%;
  font-weight: 800;
  line-height: 1.45;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.ll-link-description {
  display: block;
  max-width: 100%;
  margin-top: 3px;
  opacity: 0.88;
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* vCard modal */
.is-vcard-modal-open {
  overflow: hidden;
}

.ll-vcard-modal[hidden] {
  display: none !important;
}

.ll-vcard-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  width: 100vw;
  height: 100vh;
}

.ll-vcard-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.ll-vcard-modal__dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(92vw, 430px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  background: #ffffff;
  color: #111827;
  border-radius: 20px;
  padding: 24px 20px 20px;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.ll-vcard-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #111827;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ll-vcard-modal__title {
  margin: 0 44px 12px 0;
  color: #0f172a;
  font-size: 1.22rem;
  line-height: 1.45;
  font-weight: 900;
}

.ll-vcard-modal__lead,
.ll-vcard-modal__note {
  color: #334155;
  font-size: 0.94rem;
  line-height: 1.75;
}

.ll-vcard-modal__download {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  color: #ffffff;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  box-shadow:
    0 14px 28px rgba(20, 184, 166, 0.32),
    inset 0 1px 0 rgba(255,255,255,0.28);
}

.ll-vcard-modal__download:hover,
.ll-vcard-modal__download:focus-visible {
  color: #ffffff;
  text-decoration: none;
}

.ll-vcard-modal__platforms {
  margin-top: 18px;
}

.ll-vcard-modal__platform {
  padding: 14px 14px 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.ll-vcard-modal__platform + .ll-vcard-modal__platform {
  margin-top: 12px;
}

.ll-vcard-modal__platform h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
}

.ll-vcard-modal__platform ol {
  margin: 0;
  padding-left: 1.2em;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.75;
}

.ll-vcard-modal__platform li + li {
  margin-top: 6px;
}

.ll-vcard-modal__note {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.65;
}

/* Mobile */
@media (max-width: 500px) {
  .ll-shell {
    width: 100%;
    max-width: 100%;
    padding: 12px;
  }

  .ll-cover-wrap,
  .ll-cover,
  .ll-link-card {
    border-radius: 12px;
  }
}

@media (max-width: 390px) {
  .ll-shell {
    padding: 10px;
  }

  .ll-name {
    font-size: 1.25rem;
  }

  .ll-social-row {
    gap: 10px;
  }

  .ll-social-link {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .ll-social-link > svg,
  .ll-social-link .ll-social-icon svg {
    width: 27px;
    height: 27px;
  }

  .ll-social-link--website > svg {
    width: 29px;
    height: 29px;
  }

  .ll-chat-toggle {
    min-height: 76px;
    padding: 14px 16px;
    gap: 12px;
    font-size: 1rem;
  }

  .ll-chat-toggle__icon {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .ll-ai-chat-icon {
    width: 32px;
    height: 32px;
  }

  .ll-chat-toggle__arrow {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .ll-chat-toggle__help-svg {
    width: 25px;
    height: 25px;
  }

  .ll-chat-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ll-chat-submit {
    width: 100%;
  }

  .ll-link-card--text {
    padding: 14px 16px;
  }

  .ll-link-card--icon {
    min-height: 80px;
    padding: 12px 14px;
    gap: 13px;
  }

  .ll-link-icon {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    border-radius: 14px;
  }

  .ll-link-icon img {
    width: 40px;
    height: 40px;
  }

  .ll-link-icon .ll-inline-svg-icon {
    width: 40px;
    height: 40px;
  }

  .ll-link-icon .ll-inline-svg-icon--youtube {
    width: 47px;
    height: auto;
    max-width: 47px;
  }

  .ll-link-title {
    font-size: 0.96rem;
  }

  .ll-link-description {
    font-size: 0.86rem;
  }

  .ll-vcard-modal__dialog {
    width: min(92vw, 390px);
    padding: 22px 18px 18px;
    border-radius: 18px;
  }

  .ll-vcard-modal__title {
    font-size: 1.08rem;
    margin-right: 42px;
  }
}