/**
 * Dating Core - Matching Module Styles
 * Additional styles specific to the matching functionality
 * Works with dating-app.css design system
 *
 * @package DatingCore
 */

/* ==========================================================================
   DISCOVER PAGE - Specific Enhancements
   ========================================================================== */

/* Card Stack Depth Effect */
.dc-profile-card:nth-child(2) {
    transform: scale(0.95) translateY(10px);
    filter: brightness(0.95);
    z-index: -1;
}

.dc-profile-card:nth-child(3) {
    transform: scale(0.9) translateY(20px);
    filter: brightness(0.9);
    z-index: -2;
}

.dc-profile-card:nth-child(n+4) {
    display: none;
}

/* Swipe Physics */
.dc-profile-card.dc-swiping .dc-swipe-like,
.dc-profile-card.dc-swiping .dc-swipe-nope,
.dc-profile-card.dc-swiping .dc-swipe-super {
    transition: opacity 0.05s ease !important;
}

/* Show indicators based on swipe direction (controlled by JS) */
.dc-profile-card .dc-swipe-like.dc-visible,
.dc-profile-card .dc-swipe-nope.dc-visible,
.dc-profile-card .dc-swipe-super.dc-visible {
    opacity: 1 !important;
}

/* Fly Away Animations */
.dc-profile-card.dc-flying-right {
    transform: translateX(150%) rotate(30deg) !important;
    opacity: 0;
}

.dc-profile-card.dc-flying-left {
    transform: translateX(-150%) rotate(-30deg) !important;
    opacity: 0;
}

.dc-profile-card.dc-flying-up {
    transform: translateY(-150%) scale(1.1) !important;
    opacity: 0;
}

/* Card Image Loading State */
.dc-card-image.dc-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Multiple Photos Indicator */
.dc-photo-dots {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dc-photo-dot {
    width: 24px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.2s ease;
}

.dc-photo-dot.dc-active {
    background: rgba(255, 255, 255, 0.95);
}

/* Photo Navigation Zones */
.dc-photo-nav {
    position: absolute;
    top: 0;
    bottom: 50%;
    width: 50%;
    cursor: pointer;
    z-index: 5;
}

.dc-photo-nav-prev { left: 0; }
.dc-photo-nav-next { right: 0; }

/* Verified Badge */
.dc-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #2196F3;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
}

.dc-verified-badge .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: #fff;
}

/* Premium Badge */
.dc-premium-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

/* Recently Active Badge */
.dc-recently-active {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.dc-recently-active::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00E676;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ==========================================================================
   ACTION BUTTON STATES
   ========================================================================== */

/* Disabled state */
.dc-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading state */
.dc-action-btn.dc-loading {
    position: relative;
    pointer-events: none;
}

.dc-action-btn.dc-loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.dc-action-btn.dc-loading .dashicons {
    opacity: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Keyboard shortcuts tooltip */
.dc-action-btn::after {
    content: attr(data-shortcut);
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #9aa0a6;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.dc-action-btn:hover::after {
    opacity: 1;
}

/* ==========================================================================
   FILTERS PANEL ENHANCEMENTS
   ========================================================================== */

/* Filter Panel Toggle Animation */
.dc-filters-panel.dc-hidden {
    display: none;
}

.dc-filters-panel.dc-closing {
    animation: slideUp 0.2s ease-out forwards;
}

@keyframes slideUp {
    to {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

/* Interest Filter Tags */
.dc-interest-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.dc-interest-filter {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 2px solid #e8eaed;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dc-interest-filter:hover {
    border-color: #dadce0;
    background: #fff;
}

.dc-interest-filter.dc-selected {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 142, 83, 0.1));
    border-color: #FF6B6B;
    color: #FF6B6B;
}

/* ==========================================================================
   UNDO FEATURE
   ========================================================================== */

.dc-undo-btn {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #FFA000;
    padding: 12px 24px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 100;
    animation: slideUp-undo 0.3s ease-out;
    border: none;
}

@keyframes slideUp-undo {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

.dc-undo-btn:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   BOOST FEATURE
   ========================================================================== */

.dc-boost-active {
    position: relative;
}

.dc-boost-active::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: linear-gradient(45deg, #AA00FF, #E040FB, #AA00FF);
    background-size: 200% 200%;
    animation: boostGlow 2s linear infinite;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.6;
}

@keyframes boostGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==========================================================================
   TOUCH GESTURES FEEDBACK
   ========================================================================== */

/* Haptic feedback visual */
.dc-haptic {
    animation: haptic 0.1s ease;
}

@keyframes haptic {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.95); }
}

/* Long press indicator */
.dc-long-press-indicator {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 107, 107, 0.5);
    pointer-events: none;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s ease;
}

.dc-long-pressing .dc-long-press-indicator {
    transform: scale(1.5);
    opacity: 1;
}

/* ==========================================================================
   SUPER LIKE ANIMATION
   ========================================================================== */

.dc-super-like-animation {
    position: fixed;
    inset: 0;
    background: rgba(41, 121, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: superLikeIn 0.5s ease forwards;
}

@keyframes superLikeIn {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; pointer-events: none; }
}

.dc-super-like-animation .dashicons-star-filled {
    font-size: 120px;
    color: #fff;
    animation: superLikeStar 0.5s ease forwards;
}

@keyframes superLikeStar {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.3) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* ==========================================================================
   PROFILE REPORT / BLOCK MENU
   ========================================================================== */

.dc-profile-menu {
    position: absolute;
    bottom: 100%;
    right: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    min-width: 180px;
    z-index: 100;
    animation: slideUp-menu 0.2s ease;
}

@keyframes slideUp-menu {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

.dc-profile-menu-item {
    padding: 12px 20px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dc-profile-menu-item:hover {
    background: #f8f9fa;
}

.dc-profile-menu-item.dc-danger {
    color: #FF5252;
}

.dc-profile-menu-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 480px) {
    .dc-photo-dots {
        top: 12px;
    }
    
    .dc-photo-dot {
        width: 18px;
        height: 3px;
    }
    
    .dc-premium-badge,
    .dc-liked-me-badge {
        top: 12px;
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .dc-undo-btn {
        bottom: 80px;
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* Focus styles */
.dc-action-btn:focus-visible,
.dc-filter-btn:focus-visible {
    outline: 3px solid rgba(255, 107, 107, 0.5);
    outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .dc-profile-card,
    .dc-action-btn,
    .dc-match-modal,
    .dc-swipe-indicator {
        transition: none !important;
        animation: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .dc-swipe-like { border-width: 6px; }
    .dc-swipe-nope { border-width: 6px; }
    .dc-swipe-super { border-width: 6px; }
    
    .dc-interest-tag {
        border-width: 2px;
    }
}
