/* lookupuser.css — User Lookup Page Styles */

/* === Custom Properties === */
:root {
    --card: oklch(0.98 0 0);
    --foreground: oklch(0.2 0 0);
    --primary: oklch(0.75 0.23 85);
    --primary-foreground: oklch(0.15 0 0);
}

/* === Keyframes === */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================================
   Page Layout
   ============================================================ */
.lookup-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.lookup-search-form {
    margin-bottom: 1.5rem;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.search-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.search-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
}

.search-field input,
.search-field select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    min-width: 160px;
}

.search-btn {
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.search-btn:hover {
    opacity: 0.85;
}

.lookup-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.lookup-results-count {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
}

.lookup-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
    font-size: 0.875rem;
}

/* ============================================================
   Utility Classes
   ============================================================ */
.glass-dark {
    backdrop-filter: blur(12px);
    background-color: oklch(0 0 0 / 60%);
    border: 1px solid oklch(1 0 0 / 10%);
}

.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px oklch(0 0 0 / 15%);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-online {
    background-color: oklch(0.7 0.2 140);
}

/* ============================================================
   CompactCard Component (cc-*)
   ============================================================ */
.cc-card,
.cc-card * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.cc-card {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
    border-radius: 1rem;
    background-color: var(--card);
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 0 1px oklch(0.75 0.23 85 / 0.2);
    display: block;
    text-decoration: none;
    color: inherit;
}

.cc-aspect {
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.cc-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cc-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent, transparent);
    pointer-events: none;
}

.cc-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, oklch(0.75 0.23 85 / 0.05), transparent, transparent);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.cc-card:hover .cc-hover-overlay {
    opacity: 1;
}

/* --- Online Indicator --- */
.cc-online {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: fit-content;
    padding: 0.25rem;
    border-radius: 1rem;
    border: none !important;
    transition: opacity 0.5s ease-in-out;
}

.cc-card:hover .cc-online {
    opacity: 0;
}

