/* ===== COMMENTS SYSTEM STYLES ===== */

/* Comments Wrapper */
.as-comments-wrapper {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.as-comments-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Comment Form Container */
.as-comment-form-container {
    margin-bottom: 30px;
}

/* Textarea Wrapper */
.as-textarea-wrapper {
    position: relative;
    margin-bottom: 10px;
}

/* Enhanced Textarea */
.as-enhanced-textarea {
    width: 100%;
    min-height: 100px;
    padding: 15px;
    padding-right: 45px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.as-enhanced-textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.as-enhanced-textarea::placeholder {
    color: #999;
    font-style: italic;
}

/* Emoji Toggle Button */
.as-emoji-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.as-emoji-toggle:hover {
    background: #e9ecef;
    color: #007bff;
    transform: scale(1.05);
}

.as-emoji-toggle:active {
    transform: scale(0.95);
}

/* Emoji Picker */
.as-emoji-picker {
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    width: 320px;
    max-width: calc(100% - 40px);
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.1);
    animation: slideUp 0.2s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.as-emoji-header {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.as-emoji-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.as-emoji-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.as-emoji-close:hover {
    background: #f0f2f5;
    color: #ff4444;
}

.as-emoji-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
}

.as-emoji-btn {
    aspect-ratio: 1;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 8px;
}

.as-emoji-btn:hover {
    background: #e9ecef;
    transform: scale(1.1);
}

.as-emoji-btn:active {
    transform: scale(0.95);
}

/* Character count */
.as-char-count {
    font-size: 12px;
    color: #666;
    transition: color 0.2s ease;
}

/* Bad word warning */
.as-bad-word-warning {
    background: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 14px;
    display: none;
}

.as-bad-word-warning i {
    margin-right: 8px;
}

/* Form actions */
.as-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.as-submit-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.as-submit-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.as-submit-btn i {
    font-size: 14px;
}

/* Filter Container */
.as-filter-container {
    margin: 20px 0;
}

/* Desktop Horizontal Pills */
.as-desktop-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 8px 16px;
    background: #f0f2f5;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-pill:hover {
    background: #e4e6e9;
}

.filter-pill.active {
    background: #007bff;
    color: white;
    box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.filter-pill.active .filter-count {
    color: rgba(255,255,255,0.9);
}

.filter-count {
    font-size: 12px;
    font-weight: normal;
    color: #999;
}

/* Mobile Dropdown */
.as-mobile-filter {
    display: none;
    width: 100%;
}

.filter-dropdown {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    outline: none;
}

.filter-dropdown:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

/* Comment Sections */
.comment-section {
    display: none;
}

.comment-section.active {
    display: block;
}

/* Comment Wrapper */
.as-comment-wrapper {
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.as-comment-wrapper:last-child {
    border-bottom: none;
}

.as-comment-wrapper[style*="display: block"] {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toggle Button */
.as-see-more-comments {
    text-align: center;
    margin: 20px 0;
}

.as-toggle-btn {
    padding: 8px 24px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.as-toggle-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* Empty state */
.as-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666;
}

/* Minimal Popup */
.as-minimal-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.as-minimal-popup.active {
    display: flex;
}

.as-minimal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
}

.as-minimal-modal {
    position: relative;
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 280px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: popFade 0.2s ease;
    z-index: 100000;
}

.as-minimal-modal p {
    margin: 0 0 24px 0;
    font-size: 16px;
    color: #1a1a1a;
    text-align: center;
    font-weight: 500;
}

.as-minimal-subtext {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.as-minimal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.as-minimal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.as-minimal-cancel {
    background: #f2f2f2;
    color: #666;
}

.as-minimal-cancel:hover {
    background: #e5e5e5;
}

.as-minimal-discard {
    background: #ff4444;
    color: white;
}

.as-minimal-discard:hover {
    background: #ff1111;
}

@keyframes popFade {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Breakpoint */
@media (max-width: 768px) {
    .as-desktop-filters {
        display: none;
    }
    
    .as-mobile-filter {
        display: block;
    }
    
    .filter-pill {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .as-emoji-picker {
        width: 280px;
    }
    
    .as-emoji-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .as-emoji-btn {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .as-minimal-modal {
        width: 260px;
        padding: 20px;
    }
    
    .as-minimal-actions button {
        min-width: 90px;
        padding: 10px 16px;
    }
}