/* Match page */

.page-match__mobile-header {
  display: none;
}

.page-match {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-top: 1.5rem;
  padding-bottom: 0;
  background: #fff;
}

.page-match__tabs-wrap {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #c5d5e0;
}

.page-match__tabs-inner {
  padding-bottom: 0;
}

.page-match__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.page-match__body {
  flex: 1;
  min-height: 0;
  padding-bottom: 2.5rem;
}

.page-match__body--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-match__tabs {
  display: flex;
  align-items: flex-end;
  gap: 2.5rem;
}

.page-match__tab {
  position: relative;
  margin: 0 0 -1px;
  padding: 0px 30px 12px 30px;
  border: none;
  border-bottom: 4px solid transparent;
  background: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  color: #9eb3c2;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

.page-match__tab:hover:not(.is-active) {
  color: #679fb8;
}

.page-match__tab.is-active {
  font-weight: 600;
  color: #34789b;
  border-bottom: 4px solid #34789b;
}

.match-grid {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

@media (min-width: 992px) and (max-width: 1149.98px) {
  .page-match .match-grid > [class*='col-'] {
    flex: 0 0 auto;
    width: 50%;
    max-width: 50%;
  }
}

/* Empty state */
.match-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 2rem 1.5rem 3rem;
  text-align: center;
  font-size: 54px;
}

.match-empty__icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  background: #e8f4fc;
}

.match-empty__icon {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.match-empty__emoji {
  display: block;
  font-size: 54px;
  line-height: 1;
}

.match-empty__title {
  margin: 0 0 0.75rem;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  color: #122a32;
}

.match-empty__text {
  max-width: 520px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-muted);
}

/* Match card */
.match-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 160px;
  padding: 20px;
  border: 0.5px solid var(--color-border);
  border-radius: 10px;
  background: #f7fdff;
  cursor: pointer;
}

.match-card__photo {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.match-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 120px;
}

.match-card__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.match-card__name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: #122a32;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-card__title-row img {
  flex-shrink: 0;
}

.match-card__location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  margin: 15px 0 18px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #ffe6b8;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
}

.match-card__location img {
  flex-shrink: 0;
}

.match-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 0;
}

.match-card__actions--single .match-card__btn {
  flex: 0 0 70%;
  width: 70%;
  max-width: 70%;
  border: none;
  background: #ff207a;
  color: #fff;
}

.match-card__actions--single .match-card__btn:hover {
  background: #e01a6d;
  color: #fff;
}

.match-card__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.match-card__btn--primary {
  border: none;
  background: var(--color-primary);
  color: #fff;
}

.match-card__btn--primary:hover {
  background: #e01a6d;
  color: #fff;
}

.match-card__btn--ghost {
  border: 1px solid var(--color-primary);
  background: #fff;
  color: var(--color-primary);
}

.match-card__btn--ghost:hover {
  background: rgba(255, 32, 122, 0.06);
}

@media (max-width: 599.98px) {
  .page-shell:has(.page-match) > header {
    display: none;
  }

  .page-match__mobile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 64px;
    min-height: 64px;
    background: #f2ccb3;
  }

  .page-match__mobile-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #122a32;
  }

  .page-match {
    padding-top: 0;
    background: #F7FDFF;
  }

  .page-match__tabs-wrap {
    margin-bottom: 0;
    background: #fff;
    border-bottom: none;
  }

  .page-match__tabs-inner {
    max-width: 600px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    border-top: solid 2px #34789b;
  }

  .page-match__inner {
    max-width: 600px;
    margin: 0 auto;
    padding-top: 12px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-match__tabs {
    gap: 0;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0;
    padding-top: 0;
    border-bottom: none;
  }

  .page-match__tab {
    flex: 1;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    height: 48px;
    padding: 0 4px;
    border-top: 4px solid transparent;
    border-bottom: none;
    background: #fff;
    font-size: 14px;
    text-align: center;
  }

  .page-match__tab.is-active {
    border-top: 4px solid #34789b;
    border-bottom: none;
    background: #F7FDFF;
  }

  .page-match__body {
    padding-bottom: 1.5rem;
  }

  .match-grid {
    --bs-gutter-x: 0;
    --bs-gutter-y: 12px;
  }

  .match-card {
    height: auto;
    min-height: 140px;
    padding: 16px;
    background: #fff;
    border: 0.5px solid #c5d5e0;
    box-shadow: 0 1px 4px rgba(25, 92, 147, 0.06);
  }

  .match-card__photo {
    width: 100px;
    height: 100px;
    border-radius: 8px;
  }

  .match-card__body {
    min-height: 100px;
  }

  .match-card__name {
    font-size: 15px;
  }

  .match-card__location {
    margin: 4px 0 12px;
  }

  .match-card__actions {
    margin-top: auto;
    justify-content: flex-end;
  }

  .match-card__btn {
    flex: 0 0 auto;
    min-width: calc(50% - 4px);
  }

  .match-card__actions--single {
    justify-content: flex-start;
  }

  .match-card__actions--single .match-card__btn {
    flex: 0 0 70%;
    width: 70%;
    min-width: 70%;
    max-width: 70%;
  }
}

.its-a-match {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 32px;
  background: #fff url('../images/profile_bg.png') no-repeat center center / cover;
}

.its-a-match__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 362px;
  text-align: center;
}

.its-a-match__photos {
  position: relative;
  width: 340px;
  height: 360px;
  margin-bottom: 28px;
}

.its-a-match__photo {
  position: absolute;
  top: 18px;
  width: 199px;
  height: 254px;
  object-fit: cover;
  border-radius: 20px;
  background: #efe6d6;
  box-shadow: 6px 6px 0 0 #34789b;
}

.its-a-match__photo--left {
  left: 0;
  z-index: 0;
  transform: rotate(-8deg);
  box-shadow: 6px 6px 0 0 #ff207a;
}

.its-a-match__photo--right {
  top: 75px;
  left: 131px;
  z-index: 0;
  transform: rotate(8deg);
}

.its-a-match__heart {
  position: absolute;
  top: 52px;
  left: 47%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #f7fdff;
  box-shadow: 0 4px 6px rgba(27, 27, 27, 0.16);
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
}

.its-a-match__heart::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: #f7fdff;
  filter: blur(6px);
}

.its-a-match__title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary);
}

.its-a-match__text {
  max-width: 260px;
  margin: 0 0 28px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
  color: #34789b;
}

.its-a-match__message {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 362px;
  max-width: 100%;
  height: 52px;
  padding: 0 24px;
  border: none;
  border-radius: 12px;
  background: var(--color-primary);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  cursor: pointer;
}

.its-a-match__message:hover {
  background: #e01a6d;
}

.its-a-match__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-top: 30px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.its-a-match__close img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

@media (max-width: 599.98px) {
  .its-a-match__title {
    font-size: 28px;
  }
}

@media (max-width: 359.98px) {
  .its-a-match__photos {
    width: 260px;
    height: 250px;
  }

  .its-a-match__photo {
    width: 156px;
    height: 200px;
  }

  .its-a-match__heart {
    top: 40px;
  }
}