.cc-online-dot {
    transform: scale(0.75);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* --- Distance Badge --- */
.cc-distance {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid oklch(0.75 0.23 85 / 0.2) !important;
    transition: opacity 0.5s ease-in-out;
}

.cc-card:hover .cc-distance {
    opacity: 0;
}

.cc-distance-text {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    color: var(--primary);
}

/* --- Bottom-Left Stack --- */
.cc-stack {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 0.25rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    transition: opacity 0.5s ease-in-out;
}

@media (min-width: 1000px) {
    .cc-stack {
        gap: 0.25rem;
    }
}

.cc-card:hover .cc-stack {
    opacity: 0;
}

.cc-orientation {
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.cc-icon-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid oklch(0.75 0.23 85 / 0.2) !important;
}

/* --- Member Type Badges --- */
.cc-badge {
    padding: 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.cc-badge-free {
    background-color: white !important;
    color: black !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cc-badge-paid {
    background-color: #22c55e !important;
    color: white !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.cc-badge-lifetime {
    background-color: var(--primary) !important;
    color: var(--primary-foreground) !important;
    backdrop-filter: blur(4px);
    border: 1px solid oklch(0.75 0.23 85 / 0.2);
}

.cc-badge-charter {
    background-color: #f97316 !important;
    color: white !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* --- Photo Count --- */
.cc-photos {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid oklch(0.75 0.23 85 / 0.2) !important;
    transition: opacity 0.5s ease-in-out;
}

.cc-card:hover .cc-photos {
    opacity: 0;
}

.cc-photos-icon {
    width: 0.75rem;
    height: 0.75rem;
    color: white;
}

.cc-photos-count {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    color: white;
}

/* --- Username --- */
.cc-username-wrap {
    text-align: center;
    margin-top: 0.25rem;
}

.cc-username {
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 700;
    color: var(--foreground);
    letter-spacing: -0.025em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

/* ============================================================
   Card Grid Layouts
   ============================================================ */

/* Base grid container */
.user-cards-grid {
    display: grid;
    gap: 1rem;
}

/* Compact: small cards in many columns */
.user-cards-compact {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .user-cards-compact {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 900px) {
    .user-cards-compact {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Grid view: medium cards */
.user-cards-grid:not(.user-cards-compact):not(.user-cards-list) {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .user-cards-grid:not(.user-cards-compact):not(.user-cards-list) {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .user-cards-grid:not(.user-cards-compact):not(.user-cards-list) {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* List view: single column */
.user-cards-list {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

/* ============================================================
   Grid View Card Styles
   ============================================================ */
.user-card-grid {
    border-radius: 1rem;
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 0 0 1px oklch(0.75 0.23 85 / 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-card-grid:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px oklch(0 0 0 / 15%);
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card-image-wrapper {
    position: relative;
    overflow: hidden;
}

.card-image-wrapper.aspect-4-5 {
    aspect-ratio: 4 / 5;
}

.user-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-gradient-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent, transparent);
    pointer-events: none;
}

.card-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, oklch(0.75 0.23 85 / 0.05), transparent, transparent);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.user-card-grid:hover .card-hover-overlay {
    opacity: 1;
}

/* Online badge */
.online-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    padding: 0.25rem;
    border-radius: 1rem;
    backdrop-filter: blur(12px);
    background-color: oklch(0 0 0 / 60%);
}

.status-dot.online {
    background-color: oklch(0.7 0.2 140);
}

.status-dot.online.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Distance badge */
.distance-badge-overlay {
    position: absolute;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--primary);
    border-radius: 0.4rem;
    backdrop-filter: blur(12px);
    background-color: oklch(0 0 0 / 60%);
    border: 1px solid oklch(0.75 0.23 85 / 0.2);
}

.distance-badge-overlay.top-left {
    top: 0.25rem;
    left: 0.25rem;
}

/* Grid bottom content area */
.grid-bottom-content {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
}

.member-icon-badge {
    padding: 0.2rem;
    border-radius: 0.4rem;
    backdrop-filter: blur(12px);
    background-color: oklch(0 0 0 / 60%);
    border: 1px solid oklch(0.75 0.23 85 / 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.grid-orientation-text {
    position: absolute;
    bottom: 2rem;
    left: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.grid-member-badge {
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
}

.member-type-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    border-radius: 0.4rem;
}

.badge-free {
    background-color: white;
    color: black;
}

.badge-paid {
    background-color: #22c55e;
    color: white;
}

.badge-lifetime {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.badge-charter {
    background-color: #f97316;
    color: white;
}

/* Photo count badge */
.photo-count-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
    border-radius: 0.4rem;
    backdrop-filter: blur(12px);
    background-color: oklch(0 0 0 / 60%);
    border: 1px solid oklch(0.75 0.23 85 / 0.2);
}

.photo-count-badge.bottom-right {
    bottom: 0.25rem;
    right: 0.25rem;
}

/* Card username */
.card-username {
    padding: 0.5rem 0.25rem 0.25rem;
    text-align: center;
}

.card-username h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Lifestyle preference tags */
.lifestyle-prefs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem;
    justify-content: center;
}

.pref-tag {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.pref-watch { background: #dbeafe; color: #1d4ed8; }
.pref-soft { background: #fce7f3; color: #be185d; }
.pref-full { background: #dcfce7; color: #15803d; }
.pref-mf { background: #f3e8ff; color: #7c3aed; }
.pref-f { background: #fce7f3; color: #db2777; }
.pref-m { background: #dbeafe; color: #2563eb; }

/* SVG icon sizing */
.icon-sm {
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.icon-xs {
    width: 12px;
    height: 12px;
    vertical-align: middle;
}

.icon-inline {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-left: 0.15rem;
}

/* ============================================================
   List View Card Styles
   ============================================================ */
.user-card-list {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 0.75rem;
    background: var(--card);
    box-shadow: 0 0 0 1px oklch(0.75 0.23 85 / 0.1);
    transition: box-shadow 0.2s;
    overflow: hidden;
}

.user-card-list:hover {
    box-shadow: 0 4px 16px oklch(0 0 0 / 10%);
}

.list-layout {
    display: flex;
    gap: 1rem;
}

.list-image-section {
    flex-shrink: 0;
    width: 120px;
}

@media (min-width: 640px) {
    .list-image-section {
        width: 160px;
    }
}

.list-image-wrapper {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.list-info-section {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 0.75rem 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-header {
    margin-bottom: 0.25rem;
}

.user-card-username {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--foreground);
}

.user-card-tagline {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* List: bottom-left stack on image */
.image-bottom-left-stack {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.orientation-overlay {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Physical details */
.physical-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-row {
    font-size: 0.8rem;
    display: flex;
    gap: 0.35rem;
}

.detail-label {
    font-weight: 600;
    color: #555;
    flex-shrink: 0;
}

.detail-value {
    color: #333;
}

/* Info rows */
.info-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #555;
}

.info-row svg {
    flex-shrink: 0;
}

.note-section {
    border-top: 1px solid #eee;
    padding-top: 0.35rem;
}

/* ============================================================
   Hover Preview Panel (Desktop)
   ============================================================ */
.hover-preview-panel {
    position: fixed;
    z-index: 1000;
    width: 340px;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--card);
    border-radius: 1rem;
    box-shadow: 0 16px 48px oklch(0 0 0 / 20%);
    border: 1px solid oklch(0.75 0.23 85 / 0.15);
    pointer-events: none;
}

.hover-preview-inner {
    padding: 1rem;
}

.preview-card {
    font-size: 0.85rem;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.preview-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.preview-tagline {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: #888;
}

.preview-physical {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.5;
}

.preview-location-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.preview-note {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: #555;
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
}

/* ============================================================
   Flyover Overlay (Mobile)
   ============================================================ */
.flyover-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.flyover-content {
    position: relative;
    background: var(--card);
    border-radius: 1rem;
    max-width: 380px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.flyover-image {
    border-radius: 1rem 1rem 0 0;
    overflow: hidden;
    aspect-ratio: 4 / 5;
}

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

.flyover-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flyover-view-profile {
    display: block;
    text-align: center;
    padding: 0.75rem;
    margin: 0.75rem;
    background: var(--primary);
    color: var(--primary-foreground);
    text-decoration: none;
    font-weight: 600;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.flyover-view-profile:hover {
    opacity: 0.9;
}
