/**
 * Inedit Comments Manager - Frontend Styles
 */

/* Comments Container */
#inedit-lazy-comments-container {
    max-width: 100%;
    margin: 40px 0;
    padding: 0;
}

/* Comments Title */
#inedit-lazy-comments-container .comments-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e5e5;
}

/* Comment Form Section */
#inedit-lazy-comments-container #respond {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    border: 1px solid #e5e5e5;
}

#inedit-lazy-comments-container #respond .comment-reply-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

#inedit-lazy-comments-container #respond .comment-form-comment label,
#inedit-lazy-comments-container #respond .comment-form-author label,
#inedit-lazy-comments-container #respond .comment-form-email label,
#inedit-lazy-comments-container #respond .comment-form-url label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

#inedit-lazy-comments-container #respond input[type="text"],
#inedit-lazy-comments-container #respond input[type="email"],
#inedit-lazy-comments-container #respond input[type="url"],
#inedit-lazy-comments-container #respond textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.5;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#inedit-lazy-comments-container #respond input[type="text"]:focus,
#inedit-lazy-comments-container #respond input[type="email"]:focus,
#inedit-lazy-comments-container #respond input[type="url"]:focus,
#inedit-lazy-comments-container #respond textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

#inedit-lazy-comments-container #respond textarea {
    min-height: 120px;
    resize: vertical;
}

#inedit-lazy-comments-container #respond .form-submit {
    margin-top: 20px;
}

#inedit-lazy-comments-container #respond .submit {
    background: #2271b1;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#inedit-lazy-comments-container #respond .submit:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

#inedit-lazy-comments-container #respond .submit:active {
    transform: translateY(0);
}

/* Comments List Wrapper */
#inedit-comments-wrapper {
    margin-bottom: 30px;
}

#inedit-comments-wrapper .comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#inedit-comments-wrapper .comment {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    transition: box-shadow 0.3s ease;
}

#inedit-comments-wrapper .comment:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#inedit-comments-wrapper .comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

#inedit-comments-wrapper .comment-author img {
    border-radius: 50%;
    margin-right: 12px;
}

#inedit-comments-wrapper .comment-author .fn {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    font-style: normal;
}

#inedit-comments-wrapper .comment-metadata {
    font-size: 13px;
    color: #757575;
    margin-bottom: 15px;
}

#inedit-comments-wrapper .comment-metadata a {
    color: #757575;
    text-decoration: none;
    transition: color 0.2s ease;
}

#inedit-comments-wrapper .comment-metadata a:hover {
    color: #2271b1;
}

#inedit-comments-wrapper .comment-content {
    color: #333;
    font-size: 15px;
    line-height: 1.7;
}

#inedit-comments-wrapper .comment-content p {
    margin: 0 0 15px 0;
}

#inedit-comments-wrapper .comment-content p:last-child {
    margin-bottom: 0;
}

#inedit-comments-wrapper .reply {
    margin-top: 15px;
}

#inedit-comments-wrapper .reply a {
    display: inline-block;
    font-size: 13px;
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #2271b1;
    transition: all 0.2s ease;
}

#inedit-comments-wrapper .reply a:hover {
    background: #2271b1;
    color: #fff;
}

/* Nested Comments */
#inedit-comments-wrapper .children {
    list-style: none;
    padding-left: 40px;
    margin-top: 20px;
}

#inedit-comments-wrapper .children .comment {
    background: #f8f9fa;
}

/* Comment Reply Form (inline) */
#inedit-comments-wrapper .comment-respond {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #e5e5e5;
}

#inedit-comments-wrapper .comment-respond .comment-reply-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

#inedit-comments-wrapper .comment-respond .comment-reply-title small {
    font-size: 14px;
    font-weight: 400;
}

#inedit-comments-wrapper .comment-respond .comment-reply-title small a {
    color: #2271b1;
    text-decoration: none;
    margin-left: 10px;
    transition: color 0.2s ease;
}

#inedit-comments-wrapper .comment-respond .comment-reply-title small a:hover {
    color: #135e96;
}

#inedit-comments-wrapper .comment-respond .comment-form-comment label,
#inedit-comments-wrapper .comment-respond .comment-form-author label,
#inedit-comments-wrapper .comment-respond .comment-form-email label,
#inedit-comments-wrapper .comment-respond .comment-form-url label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

#inedit-comments-wrapper .comment-respond input[type="text"],
#inedit-comments-wrapper .comment-respond input[type="email"],
#inedit-comments-wrapper .comment-respond input[type="url"],
#inedit-comments-wrapper .comment-respond textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    background: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#inedit-comments-wrapper .comment-respond input[type="text"]:focus,
#inedit-comments-wrapper .comment-respond input[type="email"]:focus,
#inedit-comments-wrapper .comment-respond input[type="url"]:focus,
#inedit-comments-wrapper .comment-respond textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

#inedit-comments-wrapper .comment-respond textarea {
    min-height: 100px;
    resize: vertical;
}

#inedit-comments-wrapper .comment-respond .form-submit {
    margin-top: 15px;
}

#inedit-comments-wrapper .comment-respond .submit {
    background: #2271b1;
    color: #fff;
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#inedit-comments-wrapper .comment-respond .submit:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

#inedit-comments-wrapper .comment-respond .submit:active {
    transform: translateY(0);
}

/* Loading Indicator */
#inedit-loading-indicator {
    text-align: center;
    padding: 30px;
    display: none;
}

#inedit-loading-indicator .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(34, 113, 177, 0.1);
    border-left-color: #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#inedit-loading-indicator span {
    display: block;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Load More Button */
.inedit-load-more-button {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 14px 30px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.inedit-load-more-button:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 113, 177, 0.3);
}

.inedit-load-more-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2);
}

.inedit-load-more-button:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(34, 113, 177, 0.2);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    #inedit-lazy-comments-container .comments-title {
        font-size: 20px;
    }

    #inedit-lazy-comments-container #respond {
        padding: 20px;
    }

    #inedit-comments-wrapper .comment {
        padding: 20px;
    }

    #inedit-comments-wrapper .children {
        padding-left: 20px;
    }

    .inedit-load-more-button {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Comments section hidden initially when lazy loading is enabled */
#comments.lazy-loading-enabled {
    display: none;
}

/* Old lazy load placeholder (kept for compatibility) */
#comments-lazy-placeholder {
    min-height: 200px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin: 20px 0;
}

#comments-lazy-placeholder .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(34, 113, 177, 0.1);
    border-left-color: #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

#comments-lazy-placeholder p {
    margin: 20px 0 0 0;
    color: #666;
    font-size: 14px;
}
