/**
 * OF Fountain — Tinder Mode Styles
 *
 * Fullscreen overlay that sits on top of the existing page content.
 * The original grid HTML remains untouched underneath.
 * Fonts inherited from the active theme via CSS variable set by tinder.js.
 */

/* --- Body lock when Tinder mode is active --- */
body.ofn-tinder-active {
    overflow: hidden;
}

/* --- Fullscreen Overlay --- */
#ofn-tinder-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

/* --- Card Container --- */
.ofn-tinder-container {
    position: relative;
    width: 380px;
    max-width: calc(100vw - 32px);
}

/* --- Shadow Card (next card peek) --- */
.ofn-tinder-shadow {
    position: absolute;
    top: 8px;
    left: 6px;
    right: 6px;
    bottom: 0;
    background: #0d0d0d;
    border-radius: 16px;
    z-index: 1;
    transform: scale(0.97);
    opacity: 0.5;
}

/* --- Main Card --- */
.ofn-tinder-card {
    position: relative;
    z-index: 10;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    will-change: transform, opacity;
}

/* --- Photo Section --- */
.ofn-tinder-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #1a1a1a;
}

.ofn-tinder-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ofn-tinder-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.15) 40%,
        transparent 60%
    );
    pointer-events: none;
}

/* --- PROMOTED Badge --- */
.ofn-tinder-promoted {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 5;
}

/* --- Photo Info Overlay --- */
.ofn-tinder-photo-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 20px 18px;
    z-index: 5;
}

.ofn-tinder-activity {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
}

.ofn-tinder-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #4cd137;
    box-shadow: 0 0 0 2px rgba(76, 209, 55, 0.25);
    display: inline-block;
    flex-shrink: 0;
}

.ofn-tinder-name {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    font-family: var(--ofn-title-font, inherit);
    line-height: 1.2;
}

/* --- Badges --- */
.ofn-tinder-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ofn-tinder-badge {
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.ofn-tinder-badge-green {
    background: #388E3C;
}

/* --- Card Body --- */
.ofn-tinder-body {
    padding: 16px 20px 20px;
    background: #111;
}

.ofn-tinder-desc {
    color: #fff;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 18px;
}

.ofn-tinder-desc a {
    color: #fff;
    text-decoration: underline;
}

/* --- CTA Button ---
   Inherits from .offmodels-grid-layout .ofmodels-cta button (OF Model Search CSS).
   Only width override needed for the card layout. */
.ofn-tinder-body .ofmodels-cta {
    width: 100%;
}

/* --- Skip Link --- */
a.ofn-tinder-skip {
    display: block;
    width: 100%;
    padding: 12px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    margin-top: 8px;
    font-family: inherit;
    font-weight: 400;
    text-decoration: none;
}

a.ofn-tinder-skip:hover {
    text-decoration: underline;
}

/* --- Swipe Hint Overlays --- */
.ofn-tinder-hint {
    position: absolute;
    top: 24px;
    z-index: 20;
    font-weight: 800;
    font-size: 16px;
    padding: 6px 16px;
    border-radius: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.ofn-tinder-hint-view {
    right: 24px;
    background: #00e676;
    color: #000;
    border: 2px solid #00e676;
}

.ofn-tinder-hint-skip {
    left: 24px;
    background: #ff1744;
    color: #fff;
    border: 2px solid #ff1744;
}

/* --- End Card --- */
.ofn-tinder-end {
    background: #111;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.ofn-tinder-end-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    min-height: 420px;
}

.ofn-tinder-end-emoji {
    font-size: 48px;
    margin-bottom: 16px;
}

.ofn-tinder-end-title {
    color: #fff;
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    font-family: var(--ofn-title-font, inherit);
}

.ofn-tinder-end-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin: 0 0 28px;
    line-height: 1.5;
}

/* --- Mobile Adjustments --- */
@media (max-width: 480px) {
    .ofn-tinder-container {
        width: 100%;
        max-width: 340px;
    }

    .ofn-tinder-photo {
        aspect-ratio: 3 / 4;
    }

    .ofn-tinder-name {
        font-size: 22px;
    }

    .ofn-tinder-end-inner {
        padding: 48px 28px;
        min-height: 360px;
    }
}
