/* Regular Activity Reply Styles */

/* Regular Activity Actions */
.jpae-regular-activity-actions {
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid #eee !important;
}

.jpae-regular-reply-btn {
    padding: 6px 12px !important;
    border: 1px solid #007cba !important;
    background: white !important;
    color: #007cba !important;
    border-radius: 15px !important;
    cursor: pointer !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.jpae-regular-reply-btn:hover {
    background: #007cba !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3) !important;
}

/* Regular Activity Reply Forms */
.jpae-regular-activity-reply-form {
    background: #e8f4fd !important;
    border: 2px solid #007cba !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: none !important;
}

.jpae-regular-nested-reply-form {
    background: #f0ffff !important;
    border: 2px solid #17a2b8 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin-top: 15px !important;
    margin-left: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: none !important;
}

.jpae-regular-activity-reply-form h5 {
    margin: 0 0 15px 0 !important;
    color: #007cba !important;
    font-size: 16px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.jpae-regular-nested-reply-form h6 {
    margin: 0 0 12px 0 !important;
    color: #17a2b8 !important;
    font-size: 14px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

/* Regular Reply Textarea */
.jpae-regular-reply-text {
    width: 100% !important;
    min-height: 100px !important;
    padding: 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    resize: vertical !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    margin-bottom: 15px !important;
    transition: border-color 0.2s ease !important;
}

.jpae-regular-reply-text:focus {
    border-color: #007cba !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1) !important;
}

.jpae-regular-nested-reply-form .jpae-regular-reply-text {
    min-height: 80px !important;
    font-size: 13px !important;
}

/* Regular Reply File Upload */
.jpae-regular-reply-file-upload {
    margin-bottom: 15px !important;
}

.jpae-regular-reply-file-upload label {
    display: block !important;
    margin-bottom: 8px !important;
    font-weight: bold !important;
    font-size: 14px !important;
    color: #007cba !important;
}

.jpae-regular-nested-reply-form .jpae-regular-reply-file-upload label {
    color: #17a2b8 !important;
    font-size: 12px !important;
}

.jpae-regular-reply-file-upload-area {
    border: 2px dashed #007cba !important;
    padding: 20px !important;
    text-align: center !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    background: #f8fcff !important;
    min-height: 60px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}

.jpae-regular-nested-reply-form .jpae-regular-reply-file-upload-area {
    border-color: #17a2b8 !important;
    background: #f0ffff !important;
    padding: 15px !important;
    min-height: 50px !important;
}

.jpae-regular-reply-file-upload-area:hover {
    border-color: #0056b3 !important;
    background: #e3f2fd !important;
    transform: translateY(-1px) !important;
}

.jpae-regular-nested-reply-form .jpae-regular-reply-file-upload-area:hover {
    border-color: #138496 !important;
    background: #e0f7ff !important;
}

.jpae-regular-reply-file-upload-area p {
    margin: 8px 0 !important;
    font-size: 14px !important;
    color: #007cba !important;
    font-weight: 500 !important;
}

.jpae-regular-nested-reply-form .jpae-regular-reply-file-upload-area p {
    color: #17a2b8 !important;
    font-size: 12px !important;
}

.jpae-regular-reply-file-upload-area small {
    color: #666 !important;
    font-size: 12px !important;
}

/* Regular Reply File Preview */
.jpae-regular-reply-file-preview {
    margin-top: 10px !important;
    display: none !important;
}

.jpae-regular-reply-file-preview:not(:empty) {
    display: block !important;
}

.jpae-regular-reply-file-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px !important;
    background: white !important;
    border-radius: 4px !important;
    margin: 4px 0 !important;
    border: 1px solid #007cba !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
}

.jpae-regular-reply-file-item:hover {
    background: #f8fcff !important;
    transform: translateX(2px) !important;
}

.jpae-regular-nested-reply-form .jpae-regular-reply-file-item {
    border-color: #17a2b8 !important;
}

.jpae-regular-reply-file-item i {
    color: #007cba !important;
    font-size: 14px !important;
    min-width: 16px !important;
}

.jpae-regular-nested-reply-form .jpae-regular-reply-file-item i {
    color: #17a2b8 !important;
}

.jpae-regular-reply-file-item span {
    flex: 1 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #333 !important;
}

.jpae-remove-regular-reply-file {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    padding: 4px 8px !important;
    border-radius: 50% !important;
    font-size: 10px !important;
    cursor: pointer !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

.jpae-remove-regular-reply-file:hover {
    background: #c82333 !important;
    transform: scale(1.1) !important;
}

/* Regular Reply Form Buttons */
.jpae-regular-activity-reply-form .jpae-cancel-regular-reply,
.jpae-regular-activity-reply-form .jpae-submit-regular-reply,
.jpae-regular-nested-reply-form .jpae-cancel-regular-reply,
.jpae-regular-nested-reply-form .jpae-submit-regular-reply {
    padding: 10px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: 1px solid !important;
    transition: all 0.2s ease !important;
}

.jpae-regular-nested-reply-form .jpae-cancel-regular-reply,
.jpae-regular-nested-reply-form .jpae-submit-regular-reply {
    padding: 8px 16px !important;
    font-size: 12px !important;
}

.jpae-cancel-regular-reply {
    background: white !important;
    border-color: #ddd !important;
    color: #666 !important;
}

.jpae-cancel-regular-reply:hover {
    background: #f8f9fa !important;
    border-color: #adb5bd !important;
    transform: translateY(-1px) !important;
}

.jpae-submit-regular-reply {
    background: #007cba !important;
    border-color: #007cba !important;
    color: white !important;
}

.jpae-regular-nested-reply-form .jpae-submit-regular-reply {
    background: #17a2b8 !important;
    border-color: #17a2b8 !important;
}

.jpae-submit-regular-reply:hover {
    background: #0056b3 !important;
    border-color: #004085 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3) !important;
}

.jpae-regular-nested-reply-form .jpae-submit-regular-reply:hover {
    background: #138496 !important;
    border-color: #117a8b !important;
}

/* Regular Reply Form Action Container */
.jpae-regular-activity-reply-form > div:last-child,
.jpae-regular-nested-reply-form > div:last-child {
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
    padding-top: 15px !important;
    border-top: 1px solid #ddd !important;
    margin-top: 15px !important;
}

.jpae-regular-nested-reply-form > div:last-child {
    gap: 8px !important;
    padding-top: 10px !important;
    margin-top: 10px !important;
}

/* Regular Replies Container */
.jpae-regular-replies-container {
    margin: 15px 0 !important;
    padding: 15px !important;
    background: #f8fcff !important;
    border-radius: 8px !important;
    border: 2px solid #007cba !important;
    position: relative !important;
}

.jpae-regular-replies-header {
    color: #007cba !important;
    font-size: 16px !important;
    font-weight: bold !important;
    margin-bottom: 15px !important;
    padding: 8px 0 !important;
    border-bottom: 2px solid #007cba !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.jpae-regular-replies-header span:last-child {
    background: #007cba !important;
    color: white !important;
    padding: 4px 8px !important;
    border-radius: 12px !important;
    font-size: 11px !important;
}

.jpae-regular-activity-replies {
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.jpae-regular-activity-replies:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.jpae-activity-identifier {
    background: #e8f4fd !important;
    padding: 8px !important;
    margin-bottom: 10px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    color: #007cba !important;
    border-left: 3px solid #007cba !important;
    font-weight: 500 !important;
}

/* Regular Reply Items */
.jpae-regular-reply-item {
    background: white !important;
    padding: 12px !important;
    margin: 8px 0 !important;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

.jpae-regular-reply-item:hover {
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.15) !important;
    transform: translateY(-1px) !important;
}

/* Thread Level Styling for Regular Activities */
.jpae-regular-thread-level-0 { 
    margin-left: 0px !important; 
    border-left-color: #007cba !important;
    border-left-width: 4px !important;
}
.jpae-regular-thread-level-1 { 
    margin-left: 20px !important; 
    border-left-color: #17a2b8 !important;
    border-left-width: 5px !important;
}
.jpae-regular-thread-level-2 { 
    margin-left: 40px !important; 
    border-left-color: #20c997 !important;
    border-left-width: 6px !important;
}
.jpae-regular-thread-level-3 { 
    margin-left: 60px !important; 
    border-left-color: #fd7e14 !important;
    border-left-width: 7px !important;
}
.jpae-regular-thread-level-4 { 
    margin-left: 80px !important; 
    border-left-color: #e83e8c !important;
    border-left-width: 8px !important;
}
.jpae-regular-thread-level-5 { 
    margin-left: 100px !important; 
    border-left-color: #6f42c1 !important;
    border-left-width: 9px !important;
}

/* Regular Reply Interactions - UPDATED TO MATCH ENHANCED DESIGN */
.jpae-regular-reply-interactions {
    margin-top: 12px !important;
    padding: 15px !important;
    background: #f8fcff !important;
    border: 1px solid #e3f2fd !important;
    border-radius: 8px !important;
}

/* Stats Section - Centered like enhanced activities */
.jpae-regular-reply-interactions > div:first-child {
    text-align: center !important;
    margin-bottom: 12px !important;
}

.jpae-regular-reply-interactions > div:first-child > div {
    display: inline-flex !important;
    align-items: center !important;
    gap: 20px !important;
    padding: 8px 16px !important;
    background: white !important;
    border-radius: 20px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    border: 1px solid #e0e0e0 !important;
}

/* Individual stat items */
.jpae-regular-reply-interactions .jpae-stat-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.jpae-regular-reply-interactions .jpae-stat-emoji {
    font-size: 16px !important;
}

.jpae-regular-reply-interactions .jpae-stat-count {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #007cba !important;
}

.jpae-regular-reply-interactions .jpae-stat-label {
    font-size: 11px !important;
    color: #666 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.jpae-regular-reply-interactions .jpae-stat-divider {
    width: 1px !important;
    height: 20px !important;
    background: #e0e0e0 !important;
}

/* Action Buttons - Centered like enhanced activities */
.jpae-regular-reply-interactions > div:last-child {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Updated button styling to match enhanced activities */
.jpae-regular-activity-like-btn,
.jpae-regular-activity-confirm-btn,
.jpae-regular-reply-to-reply-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 16px !important;
    border: 2px solid #e0e0e0 !important;
    background: white !important;
    color: #333 !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    min-height: 36px !important;
}

/* Like button states */
.jpae-regular-activity-like-btn {
    border-color: #e0e0e0 !important;
    background: white !important;
    color: #333 !important;
}

.jpae-regular-activity-like-btn.liked {
    background: #007cba !important;
    border-color: #007cba !important;
    color: white !important;
}

.jpae-regular-activity-like-btn:hover:not(.liked) {
    border-color: #007cba !important;
    color: #007cba !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.jpae-regular-activity-like-btn.liked:hover {
    background: #0056b3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Confirm button states */
.jpae-regular-activity-confirm-btn {
    border-color: #e0e0e0 !important;
    background: white !important;
    color: #333 !important;
}

.jpae-regular-activity-confirm-btn.confirmed {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
    opacity: 0.8 !important;
}

.jpae-regular-activity-confirm-btn:hover:not(.confirmed) {
    border-color: #28a745 !important;
    color: #28a745 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.jpae-regular-activity-confirm-btn.confirmed:hover {
    background: #28a745 !important;
    transform: none !important;
}

/* Reply button styling */
.jpae-regular-reply-to-reply-btn {
    border-color: #6c757d !important;
    background: white !important;
    color: #6c757d !important;
}

.jpae-regular-reply-to-reply-btn:hover {
    border-color: #495057 !important;
    color: #495057 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

/* Button content styling */
.jpae-regular-activity-like-btn span,
.jpae-regular-activity-confirm-btn span,
.jpae-regular-reply-to-reply-btn span {
    font-size: 14px !important;
}

.jpae-regular-activity-like-btn span:last-child,
.jpae-regular-activity-confirm-btn span:last-child,
.jpae-regular-reply-to-reply-btn span:last-child {
    font-size: 12px !important;
}

/* Processing states */
.jpae-regular-activity-like-btn.processing,
.jpae-regular-activity-confirm-btn.processing {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    position: relative !important;
}

.jpae-regular-activity-like-btn.processing::after,
.jpae-regular-activity-confirm-btn.processing::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: 8px !important;
    width: 12px !important;
    height: 12px !important;
    margin-top: -6px !important;
    border: 2px solid transparent !important;
    border-top: 2px solid currentColor !important;
    border-radius: 50% !important;
    animation: jpae-regular-spin 1s linear infinite !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .jpae-regular-reply-interactions > div:last-child {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    .jpae-regular-activity-like-btn,
    .jpae-regular-activity-confirm-btn,
    .jpae-regular-reply-to-reply-btn {
        flex: 1 !important;
        justify-content: center !important;
        min-width: 120px !important;
    }
}

/* Regular Reply Attachments */
.jpae-regular-reply-attachments {
    margin: 8px 0 !important;
    padding: 8px !important;
    border-radius: 4px !important;
    border: 1px solid !important;
}

.jpae-regular-reply-attachments h6 {
    margin: 0 0 6px 0 !important;
    font-size: 11px !important;
    font-weight: bold !important;
}

.jpae-regular-reply-attachments > div {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px !important;
    background: white !important;
    border-radius: 3px !important;
    margin-bottom: 4px !important;
}

.jpae-regular-reply-attachments a {
    padding: 2px 6px !important;
    border-radius: 10px !important;
    font-size: 9px !important;
    text-decoration: none !important;
    color: white !important;
}

/* Notification Styles for Regular Activities */
.jpae-regular-notification {
    position: fixed !important;
    top: 30px !important;
    right: 30px !important;
    z-index: 10000 !important;
    padding: 15px 20px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    display: none !important;
}

.jpae-regular-notification.success {
    background: #46b450 !important;
    color: white !important;
    border-left: 4px solid #2e7d32 !important;
}

.jpae-regular-notification.error {
    background: #dc3232 !important;
    color: white !important;
    border-left: 4px solid #a00 !important;
}

/* Force Hide All Regular Reply Forms by Default */
.jpae-regular-reply-form,
.jpae-regular-nested-reply-form {
    display: none !important;
}

/* Processing States */
.jpae-regular-activity-like-btn.processing,
.jpae-regular-activity-confirm-btn.processing,
.jpae-submit-regular-reply.processing {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    position: relative !important;
}

.jpae-regular-activity-like-btn.processing::after,
.jpae-regular-activity-confirm-btn.processing::after,
.jpae-submit-regular-reply.processing::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    right: 8px !important;
    width: 12px !important;
    height: 12px !important;
    margin-top: -6px !important;
    border: 2px solid transparent !important;
    border-top: 2px solid currentColor !important;
    border-radius: 50% !important;
    animation: jpae-regular-spin 1s linear infinite !important;
}

@keyframes jpae-regular-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design for Regular Activities */
@media (max-width: 768px) {
    .jpae-regular-activity-reply-form,
    .jpae-regular-nested-reply-form {
        padding: 15px !important;
    }
    
    .jpae-regular-reply-interactions > div:last-child {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    .jpae-regular-reply-interactions button {
        flex: 1 !important;
        justify-content: center !important;
        min-width: 120px !important;
    }
    
    .jpae-regular-thread-level-1 { margin-left: 15px !important; }
    .jpae-regular-thread-level-2 { margin-left: 30px !important; }
    .jpae-regular-thread-level-3 { margin-left: 45px !important; }
    .jpae-regular-thread-level-4 { margin-left: 60px !important; }
    .jpae-regular-thread-level-5 { margin-left: 75px !important; }
    
    .jpae-regular-notification {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
    }
}

/* Debug Styles for Regular Activities */
.jpae-debug .jpae-regular-reply-item::before {
    content: "REG-" attr(data-reply-id) " | L" attr(data-thread-level);
    position: absolute !important;
    top: -15px !important;
    right: 5px !important;
    font-size: 8px !important;
    color: #007cba !important;
    background: rgba(255,255,255,0.9) !important;
    padding: 2px 4px !important;
    border-radius: 2px !important;
    border: 1px solid #007cba !important;
    white-space: nowrap !important;
    z-index: 1000 !important;
}

/* Ensure proper separation from enhanced activities */
.jpae-regular-replies-container {
    border-top: 3px solid #007cba !important;
    margin-top: 20px !important;
}

.jpae-regular-replies-container::before {
    content: "💬 Regular Activity Discussions" !important;
    position: absolute !important;
    top: -12px !important;
    left: 15px !important;
    background: #007cba !important;
    color: white !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: bold !important;
}

/* Make sure regular activities don't interfere with enhanced activities */
.jpae-enhanced-activities-section ~ .jpae-regular-replies-container {
    border-color: #17a2b8 !important;
}

.jpae-enhanced-activities-section ~ .jpae-regular-replies-container::before {
    background: #17a2b8 !important;
}
