
/* MATCH PAGE */
.matchPage {
    width: 100%;
    padding: 24px;
}

/* ANIMAL SELECTOR */
.animalSelector {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 420px;
    margin: 0 auto;
    margin-top: -24px;
}

.animalSelectorItem {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    opacity: 0.6;
}

.animalSelectorItem img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid transparent;
}

.animalSelectorItem.active {
    opacity: 1;
}

.animalSelectorItem.active img {
    border-color: white;
}

.animalSelectorName {
    margin: 0;
    font-size: 12px;
}

/* STACK */
.cardStack {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 520px;
    margin: 12px auto 0 auto;
}

/* CARDS */
.matchCard {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: 24px;
    overflow: hidden;
    background: white;

    transform: scale(1);
}

/* BACK CARD (STACK EFFECT) */
.backCard {
    position: absolute;
    top: 42px;
    left: 0;
    transform: scale(0.88);
    /* turquoise → dark → slightly lighter fade */
    background: linear-gradient(
        155deg,
        #000c0c 0%,
        #070d0d 55%,
        #394e4e 100%
    );
    z-index: 0;
}

/* FRONT CARD */
.cardStack .matchCard:not(.backCard) {
    z-index: 2;
}

/* IMAGE */
.matchImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* DARK GRADIENT */
.matchGradient {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75),
        rgba(0,0,0,0)
    );
}

/* OWNER AVATAR */
.matchOwnerAvatar {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    outline: 2px solid #65E3E6;
    border: 2px solid white;
    object-fit: cover;
}

/* INFO */
.matchInfo {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    color: white;
}

/* NAME */
.matchName {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

/* SUB */
.matchSub {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
}

/* TAGS */
.matchTags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.matchTag {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    color: white;
}

/* ACTIONS */
.matchActions {
    display: flex;
    justify-content: center;
    gap: 24px;
}

/* CIRCLE BUTTON */
.circleBtn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* COLORS */
.redBtn {
    background: #faaea7;
}

.greenBtn {
    background: #65E3E6;
}

/* SLIDER */
.slider {
    width: 100%;
    accent-color: #00696B;
    margin-top: 12px;
}

/* AGE RANGE */
.ageRange {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* FILTER TAG */
.filterTag {
    background: #F3F9FF;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: #00696B;
}

/* APPLY BUTTON FIXED BOTTOM */
.applyContainer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 500px;
}


/* MATCH VISUAL WRAPPER */
.matchVisual {
    position: relative;
    width: 100%;
    max-width: 420px;
    height: 240px;
    margin: 24px auto 0 auto;
}

/* CIRCLES */
.matchCircle {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;

    border: 4px solid white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.matchCircle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* DIAGONAL POSITIONING */
.circleTop {
    top: 0px;
    left: 40px;
}

.circleBottom {
    bottom: 0px;
    right: 40px;
}

/* HEART CENTER */
.matchHeart {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 64px;
    height: 64px;
    border-radius: 50%;

    background: #D24E42;
    border: 4px solid white;

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.matchHeart img {
    width: 26px;
}

.swipeCard {
    position: absolute;
    width: 100%;
    height: 520px;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
    touch-action: none;
}

/* effet drag */
.swipeCard.dragging {
    transition: none;
    cursor: grabbing;
}

.cardStack .matchCard[data-match-target="card"] {
    position: absolute;
    inset: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    will-change: transform, opacity;
}

.matchCard.swipeRight {
    transform: translateX(120%) rotate(14deg);
    opacity: 0;
}

.matchCard.swipeLeft {
    transform: translateX(-120%) rotate(-14deg);
    opacity: 0;
}

.matchActions[hidden],
[data-match-target="empty"][hidden] {
    display: none;
}

/* MATCH MODAL */
body.modalOpen {
    overflow: hidden;
}

.matchModalOverlay {
    position: fixed;
    inset: 0;
    z-index: 1100; /* above .navbar (1000) and .bottomNav */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
}

.matchModalOverlay[hidden] {
    display: none;
}

.matchModal {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    height: 100%;
    max-height: 820px;
    padding: 16px 24px 32px 24px;
    background: linear-gradient(160deg, #eef7f6 0%, #ffffff 45%, #fbeee7 100%);
    border-radius: 24px;
    overflow-y: auto;
}

.matchModalConfetti {
    height: 10px;
    flex-shrink: 0;
    border-radius: 6px;
    opacity: 0.85;
    background: repeating-linear-gradient(90deg,
        #f2a48a 0 12px, transparent 12px 20px,
        #65e3e6 20px 30px, transparent 30px 38px,
        #f7c948 38px 48px, transparent 48px 58px,
        #00696B 58px 66px, transparent 66px 78px,
        #faaea7 78px 90px, transparent 90px 100px);
}

.matchModalHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.matchModalClose {
    border: none;
    background: none;
    padding: 0;
    font-size: 18px;
    color: #1f2d2d;
    cursor: pointer;
}

.matchModalKicker {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #00696B;
}

.matchModalHeaderSpacer {
    width: 52px;
}

.matchModalPhotos {
    position: relative;
    height: 300px;
    margin: 32px 0 16px 0;
    flex-shrink: 0;
}

.matchModalPhoto {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.matchModalPhotoLeft {
    top: 0;
    left: 8%;
}

.matchModalPhotoRight {
    top: 120px;
    right: 8%;
}

.matchModalHeart {
    position: absolute;
    top: 92px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f2784b;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.matchModalHeart img {
    width: 32px;
}

.matchModalTitle {
    margin: 24px 0 0 0;
    text-align: center;
    font-size: 30px;
    color: #1f2d2d;
}

.matchModalText {
    margin: 16px 0 0 0;
    text-align: center;
    font-size: 18px;
    color: #4a5a5a;
}

.matchModalActions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 32px;
}


/* MATCHES */

.matchesScroll {
    display: flex;
    gap: 16px;
    overflow:scroll;
    padding-bottom: 8px;

    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.matchesScroll::-webkit-scrollbar {
    display: none;
}

.matchPreviewCard {
    min-width: 90px;
    text-decoration: none;
    color: inherit;
}

.matchPreviewImages {
    position: relative;
    width: fit-content;
    margin: 0 auto;
}

.matchPetAvatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;

    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.matchOwnerMiniAvatar {
    position: absolute;

    right: -2px;
    bottom: -2px;

    width: 28px;
    height: 28px;

    border-radius: 50%;
    object-fit: cover;

    border: 2px solid #65E3E6;
    background: white;
}

.matchPreviewName {
    margin-top: 10px;
    font-size: 12px;
    text-align: center;
}

/* MATCH EVENT */

.matchEvent {
    text-align: center;
    margin-bottom: 32px;
}

.matchEventLogo {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.matchEventTitle {
    font-weight: 700;
    margin-top: 12px;
}

.matchEventText {
    font-size: 14px;
    margin-top: 8px;
}
