/*
 * Tracking page result cards (resources/views/site/tracking.blade.php): Origin / Destination
 * with the state scene, the date cards and the "Paying for this shipment?" card.
 * Hand-written (not compiled from resources/site/scss); loaded only on /tracking.
 */

/* ---------- Origin / Destination ---------- */
.route-card {
   position: relative;
   display: flex;
   align-items: stretch;
   min-height: 150px;
   height: 100%;
   overflow: hidden;
   border-radius: 22px;
   background: #fff;
   border: 1px solid rgba(5, 34, 64, .06);
   box-shadow: 0 10px 30px rgba(5, 34, 64, .10);
}

.route-card__text {
   position: relative;
   z-index: 2;
   flex: 0 0 42%;
   display: flex;
   flex-direction: column;
   justify-content: center;
   padding: 22px 8px 22px 26px;
}

.route-card__text::before {
   content: "";
   position: absolute;
   left: 14px;
   top: 50%;
   width: 4px;
   height: 54px;
   transform: translateY(-50%);
   border-radius: 2px;
   background: var(--primary);
}

.route-card__label,
.date-card__label {
   margin: 0 0 2px;
   font-size: 14px;
   font-weight: 600;
   letter-spacing: .6px;
   text-transform: uppercase;
   color: var(--headings-color);
   line-height: 1.3;
}

.route-card__place {
   margin: 0;
   font-family: var(--font-family-headings);
   font-size: clamp(26px, 3.2vw, 36px);
   font-weight: 800;
   line-height: 1.1;
   letter-spacing: -.5px;
   color: var(--headings-color);
   overflow-wrap: anywhere;
}

.route-card__country {
   margin: 4px 0 0;
   font-size: 14px;
   color: var(--mute);
}

.route-card__art {
   position: absolute;
   inset: 0 0 0 auto;
   width: 62%;
}

.route-card__art img {
   display: block;
   width: 100%;
   height: 100%;
   object-fit: cover;
   object-position: 70% 60%;
}

.route-card__swoosh {
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   pointer-events: none;
}

