/**
 * TurnKey Directories - Search Page Enhancements Styles
 * PHASE 2, 3, 4 Features
 */

/* ============================================
   PHASE 2: Favorites Button
   ============================================ */

.tkd-favorite-btn {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.9) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease;
    z-index: 10 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    aspect-ratio: 1 / 1 !important;
    /* Fallback for older browsers - ensures square shape */
    line-height: 32px !important;
}

.tkd-favorite-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.tkd-favorite-btn.active {
    background: rgba(239, 68, 68, 0.9);
    border-color: rgba(239, 68, 68, 1);
    color: white;
}

.tkd-favorite-btn.active i {
    color: white;
}

.tkd-favorite-btn i {
    transition: transform 0.2s ease;
}

/* Ensure button stays circular even when parent has flex properties */
.tkd-card-image .tkd-favorite-btn,
.glass-card-content .tkd-card-image .tkd-favorite-btn,
.tkd-listing-card .tkd-favorite-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    aspect-ratio: 1 / 1 !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .tkd-card-image .tkd-favorite-btn,
    .glass-card-content .tkd-card-image .tkd-favorite-btn,
    .tkd-listing-card .tkd-favorite-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }
}

.tkd-favorite-btn:hover i {
    transform: scale(1.2);
}

/* Favorite Notification */
.tkd-favorite-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.tkd-favorite-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   PHASE 2: Filter Quick Apply Pills
   ============================================ */

.tkd-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

/* Fallback: If container has direct text children, hide them (will be converted by JS) */
.tkd-filter-pills:not(:has(.tkd-filter-pill)) {
    font-size: 0;
}

.tkd-filter-pill {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: rgba(0, 0, 0, 0.7);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tkd-filter-pill:hover {
    border-color: var(--tkd-primary, #81d742);
    background: rgba(129, 215, 66, 0.1);
    color: var(--tkd-primary, #81d742);
    transform: translateY(-1px);
}

.tkd-filter-pill.active {
    background: var(--tkd-primary, #81d742);
    border-color: var(--tkd-primary, #81d742);
    color: white;
}

.tkd-filter-pill.active:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ============================================
   PHASE 3: Quick Compare (Placeholder)
   ============================================ */

.tkd-compare-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 10;
}

.tkd-compare-checkbox:checked {
    background: var(--tkd-primary, #81d742);
    border-color: var(--tkd-primary, #81d742);
}

/* ============================================
   PHASE 4: Social Proof Badges (Placeholder)
   ============================================ */

.tkd-social-proof-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.tkd-badge-top-rated {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.tkd-badge-fast-response {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.tkd-badge-many-reviews {
    background: rgba(0, 123, 255, 0.2);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.3);
}

.tkd-badge-verified {
    background: rgba(23, 162, 184, 0.2);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.3);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .tkd-filter-pills {
        padding: 10px 12px;
        gap: 6px;
        justify-content: flex-start;
    }
    
    .tkd-filter-pill {
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 16px;
        flex: 0 0 auto;
    }
    
    .tkd-favorite-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        font-size: 14px !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        aspect-ratio: 1 / 1 !important;
        /* Fallback for older browsers - ensures square shape */
        line-height: 28px !important;
    }
}

/* Extra small screens - make pills even more compact */
@media (max-width: 480px) {
    .tkd-filter-pills {
        padding: 8px 10px;
        gap: 5px;
    }
    
    .tkd-filter-pill {
        padding: 5px 8px;
        font-size: 10px;
        border-radius: 14px;
    }
}

