/**
 * Gallery Integration Styles
 * Unified styles for likes, comments, collections, downloads
 * 
 * @package Fotografiescu
 * @version 2.0.0
 */

/* ============================================
   ACTION BUTTONS (Like, Save, Download, Share)
   ============================================ */

.image-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.action-btn svg {
    width: 18px;
    height: 18px;
    transition: all 0.2s ease;
}

/* Like Button States */
.action-btn.like-btn.liked {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.action-btn.like-btn.liked svg {
    fill: #ef4444;
    stroke: #ef4444;
}

.action-btn.like-btn:hover:not(.liked) svg {
    color: #f87171;
}

/* Save Button States */
.action-btn.save-btn.saved {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.action-btn.save-btn.saved svg {
    fill: #3b82f6;
}

/* Download Button */
.action-btn.download-btn:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

/* Icon-only buttons */
.action-btn.icon-only {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* ============================================
   STATS DISPLAY
   ============================================ */

.image-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stat-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

.stat-item.active {
    color: #f87171;
}

.stat-item.active svg {
    fill: currentColor;
}

/* Stats inline (smaller) */
.image-stats-inline {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.image-stats-inline .stat {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: rgba(255, 255, 255, 0.6);
}

.image-stats-inline .stat.active {
    color: #f87171;
}

/* ============================================
   INFO PANEL LAYOUT
   ============================================ */

.info-panel-section {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-panel-section:last-child {
    border-bottom: none;
}

.info-panel-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px;
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

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

/* ============================================
   EMPTY STATES
   ============================================ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.3);
}

.empty-state-title {
    font-size: 16px;
    font-weight: 500;
    color: white;
    margin-bottom: 8px;
}

.empty-state-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   BADGE STYLES
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-admin {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.badge-new {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-edited {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* ============================================
   TOOLTIP STYLES
   ============================================ */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 6px 10px;
    background: #1a1a1a;
    border-radius: 6px;
    font-size: 12px;
    color: white;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000; /* Above panels (100) but below modals */
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
}

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

@media (max-width: 768px) {
    .image-actions {
        flex-wrap: wrap;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .action-btn span:not(.sr-only) {
        display: none;
    }
    
    .image-stats {
        gap: 12px;
        font-size: 12px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Heart pop animation */
@keyframes heartPop {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.like-btn.animating svg {
    animation: heartPop 0.4s ease;
}

/* Save bounce animation */
@keyframes saveBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.save-btn.animating svg {
    animation: saveBounce 0.3s ease;
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Slide in from right */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.3s ease forwards;
}

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

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible - accessibility for keyboard navigation */
.action-btn:focus-visible,
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible:not([tabindex="-1"]),
.header-icon:focus-visible,
.thumbnail-item:focus-visible,
.filter-option:focus-visible,
.menu-item:focus-visible {
    outline: 2px solid var(--color-accent, #3b82f6);
    outline-offset: 2px;
}

/* Remove default focus ring for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
