/**
 * FilmFrei24 - Interactions CSS
 * Ratings, Comments, Share Styling
 * 2026 Edition - Modern Animations & Effects
 */

/* Interaction Container */
.interaction-container {
    margin-top: 24px;
    animation: fadeInUp 0.5s ease-out backwards;
    animation-delay: 0.2s;
}

.interaction-section {
    background: var(--bg-card, var(--bg-secondary));
    border-radius: 14px;
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.interaction-section:hover {
    border-color: rgba(255, 107, 53, 0.2);
}

/* Action Buttons */
.actions-rating-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover {
    background: var(--glass-bg-strong, rgba(255, 255, 255, 0.1));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:active {
    transform: translateY(0) scale(0.98);
}

.action-btn.share-btn:hover {
    border-color: #4ade80;
    color: #4ade80;
}

.action-btn.report-btn:hover {
    border-color: #f87171;
    color: #f87171;
}

.action-btn svg {
    flex-shrink: 0;
}

/* Rating Section */
.rating-section {
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-bottom: 24px;
}

/* Rating Inline (next to buttons) */
.rating-inline {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-inline .rating-stars {
    display: flex;
    gap: 2px;
    margin: 0;
}

.rating-inline .rating-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rating-inline .rating-avg {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-inline .rating-count {
    font-size: 12px;
    color: var(--text-tertiary);
}

.rating-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rating-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 16px;
}

.rating-avg {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.rating-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.star-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.15s ease;
    color: var(--text-tertiary);
}

.star-btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: all 0.15s ease;
}

.star-btn:hover {
    transform: scale(1.15);
}

.star-btn.active svg,
.star-btn:hover svg {
    fill: #fbbf24;
    stroke: #fbbf24;
    color: #fbbf24;
}

.rating-count {
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Comments Section */
.comments-section {
    margin-top: 24px;
}

.comments-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-form textarea::placeholder {
    color: var(--text-tertiary);
}

.comment-submit-btn {
    align-self: flex-end;
    padding: 12px 24px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.no-comments,
.loading-comments {
    text-align: center;
    padding: 24px;
    color: var(--text-tertiary);
    font-size: 14px;
}

.comment-item {
    background: var(--bg-tertiary);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.comment-item:hover {
    border-color: var(--border-color);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-user {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

.comment-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

.comment-delete-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.comment-delete-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}

.comment-delete-btn:hover {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.comment-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .interaction-section {
        padding: 16px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-btn {
        justify-content: center;
    }

    .rating-stars {
        justify-content: center;
    }

    .star-btn svg {
        width: 32px;
        height: 32px;
    }

    .comment-submit-btn {
        width: 100%;
    }
}
