/* Compact Guest Comments Section Styles */
.guest-comments-section {
    background: rgba(42, 42, 42, 0.5);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #333;
}

.comments-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #333;
}

.comments-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comments-title {
    color: #667eea;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-comment-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    user-select: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    position: relative !important;
    z-index: 99999 !important;
    pointer-events: auto !important;
    background: var(--base-color, #667eea) !important;
    border: none !important;
    color: white !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* PC-specific click fix with ENTIRE button clickable */
.pc-click-fix {
    z-index: 99999 !important;
    position: relative !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 32px !important;
    min-width: 100px !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* PC ENHANCED: Full button clickable area */
.pc-full-button-click {
    width: 100% !important;
    padding: 8px 16px !important;
    background: var(--base-color, #667eea) !important;
    border: 2px solid transparent !important;
    border-radius: 6px !important;
    color: white !important;
    font-weight: 600 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* PC: Ensure entire button responds to both left and right clicks */
.pc-full-button-click:hover {
    background: var(--base-color-dark, #5a67d8) !important;
    border-color: var(--base-color, #667eea) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.pc-full-button-click:active {
    transform: translateY(0) !important;
    background: var(--base-color-darker, #4c51bf) !important;
}

/* Enhanced mobile touch support */
@media (max-width: 768px) {
    .pc-click-fix {
        min-height: 44px !important; /* Larger touch target for mobile */
        min-width: 120px !important;
        padding: 8px 16px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .pc-click-fix {
        min-height: 48px !important; /* Even larger for small phones */
        min-width: 140px !important;
        padding: 10px 20px !important;
        font-size: 15px !important;
    }
}

/* CRITICAL: Disable pointer events on ALL child elements */
.add-comment-btn *,
.add-comment-btn i,
.add-comment-btn span,
.add-comment-btn::before,
.add-comment-btn::after {
    pointer-events: none !important;
    user-select: none !important;
    cursor: inherit !important;
}

/* Ensure button is always clickable - ENHANCED FOR PC */
#toggle-comment-form {
    pointer-events: auto !important;
    cursor: pointer !important;
    user-select: none !important;
    z-index: 99999 !important;
    position: relative !important;
    outline: none !important;
    border: none !important;
    background-clip: padding-box !important;
}

#toggle-comment-form * {
    pointer-events: none !important;
    user-select: none !important;
}

/* Override any conflicting styles from main CSS */
.pc-click-fix,
.pc-click-fix:hover,
.pc-click-fix:focus,
.pc-click-fix:active,
.pc-click-fix:visited {
    z-index: 99999 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    display: inline-flex !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    text-decoration: none !important;
}

/* Force all child elements to not interfere with ENTIRE button clicks */
.pc-click-fix *,
.pc-click-fix i,
.pc-click-fix span,
.pc-click-fix::before,
.pc-click-fix::after {
    pointer-events: none !important;
    user-select: none !important;
    cursor: inherit !important;
    z-index: inherit !important;
}

/* PC ENHANCED: Ensure ENTIRE button area is clickable */
.pc-full-button-click,
.pc-full-button-click *,
#toggle-comment-form,
#toggle-comment-form * {
    pointer-events: auto !important;
    cursor: pointer !important;
    user-select: none !important;
}

/* Override any potential conflicts for the button itself */
#toggle-comment-form {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 99999 !important;
    position: relative !important;
    display: inline-flex !important;
    width: auto !important;
    min-width: 120px !important;
    padding: 8px 16px !important;
    background: var(--base-color, #667eea) !important;
    border: none !important;
    border-radius: 6px !important;
    color: white !important;
    font-weight: 600 !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

/* Ensure child elements don't block clicks but button itself is fully clickable */
#toggle-comment-form i,
#toggle-comment-form span {
    pointer-events: none !important;
    user-select: none !important;
    z-index: inherit !important;
}

.add-comment-btn:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.add-comment-btn:active {
    transform: translateY(0) !important;
}

.add-comment-btn:focus {
    outline: 2px solid rgba(102, 126, 234, 0.5) !important;
    outline-offset: 2px !important;
}

.comments-count {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.comments-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    color: #ccc;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-item i {
    color: #667eea;
}

/* Compact Comment Form Styles with Enhanced Mobile Support */
.comment-form-wrapper {
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
    transition: all 0.3s ease !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Enhanced mobile form display */
@media (max-width: 768px) {
    .comment-form-wrapper {
        margin-bottom: 15px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .comment-form-wrapper {
        margin-bottom: 10px;
        padding: 0 5px;
    }
}

.comment-form-card {
    background: rgba(26, 26, 26, 0.9);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #444;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Enhanced mobile form card */
@media (max-width: 768px) {
    .comment-form-card {
        padding: 15px;
        border-radius: 8px;
        margin: 0 5px;
    }
}

@media (max-width: 480px) {
    .comment-form-card {
        padding: 12px;
        border-radius: 6px;
        margin: 0 2px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.form-header h5 {
    color: #e0e0e0;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close-form-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-form-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.guest-comment-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.guest-comment-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

.guest-comment-form .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    color: #e0e0e0;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.guest-comment-form .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
    outline: none;
}

.guest-comment-form .form-control::placeholder {
    color: #999;
}

.character-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Comments Loading State */
.comments-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.comments-loading p {
    color: #999;
    margin: 0;
    font-size: 14px;
}

/* Comments List Styles */
.comments-list {
    margin-bottom: 20px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    background: rgba(26, 26, 26, 0.6);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.comment-item:hover {
    background: rgba(26, 26, 26, 0.8);
    border-color: #444;
}

.comment-avatar .avatar-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.commenter-name {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.comment-time {
    color: #999;
    font-size: 12px;
}

.featured-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.comment-text {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.like-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.like-btn:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.like-btn.liked {
    color: #ff6b6b;
}

.like-btn.liked i {
    color: #ff6b6b;
}

.like-count {
    font-weight: 500;
}

/* Admin Replies */
.admin-replies {
    margin-top: 12px;
    padding-left: 20px;
    border-left: 2px solid #667eea;
}

.admin-reply {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    margin-bottom: 8px;
}

.admin-reply:last-child {
    margin-bottom: 0;
}

.reply-avatar .avatar-circle.admin-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    font-size: 14px;
}

.reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.admin-name {
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    margin: 0;
}

.admin-badge {
    background: #667eea;
    color: white;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
}

.reply-time {
    color: #999;
    font-size: 11px;
}

.reply-text {
    color: #ddd;
    font-size: 13px;
    line-height: 1.4;
}

/* No Comments State */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-comments-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-comments h4 {
    color: #ccc;
    margin-bottom: 8px;
    font-size: 18px;
}

.no-comments p {
    margin: 0;
    font-size: 14px;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.comment-item {
    animation: fadeIn 0.3s ease;
}

/* Enhanced Mobile Form Inputs */
@media (max-width: 768px) {
    .guest-comment-form .form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px !important;
        border-radius: 6px !important;
    }

    .guest-comment-form textarea {
        min-height: 100px !important;
        resize: vertical !important;
    }

    .form-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .form-actions .btn {
        width: 100% !important;
        padding: 12px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .guest-comment-form .form-control {
        font-size: 16px !important;
        padding: 14px !important;
    }

    .form-row {
        flex-direction: column !important;
    }

    .form-row .form-group {
        margin-bottom: 15px !important;
    }

    .character-count {
        font-size: 12px !important;
        text-align: right !important;
        margin-top: 5px !important;
    }
}

/* Comments Pagination */
.comments-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination-btn {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid #444;
    color: #ccc;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comments-title-row {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .guest-comment-form .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions {
        justify-content: center;
    }

    .comment-item {
        padding: 12px;
    }

    .comment-avatar .avatar-circle {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}
