/* DmApp Highlights System Styles */

/* ===== HIGHLIGHTS CAROUSEL ===== */

#highlights-carousel {
    width: 100%;
    overflow: hidden;
    margin: 20px 0;
}

.highlights-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.highlights-scroll::-webkit-scrollbar {
    height: 6px;
}

.highlights-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.highlights-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.5);
    border-radius: 3px;
}

.highlights-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.7);
}

/* ===== HIGHLIGHT ITEM ===== */

.highlight-item {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.highlight-item:hover {
    transform: scale(1.05);
}

.highlight-media {
    position: relative;
    width: 120px;
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid #00FF00;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

.highlight-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.highlight-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.highlight-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.highlight-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
}

.highlight-username {
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.highlight-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.highlight-item:hover .highlight-remove {
    opacity: 1;
}

.highlight-remove:hover {
    background: rgba(255, 0, 0, 0.8);
}

/* ===== EMPTY STATE ===== */

.highlights-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.highlights-empty p {
    margin: 10px 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.highlights-empty small {
    font-size: 13px;
    color: #999;
}

/* ===== HIGHLIGHT MODAL ===== */

.highlight-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10004;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

.highlight-modal-content {
    position: relative;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    animation: modalSlideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.highlight-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 10;
    transition: all 0.3s ease;
}

.highlight-close:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: rotate(90deg);
}

.highlight-media-container {
    flex: 1;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
}

.highlight-full-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.highlight-details {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: 90vh;
}

.highlight-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #00FF00;
}

.highlight-user strong {
    display: block;
    font-size: 16px;
    color: #333;
}

.highlight-user small {
    display: block;
    font-size: 13px;
    color: #999;
}

.highlight-caption {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    margin: 15px 0;
}

.highlight-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    margin: 10px 0;
}

.highlight-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.tag {
    background: rgba(0, 255, 0, 0.1);
    color: #00AA00;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}

.highlight-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-action {
    flex: 1;
    background: white;
    border: 2px solid #e0e0e0;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

.btn-action:hover {
    background: #f5f5f5;
    border-color: #00FF00;
    transform: translateY(-2px);
}

.btn-action span:first-child {
    font-size: 18px;
}

/* ===== SHARE MODAL ===== */

.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10005;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

.share-modal-content {
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    animation: slideUpFromBottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUpFromBottom {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.share-modal-content h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    text-align: center;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.share-option {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 15px 10px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

.share-option:hover {
    background: #f5f5f5;
    border-color: #00FF00;
    transform: translateY(-2px);
}

.share-icon {
    font-size: 32px;
}

.btn-cancel {
    width: 100%;
    background: #f5f5f5;
    border: none;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.btn-cancel:hover {
    background: #e0e0e0;
}

/* ===== NOTIFICATIONS ===== */

.highlight-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    color: #333;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 10006;
    animation: slideInRight 0.4s ease-out;
    font-weight: 600;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.highlight-notification.success {
    background: linear-gradient(135deg, #E6FFE6, #CCFFCC);
    border-left: 4px solid #00FF00;
}

.highlight-notification.info {
    background: linear-gradient(135deg, #E6F3FF, #CCE6FF);
    border-left: 4px solid #0088FF;
}

.highlight-notification.error {
    background: linear-gradient(135deg, #FFE6E6, #FFCCCC);
    border-left: 4px solid #FF0000;
}

.highlight-notification.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

/* ===== ADD TO HIGHLIGHTS BUTTON ===== */

.add-to-highlights-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.add-to-highlights-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.6);
}

.add-to-highlights-btn:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .highlight-modal-content {
        flex-direction: column;
        max-height: 95vh;
    }
    
    .highlight-media-container {
        max-width: 100%;
        max-height: 50vh;
    }
    
    .highlight-details {
        padding: 20px;
    }
    
    .share-options {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== DARK MODE ===== */

@media (prefers-color-scheme: dark) {
    .highlight-modal-content,
    .highlight-details {
        background: #2a2a2a;
    }
    
    .highlight-user strong,
    .highlight-caption {
        color: white;
    }
    
    .share-modal-content {
        background: #2a2a2a;
    }
    
    .share-modal-content h3 {
        color: white;
    }
    
    .share-option,
    .btn-action {
        background: #333;
        border-color: #444;
        color: white;
    }
    
    .share-option:hover,
    .btn-action:hover {
        background: #3a3a3a;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .highlight-item,
    .highlight-modal,
    .highlight-notification,
    .share-modal-content {
        animation: none !important;
        transition: none !important;
    }
}