.route-card__mask { fill: #fff; }

.route-card__edge {
   fill: none;
   stroke: var(--primary);
   stroke-width: 3px;
}

.route-card--plain .route-card__text { flex-basis: 100%; }

/* ---------- Shipped / Estimated Delivery / Delivered ---------- */
.date-card {
   display: flex;
   align-items: center;
   gap: 22px;
   height: 100%;
   padding: 22px 26px;
   border-radius: 22px;
   background: #fff;
   border: 1px solid rgba(5, 34, 64, .06);
   box-shadow: 0 10px 30px rgba(5, 34, 64, .10);
}

.date-card__icon {
   position: relative;
   flex: 0 0 auto;
   display: flex;
   align-items: center;
   justify-content: center;
   width: 64px;
   padding-right: 22px;
   font-size: 40px;
   color: var(--primary);
   border-right: 2px solid rgba(5, 34, 64, .25);
   box-sizing: content-box;
}

.date-card__value {
   margin: 0;
   font-family: var(--font-family-headings);
   font-size: clamp(24px, 2.6vw, 32px);
   font-weight: 800;
   line-height: 1.15;
   letter-spacing: -.4px;
   color: var(--headings-color);
}

.date-card__note {
   margin: 4px 0 0;
   font-size: 14px;
   color: var(--mute);
}

/* ---------- Paying for this shipment? ---------- */
.pay-card {
   position: relative;
   display: grid;
   grid-template-columns: minmax(0, 1fr) 260px;
   grid-template-areas: "body person" "btn person";
   column-gap: 12px;
   overflow: hidden;
   padding: 30px 0 30px 34px;
   border: 2px solid var(--primary);
   border-radius: 24px;
   background:
      radial-gradient(120% 70% at 30% 100%, rgba(228, 37, 44, .10), transparent 60%),
      linear-gradient(180deg, #fff 0%, #fdf1f1 100%);
   box-shadow: 0 14px 40px rgba(228, 37, 44, .12);
}

.pay-card__body { grid-area: body; position: relative; z-index: 2; }

.pay-card__title {
   display: flex;
   align-items: center;
   gap: 16px;
   margin: 0 0 14px;
   font-size: clamp(22px, 2.6vw, 30px);
   font-weight: 800;
   line-height: 1.15;
   color: var(--headings-color);
}

.pay-card__icon {
   flex: 0 0 auto;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   padding-right: 16px;
   font-size: 34px;
   color: var(--primary);
   border-right: 2px solid rgba(5, 34, 64, .3);
}

.pay-card__text {
   max-width: 560px;
   margin: 0 0 18px;
   font-size: 18px;
   line-height: 1.55;
   color: #1d2b3c;
}

.pay-card__secure {
   display: flex;
   align-items: center;
   gap: 14px;
   margin: 0 0 22px;
   font-size: 13px;
   font-weight: 600;
   letter-spacing: 1px;
   text-transform: uppercase;
   color: var(--headings-color);
}

.pay-card__shield {
   padding-right: 14px;
   font-size: 26px;
   color: var(--primary);
   border-right: 2px solid rgba(5, 34, 64, .3);
}

.pay-card__person {
   grid-area: person;
   align-self: end;
   position: relative;
   z-index: 1;
   margin: -10px 0 -30px;
}

.pay-card__person img {
   display: block;
   width: 100%;
   height: auto;
   -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent);
   mask-image: linear-gradient(180deg, #000 82%, transparent);
}

.pay-card__btn {
   grid-area: btn;
   position: relative;
   z-index: 3;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 12px;
   max-width: 560px;
   padding: 18px 28px;
   border-radius: 999px;
   background: linear-gradient(180deg, #ee3a40 0%, #c4141b 100%);
   box-shadow: 0 12px 26px rgba(196, 20, 27, .35), inset 0 1px 0 rgba(255, 255, 255, .25);
   color: #fff;
   font-size: 22px;
   font-weight: 800;
   transition: transform .2s ease, box-shadow .2s ease;
}

.pay-card__btn i { font-size: 18px; transform: rotate(-45deg); }

.pay-card__btn:hover,
.pay-card__btn:focus-visible {
   color: #fff;
   transform: translateY(-2px);
   box-shadow: 0 16px 32px rgba(196, 20, 27, .42), inset 0 1px 0 rgba(255, 255, 255, .25);
}

@media (max-width: 767.98px) {
   .route-card { min-height: 130px; }
   .route-card__text { padding-left: 24px; }
   .route-card__art { width: 60%; }

   .date-card { padding: 18px 20px; gap: 18px; }
   .date-card__icon { width: 48px; font-size: 32px; padding-right: 18px; }

   /* Text runs full width above the photo; she stands in the bottom-right corner,
      gesturing towards the copy, with the button laid over her waist line. */
   .pay-card {
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas: "body" "btn";
      padding: 24px 20px 22px;
   }

   .pay-card__body { padding-right: 34%; min-height: 230px; }
   .pay-card__text { font-size: 16px; }
   .pay-card__secure { font-size: 11px; gap: 10px; letter-spacing: .6px; }
   .pay-card__shield { font-size: 22px; padding-right: 10px; }

   .pay-card__person {
      position: absolute;
      right: -6px;
      bottom: 64px;
      width: 40%;
      max-width: 220px;
      margin: 0;
   }

   .pay-card__btn { max-width: none; font-size: 20px; padding: 16px 24px; }
}

@media (max-width: 380px) {
   .pay-card__body { padding-right: 30%; }
   .pay-card__title { gap: 10px; }
   .pay-card__icon { font-size: 26px; padding-right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
   .pay-card__btn { transition: none; }
}

@media print {
   .pay-card { display: none; }
}
