/* ============================================
   BUSINESS CARD - NEW DESIGN
   ============================================
   This CSS file contains styles for the redesigned
   business card component (BusinessCard.razor).
   
   Based on mockup: hint-app-layouts-v2.html
   Created: January 2026
   ============================================ */

/* ============================================
   THEME VARIABLES
   ============================================ */
:root {
    --biz-bg: #f8f4ff;
    --biz-surface: #ffffff;
    --biz-surface-hover: #f0ebf8;
    --biz-border: rgba(70, 39, 117, 0.12);
    --biz-text: #1a1a2e;
    --biz-text-muted: #6b6b7b;
    --biz-accent: #462775;
}

/* ============================================
   CARD LIST CONTAINER
   ============================================ */
.biz-card-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px;
    position: relative;
    z-index: 1;
}

/* ============================================
   BUSINESS CARD
   ============================================ */

.biz-card {
    background: var(--biz-surface);
    border-radius: 16px;
    padding: 14px;
    margin: 10px 10px 20px 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(70, 39, 117, 0.06);
    /* Flexbox for proper element ordering */
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid #7e62a8;
}

/* ============================================
   CUSTOMER HINT CARD
   Individual hint display in modals (MyHints location modal)
   Same visual language as .biz-card for consistency
   ============================================ */
.cust-hint-card {
    background: var(--biz-surface);
    border-radius: 16px;
    padding: 14px;
    margin: 10px 10px 20px 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(70, 39, 117, 0.06);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid #7e62a8;
}

.biz-cards-list .biz-card:first-of-type {
  margin-top: 20px;
}

/* Ensure card-header always appears first via order */
.biz-card .card-header {
    order: 1;
}

/* Other content follows in DOM order */
.biz-card .hint-block { order: 2; }
.biz-card .photo-carousel { order: 3; }
.biz-card .reaction-strip { order: 4; }

/* ============================================
   CARD HEADER
   Now uses LocationHeader component which outputs
   the header row and optional overlay as siblings
   ============================================ */
.card-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

/* ============================================
   NOTE: Logo and business info styles have been
   migrated to location-header.css as part of the
   LocationHeader component (loc-header__* classes).
   ============================================ */

/* ============================================
   SENTIMENT OVERLAY INTEGRATION
   The LocationHeader component now handles the
   spark bars and overlay rendering. We just need
   to hide other card content when overlay is active.
   ============================================ */

/* Hide other card content when overlay is active, but keep card-header visible */
.biz-card.overlay-active > *:not(.card-header) {
    display: none;
}

/* ============================================
   NOTE: Feedback overlay styles have been migrated
   to location-header.css as part of the LocationHeader
   component. The overlay is now rendered by the
   LocationHeader component with loc-header__* classes.
   ============================================ */

/* ============================================
   HINT BLOCK
   Preview of most recent hint
   ============================================ */
.hint-block {
    background: rgb(244 242 247);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.hint-preview {
    font-size: 19px;
    color: var(--biz-text);
    line-height: 1.4;
    margin-bottom: 6px;
    /* Limit to 2 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hint-date {
    font-size: 13px;
    color: var(--biz-text-muted);
}

.view-hints {
    display: block;
    margin-top: 8px;
    font-size: 15px;
    color: var(--biz-accent);
    font-weight: 600;
    text-align: right;
    cursor: pointer;
    transition: color 0.2s ease;
}

.view-hints:hover {
    color: #6c41ad;
}

/* ============================================
   PHOTO CAROUSEL
   Horizontal scrolling image thumbnails
   ============================================ */
.photo-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Allow horizontal scroll without interference from parent touch handlers */
    touch-action: pan-x;
}

.photo-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex-shrink: 0;
    height: 50px;
    width: auto;
    border-radius: 8px;
    object-fit: cover;
    background: #e8e0f0;
}

/* Ensure images display properly */
.carousel-item img {
    height: 50px;
    width: auto;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

/* Inline "See all" button inside carousel (appears after 7th image) */
.carousel-see-all {
    flex-shrink: 0;
    height: 50px;
    min-width: 70px;
    padding: 0 14px;
    border-radius: 8px;
    background: rgba(70, 39, 117, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--biz-accent);
    cursor: pointer;
    transition: background 0.2s ease;
}

.carousel-see-all:hover {
    background: rgba(70, 39, 117, 0.18);
}

/* ============================================
   REACTION STRIP
   Aggregated emoji reactions and reply count
   ============================================ */
.reaction-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(70, 39, 117, 0.1);
}

/* Aggregated reactions with stacked emojis */
.reaction-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(70, 39, 117, 0.06);
    border-radius: 20px;
}

.emoji-stack {
    display: flex;
    align-items: center;
    gap: 3px;
}

.emoji-stack .emoji {
    font-size: 19px;
}

.reaction-group .total {
    color: var(--biz-text-muted);
    font-weight: 500;
    font-size: 14px;
    margin-left: 4px;
}

/* Replies item stays separate, pushed to right */
.reaction-replies {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: rgba(70, 39, 117, 0.06);
    border-radius: 20px;
    font-size: 14px;
    margin-left: auto;
}

.reaction-replies .emoji { font-size: 19px; }
.reaction-replies .count { color: var(--biz-text-muted); font-weight: 500; }

/* ============================================
   CARD HOVER & INTERACTION STATES
   ============================================ */
.biz-card:hover {
    box-shadow: 0 4px 12px rgba(70, 39, 117, 0.1);
}

/* NOTE: Removed .biz-card:active transform - it was interfering with 
   carousel touch scrolling. Interactive elements inside the card 
   (carousel, links, spark bars) handle their own interaction states. */
