/**
 * Comments Style 2 - Custom CSS for replies and additional styling
 */

/* Form styling */
.send-comment-nk__form .form-group,
.inline-reply-form .form-group {
    position: relative;
    margin-bottom: 1rem;
}

.send-comment-nk__form .form-group label,
.inline-reply-form .form-group label {
    position: absolute;
    top: 0;
    right: 24px;
    font-size: 10px;
    line-height: 14px;
    font-weight: 500;
    letter-spacing: 0.004em;
    color: #808080;
    transform: translateY(-7px);
    padding: 0 8px;
    background-color: var(--bg-body, #fff);
    z-index: 1;
}

/* For inline reply form, use explicit white since it has gray background */
.inline-reply-form .form-group label {
    background-color: #fff;
}

.send-comment-nk__form .form-group i,
.inline-reply-form .form-group i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 24px;
    font-size: 16px;
    color: #808080;
    pointer-events: none;
}

.send-comment-nk__form .form-group .form-control,
.inline-reply-form .form-group .form-control {
    width: 100%;
    border: 1px solid #ededed;
    border-radius: 16px;
    height: 52px;
    font-size: 12px;
    font-weight: 500;
    color: #000;
    letter-spacing: 0.004em;
    padding: 0 56px 0 16px;
    background-color: #fff;
    text-align: right;
}

.send-comment-nk__form .form-group .form-control::placeholder,
.inline-reply-form .form-group .form-control::placeholder {
    color: #b8b8b8;
}

.send-comment-nk__form .form-group .form-control:focus,
.inline-reply-form .form-group .form-control:focus {
    border-color: #000 !important;
    outline: none;
}

.send-comment-nk__form .form-group.textarea i,
.inline-reply-form .form-group.textarea i {
    top: 18px;
    transform: none;
}

.send-comment-nk__form .form-group.textarea .form-control,
.inline-reply-form .form-group.textarea .form-control {
    height: 90px;
    padding-top: 16px;
    padding-bottom: 16px;
    resize: vertical;
    min-height: 90px;
}

/* Replies styling */
.comments-two-nk__item .replys {
    margin-top: 1.5rem;
    padding-right: 2rem;
    border-right: 2px solid #f0f0f0;
}

@media (max-width: 768px) {
    .comments-two-nk__item .replys {
        padding-right: 1rem;
    }
}

/* Reply button styling */
.comments-two-nk__item .reply {
    background: transparent;
    border: 1px solid #e0e0e0;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    transition: all 0.3s ease;
    cursor: pointer;
}

.comments-two-nk__item .reply:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #333;
}

/* Comment response message */
.comment-response-message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.comment-response-message.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.comment-response-message.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Rating stars styling */
.send-comment-nk .stars label {
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s ease;
}

.send-comment-nk .stars input:checked ~ label,
.send-comment-nk .stars label:hover,
.send-comment-nk .stars label:hover ~ label {
    color: #ffc107;
}

/* Reverse order for RTL */
[dir="rtl"] .send-comment-nk .stars {
    flex-direction: row-reverse;
}

/* Cancel reply button */
.btn-cancel-reply {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.btn-cancel-reply:hover {
    text-decoration: underline;
}

/* Loading state for submit button */
.btn-submit-comment:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Last Comments Widget Swiper */
.swiper-last-comments-nk {
    padding: 1rem 0;
}

.swiper-last-comments-nk .swiper-button-next,
.swiper-last-comments-nk .swiper-button-prev {
    width: 2rem;
    height: 2rem;
    background-color: #f5f5f5;
    border-radius: 50%;
}

.swiper-last-comments-nk .swiper-button-next:after,
.swiper-last-comments-nk .swiper-button-prev:after {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

/* Optimize for mobile */
@media (max-width: 576px) {
    .send-comment-nk__form .form-group {
        margin-bottom: 1rem;
    }
    
    .comments-two-nk__item .author img {
        width: 24px !important;
        height: 24px !important;
    }
}

/* Performance: Use will-change for animated elements */
.swiper-last-comments-nk .swiper-slide {
    will-change: transform;
}

/* Smooth transitions */
.comments-two-nk__item,
.send-comment-nk {
    transition: opacity 0.3s ease;
}

/* Inline reply form */
.inline-reply-form {
    background: #fafafa;
    border: 1px solid #efefef;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1rem;
}

.inline-reply-form__header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e5e5;
}

.inline-reply-form__title {
    font-size: 14px;
    line-height: 20px;
    color: #000;
    letter-spacing: -0.02em;
}

.inline-reply-form .btn-cancel-reply {
    background: transparent;
    border: none;
    color: #999;
    font-size: 12px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.inline-reply-form .btn-cancel-reply:hover {
    color: #dc3545;
}

.inline-reply-form .form-control {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    width: 100%;
    background: #fff;
}

.inline-reply-form .form-control:focus {
    border-color: #000;
    outline: none;
    box-shadow: none;
}

.send-comment-nk__form .btn-primary,
.inline-reply-form .btn-primary {
    background-color: #000;
    border: 1px solid #000;
    color: #fff;
    font-size: 12px;
    line-height: 18px;
    letter-spacing: -0.02em;
    padding: 10px 23px;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.send-comment-nk__form .btn-primary:hover,
.send-comment-nk__form .btn-primary:focus,
.send-comment-nk__form .btn-primary:active,
.inline-reply-form .btn-primary:hover,
.inline-reply-form .btn-primary:focus,
.inline-reply-form .btn-primary:active {
    background-color: transparent;
    color: #000;
}

.send-comment-nk__form .btn-primary:disabled,
.inline-reply-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.inline-reply-form .comment-response-message {
    font-size: 0.875rem;
}

/* New comment highlight animation */
@keyframes highlightComment {
    0% {
        background-color: #fffbea;
    }
    100% {
        background-color: transparent;
    }
}

.comments-two-nk__item.new-comment {
    animation: highlightComment 2s ease-out;
}

/* Share Modal Styles */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.share-modal.active {
    display: block;
}

.share-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.share-modal__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.share-modal__header span {
    font-size: 16px;
    color: #000;
}

.share-modal__close {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.share-modal__close:hover {
    background: #e5e5e5;
}

.share-modal__close i {
    font-size: 14px;
    color: #666;
}

.share-modal__socials {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.share-modal__social {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #fff;
}

.share-modal__social i {
    font-size: 20px;
}

.share-modal__social--telegram {
    background: linear-gradient(135deg, #0088cc, #00a8e8);
}

.share-modal__social--whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.share-modal__social--twitter {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.share-modal__social--linkedin {
    background: linear-gradient(135deg, #0077b5, #005885);
}

.share-modal__social:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-modal__copy {
    margin-top: 1rem;
}

.share-modal__copy .input-group {
    display: flex;
    gap: 0.5rem;
}

.share-modal__copy .form-control {
    flex: 1;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 12px;
    color: #666;
    background: #f9f9f9;
    direction: ltr;
    text-align: left;
}

.share-modal__copy .btn-copy-link {
    background: #000;
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.share-modal__copy .btn-copy-link:hover {
    background: #333;
}

.share-modal__copy .copy-success {
    display: none;
    color: #25d366;
    font-size: 12px;
    margin-top: 0.5rem;
    text-align: center;
}

.share-modal__copy .copy-success.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar icons hover */
.detail-blog-nk__icons li {
    cursor: pointer;
    transition: all 0.2s;
}

.detail-blog-nk__icons li:hover {
    background: #f5f5f5;
}
