/* AJAX Comments Plugin Styles */

#ajax-comment-form-container {
    max-width: 800px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Comment Form Styles */
.ajax-comment-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.ajax-comment-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.ajax-comment-form .form-row .form-group {
    flex: 1;
}

.ajax-comment-form .form-group {
    position: relative;
    margin-bottom: 20px;
}

.ajax-comment-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ajax-comment-form input[type="text"],
.ajax-comment-form input[type="email"],
.ajax-comment-form input[type="tel"],
.ajax-comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafbfc;
    box-sizing: border-box;
}

.ajax-comment-form input[type="text"]:focus,
.ajax-comment-form input[type="email"]:focus,
.ajax-comment-form input[type="tel"]:focus,
.ajax-comment-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.ajax-comment-form textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.ajax-comment-form textarea.over-limit {
    border-color: #dc3232;
}

/* Character Counter */
.char-counter {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

.char-counter.over-limit {
    color: #dc3232;
    font-weight: 600;
}

/* Submit Button */
#acp-submit-btn {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#acp-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #005177 0%, #003c57 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

#acp-submit-btn:active {
    transform: translateY(0);
}

#acp-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Reply Info Styles */
.reply-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reply-info span {
    color: #1565c0;
    font-weight: 500;
}

#acp-cancel-reply {
    background: #f44336;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#acp-cancel-reply:hover {
    background: #d32f2f;
}

/* Message Styles */
.acp-message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-top: 20px;
    font-weight: 500;
    border-left: 4px solid;
}

.acp-message.success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.acp-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* Comments List Styles */
.ajax-comments-list {
    margin-top: 40px;
}

.ajax-comments-list h3 {
    color: #333;
    font-size: 24px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 10px;
}

.ajax-comment {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #0073aa;
    transition: all 0.3s ease;
}

.ajax-comment:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.ajax-comment.new-comment {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left-color: #0ea5e9;
    animation: slideInFade 0.5s ease-out;
}

/* Threaded Comments - Replies */
.comment-reply {
    margin-left: 30px !important;
    margin-top: 20px;
    border-left: 3px solid #0073aa;
    background: #f8f9fa;
    position: relative;
    padding-left: 15px;
}

.comment-replies {
    margin-top: 15px;
}

.comment-reply::before {
    /*content: '';*/
    position: absolute;
    left: -3px;
    top: -20px;
    width: 25px;
    height: 25px;
    border-left: 3px solid #0073aa;
    border-bottom: 3px solid #0073aa;
    border-bottom-left-radius: 10px;
}

.comment-depth-1 {
    margin-left: 30px;
}

.comment-depth-2 {
    margin-left: 60px;
}

.comment-depth-3 {
    margin-left: 80px;
}

/* Comment Replies Container */
.comment-replies {
    margin-top: 15px;
}

.comment-replies .ajax-comment {
    margin-bottom: 15px;
}

/* Improve reply button styling */
.reply-btn {
    font-size: 12px;
    padding: 6px 12px;
    margin-top: 5px;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.comment-author {
    color: #0073aa;
    font-size: 18px;
    font-weight: 600;
}

.comment-date {
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.comment-phone {
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
    color: #555;
}

.comment-phone strong {
    color: #333;
}

.comment-content {
    line-height: 1.6;
    color: #444;
    font-size: 16px;
}

.comment-content p {
    margin: 0 0 10px 0;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* Comment Actions */
.comment-actions {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.reply-btn {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.reply-btn:hover {
    background: linear-gradient(135deg, #005177 0%, #003c57 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.reply-btn:active {
    transform: translateY(0);
}

/* Focused Form Group Animation */
.form-group.focused label {
    color: #0073aa;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Loading State */
.ajax-comment-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.ajax-comment-form.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ajax-comment-form {
        padding: 20px;
    }
    
    .ajax-comment-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ajax-comment {
        padding: 20px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .comment-author {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    #ajax-comment-form-container {
        margin: 10px 0;
    }
    
    .ajax-comment-form {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .ajax-comment-form input[type="text"],
    .ajax-comment-form input[type="email"],
    .ajax-comment-form input[type="tel"],
    .ajax-comment-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    #acp-submit-btn {
        width: 100%;
        padding: 16px;
    }
    
    .ajax-comment {
        padding: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ajax-comment-form,
    .ajax-comment {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .ajax-comment-form label,
    .comment-author,
    .ajax-comments-list h3 {
        color: #e0e0e0;
    }
    
    .ajax-comment-form input[type="text"],
    .ajax-comment-form input[type="email"],
    .ajax-comment-form input[type="tel"],
    .ajax-comment-form textarea {
        background-color: #404040;
        border-color: #555;
        color: #e0e0e0;
    }
    
    .ajax-comment-form input[type="text"]:focus,
    .ajax-comment-form input[type="email"]:focus,
    .ajax-comment-form input[type="tel"]:focus,
    .ajax-comment-form textarea:focus {
        background-color: #4a4a4a;
        border-color: #0ea5e9;
    }
    
    .comment-phone {
        background: #404040;
        color: #ccc;
    }
    
    .comment-date {
        color: #aaa;
    }
    
    .comment-content {
        color: #d0d0d0;
    }
}