/**
 * ZipPicks Favorites - Master Card Styles
 * Styles for favorites functionality in Master Critic cards
 */

/* Card Actions Container */
.zp-mc-card-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Favorite Button */
.zp-mc-card .zp-favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    outline: none;
}

.zp-mc-card .zp-favorite-btn:hover {
    border-color: #ff4458;
    color: #ff4458;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 68, 88, 0.15);
}

.zp-mc-card .zp-favorite-btn:active {
    transform: translateY(0);
}

/* Favorited State */
.zp-mc-card .zp-favorite-btn.is-favorited {
    background: #ff4458;
    border-color: #ff4458;
    color: white;
}

.zp-mc-card .zp-favorite-btn.is-favorited:hover {
    background: #e63946;
    border-color: #e63946;
    box-shadow: 0 2px 12px rgba(255, 68, 88, 0.25);
}

/* Loading State */
.zp-mc-card .zp-favorite-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

.zp-mc-card .zp-favorite-btn.is-loading .zp-favorite-icon {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Icon Styles */
.zp-mc-card .zp-favorite-icon {
    font-size: 18px;
    line-height: 1;
}

.zp-mc-card .zp-favorite-text {
    font-size: 14px;
}

/* Disabled State for Non-logged-in Users */
.zp-mc-card .zp-favorite-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #e5e5e5;
    color: #999;
}

.zp-mc-card .zp-favorite-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Toast Notifications */
.zp-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #333;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
    max-width: 300px;
}

.zp-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.zp-toast-success {
    background: #10b981;
}

.zp-toast-error {
    background: #ef4444;
}

.zp-toast-info {
    background: #3b82f6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .zp-mc-card .zp-favorite-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .zp-mc-card .zp-favorite-icon {
        font-size: 16px;
    }
    
    .zp-toast {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

/* List Layout Specific */
.zp-layout-list .zp-mc-card-actions {
    justify-content: flex-end;
}

/* Grid Layout Specific */
.zp-layout-grid .zp-mc-card-actions {
    justify-content: center;
}

/* Legacy Card Support */
.zpmc-legacy .zp-mc-card-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

/* Accessibility */
.zp-favorite-btn:focus-visible {
    outline: 2px solid #ff4458;
    outline-offset: 2px;
}

/* Loading States */
.zp-favorite-btn.is-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.zp-favorite-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}