<script lang="ts">
  export let feature: {
    routeName: string;
    routeId: string;
  };
</script>

<div class="link-wrapper">
  <a href="/map/{feature.routeId}" class="wide-button">
    <div class="accent-bar"></div>
    <div class="content">
      <span class="sub-text">Continue to next map</span>
      <span class="main-text">{feature.routeName}</span>
    </div>
    <div class="icon">
      <svg viewBox="0 0 24 24" width="20" height="20">
        <path d="M5 12h14M12 5l7 7-7 7" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
      </svg>
    </div>
  </a>
</div>

<style>
  .link-wrapper {
    position: relative;
    z-index: 100;
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .wide-button {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  }

  .accent-bar {
    width: 6px;
    align-self: stretch;
    background: #475569;
  }

  .content {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .sub-text {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
  }

  .main-text {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
  }

  .icon {
    padding-right: 20px;
    color: #cbd5e1;
    transition: transform 0.2s ease;
  }


  .wide-button:hover {
    border-color: #94a3b8;
    background: #f8fafc;
  }

  .wide-button:hover .icon {
    color: #475569;
    transform: translateX(4px);
  }

  .wide-button:active {
    transform: scale(0.98);
    background: #f1f5f9;
  }
</style>