/* Memory UI Styles - Favorites, Annotations, Metadata */

/* ==================== FAVORITE/HEART BUTTON ==================== */

.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
}

.gallery-item:hover .favorite-btn,
.favorite-btn.active {
    opacity: 1;
}

.favorite-btn:hover {
    transform: scale(1.15);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.favorite-btn svg {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
}

.favorite-btn.favorited {
    background: #D4A017;
    border-color: #D4A017;
}

.favorite-btn.favorited svg {
    fill: white;
    stroke: white;
    animation: heartBeat 0.6s ease;
}

.favorite-btn:not(.favorited) svg {
    fill: none;
    stroke: #666;
    stroke-width: 2;
}

.favorite-btn.favorited:hover {
    background: #B8890F;
}

/* Lightbox favorite button */
.lightbox-favorite-btn {
    position: static;
    margin-right: 0.5rem;
    opacity: 1;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(0.9);
    }

    75% {
        transform: scale(1.1);
    }
}

/* ==================== ANNOTATION UI ==================== */

.annotation-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.annotation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.annotation-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.annotation-label svg {
    width: 16px;
    height: 16px;
}

.annotation-edit-btn {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.annotation-edit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.annotation-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
}

.annotation-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s ease;
}

.annotation-textarea:focus {
    outline: none;
    border-color: #D4A017;
    background: rgba(0, 0, 0, 0.4);
}

.annotation-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.annotation-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.annotation-save-btn,
.annotation-cancel-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.annotation-save-btn {
    background: #D4A017;
    color: white;
}

.annotation-save-btn:hover {
    background: #B8890F;
}

.annotation-cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.annotation-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.annotation-empty {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: 0.9rem;
}

/* ==================== METADATA TIMELINE ==================== */

.metadata-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metadata-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.metadata-row:last-child {
    margin-bottom: 0;
}

.metadata-icon {
    width: 18px;
    height: 18px;
    color: #D4A017;
    flex-shrink: 0;
}

.metadata-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    min-width: 80px;
}

.metadata-value {
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== FAVORITES BADGE ==================== */

.favorite-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    background: #D4A017;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
}

.favorite-badge svg {
    width: 14px;
    height: 14px;
    fill: white;
}

/* ==================== MY FAVORITES VIEW ==================== */

.favorites-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.favorites-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(212, 160, 23, 0.1);
    border: 2px solid rgba(212, 160, 23, 0.3);
    border-radius: 50px;
    font-weight: 600;
    color: #D4A017;
}

.favorites-count svg {
    width: 18px;
    height: 18px;
    fill: #D4A017;
}

.favorites-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.favorites-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    opacity: 0.3;
}

.favorites-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.favorites-empty p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* ==================== EXPORT/IMPORT UI ==================== */

.memory-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.memory-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.memory-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.memory-action-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================== DARK MODE ADJUSTMENTS ==================== */

body.dark-mode .favorite-btn {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .favorite-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

body.dark-mode .annotation-container,
body.dark-mode .metadata-container {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .favorite-btn {
        width: 40px;
        height: 40px;
        top: 0.75rem;
        right: 0.75rem;
        opacity: 1;
    }

    .favorite-btn svg {
        width: 20px;
        height: 20px;
    }

    .annotation-container,
    .metadata-container {
        margin-top: 1rem;
        padding: 0.875rem;
    }

    .metadata-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .metadata-label {
        min-width: auto;
    }
}