<template>
  <div class="taxi-skeleton glass-effect" aria-hidden="true">
    <div class="sk-top">
      <div class="sk-avatar"></div>
      <div class="sk-info">
        <div class="sk-line sk-name"></div>
        <div class="sk-line sk-meta"></div>
      </div>
    </div>
    <div class="sk-chips">
      <div class="sk-chip"></div>
      <div class="sk-chip sk-chip--sm"></div>
    </div>
    <div class="sk-btn"></div>
  </div>
</template>

<style scoped>
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.sk-base {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--border-color) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 0.5rem;
}

.taxi-skeleton {
  border-radius: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--card-bg);
}

.sk-top {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sk-avatar {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  flex-shrink: 0;
  composes: sk-base;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--border-color) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

.sk-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sk-line {
  border-radius: 0.375rem;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--border-color) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

.sk-name {
  height: 16px;
  width: 60%;
}

.sk-meta {
  height: 12px;
  width: 40%;
}

.sk-chips {
  display: flex;
  gap: 0.5rem;
}

.sk-chip {
  height: 28px;
  width: 90px;
  border-radius: 0.75rem;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--border-color) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

.sk-chip--sm {
  width: 70px;
}

.sk-btn {
  height: 48px;
  border-radius: 1.125rem;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--border-color) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}

@media (prefers-reduced-motion: reduce) {
  .sk-avatar, .sk-line, .sk-chip, .sk-btn {
    animation: none;
    background: var(--bg-secondary);
  }
}
</style>
