/* assets/css/comments.css - TAMBAHKAN INI DI BAWAH */

/* STYLE UNTUK TEST POST (SEMENTARA) */
.test-post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 50px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
}

.test-post-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.test-post-content {
    padding: 40px;
}

.test-post-title {
    font-size: 32px;
    font-weight: 700;
    color: #1C150F;
    margin-bottom: 20px;
}

.test-post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F0EDE3;
    color: #666;
    font-size: 14px;
}

.badge-category {
    background: #5C6844;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.test-post-body {
    line-height: 1.8;
    color: #333;
}

/* COMMENTS SECTION (YANG SUDAH ADA SEBELUMNYA) */
.comments-section {
    background: #F5F2E8;
    padding: 60px 0;
    margin-top: 50px;
    border-radius: 20px;
    margin-bottom: 50px;
}

/* ... sisanya sama seperti CSS comments sebelumnya ... */
.comments-title {
    color: #1C150F;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.comments-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #5C6844;
}

.comment-form-wrapper {
    background: white;
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 50px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.comment-form .form-group {
    margin-bottom: 20px;
}

.comment-input,
.comment-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #E8E4D9;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.comment-input:focus,
.comment-textarea:focus {
    outline: none;
    border-color: #5C6844;
    box-shadow: 0 0 0 3px rgba(92,104,68,0.1);
}

.comment-textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-publish {
    background: #5C6844;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-publish:hover {
    background: #4a5637;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(92,104,68,0.3);
}

.comments-list {
    background: white;
    border-radius: 16px;
    padding: 20px;
}

.comment-item {
    display: flex;
    gap: 20px;
    padding: 25px 0;
    border-bottom: 1px solid #F0EDE3;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    flex-shrink: 0;
}

.avatar-img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #5C6844;
    background: #D7CEAF;
}

.comment-header {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 700;
    color: #1C150F;
    font-size: 16px;
}

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

.comment-text {
    color: #444;
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.no-comments {
    text-align: center;
    padding: 50px 20px;
    color: #999;
    font-style: italic;
}
.comment-form-wrapper .text-muted {
    font-size: 12px;
    color: #6c757d;
}

.comment-form-wrapper .text-muted i {
    margin-right: 5px;
}

.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    border-radius: 12px;
    padding: 12px 15px;
}

/* resources/assets/css/comments.css */
/* Admin Reply Styles */
.admin-reply {
    background: #F0F4E8;
    border-left: 4px solid #5C6844;
    padding: 15px 20px;
    margin-top: 15px;
    border-radius: 12px;
}

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

.reply-header i {
    color: #5C6844;
    font-size: 16px;
}

.reply-author {
    font-weight: 700;
    color: #5C6844;
    font-size: 13px;
}

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

.reply-text {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.avatar-icon {
    font-size: 45px;
    color: #5C6844;
    background: #F5F2E8;
    border-radius: 50%;
    padding: 5px;
}

.comment-item.has-reply {
    border-bottom-color: #E0E8D4;
}

.comment-form-wrapper .text-muted {
    font-size: 12px;
    color: #6c757d;
}

.comment-form-wrapper .text-muted i {
    margin-right: 5px;
}

.alert-info {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    border-radius: 12px;
    padding: 12px 15px;
}
/* resources/assets/css/comments.css - Tambahkan ini */

/* Alert & Info Message */
.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    border-radius: 12px;
    padding: 12px 15px;
}

.info-message {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.info-message i {
    color: #5C6844;
}

.approved-title {
    font-size: 16px;
    font-weight: 600;
    color: #1C150F;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #5C6844;
}

.no-comments small {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    display: block;
}
/* ========== RESPONSIVE LENGKAP UNTUK HALAMAN KOMENTAR ========== */

/* Extra Large (1200px - 1399px) */
@media (max-width: 1399px) {
    .comments-section {
        padding: 50px 0;
        margin: 40px 20px;
    }
    
    .comment-form-wrapper,
    .comments-list {
        padding: 25px;
    }
}

/* Large (992px - 1199px) */
@media (max-width: 1199px) {
    .comments-section {
        padding: 45px 0;
        margin: 35px 15px;
    }
    
    .comments-title {
        font-size: 26px;
        margin-bottom: 35px;
    }
    
    .comment-form-wrapper {
        padding: 25px;
        margin-bottom: 40px;
    }
    
    .comments-list {
        padding: 20px;
    }
    
    .comment-item {
        padding: 20px 0;
        gap: 18px;
    }
    
    .avatar-icon {
        font-size: 40px;
    }
    
    .comment-author {
        font-size: 15px;
    }
    
    .comment-text {
        font-size: 13px;
    }
    
    .admin-reply {
        padding: 12px 16px;
    }
    
    .reply-text {
        font-size: 13px;
    }
}

/* Medium (768px - 991px) */
@media (max-width: 991px) {
    .comments-section {
        padding: 40px 0;
        margin: 30px 10px;
        border-radius: 16px;
    }
    
    .comments-title {
        font-size: 24px;
        margin-bottom: 30px;
        display: block;
        text-align: center;
    }
    
    .comments-title:after {
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
    }
    
    .comment-form-wrapper {
        padding: 20px;
        margin-bottom: 35px;
    }
    
    .comment-input,
    .comment-textarea {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .btn-publish {
        padding: 10px 25px;
        font-size: 13px;
        width: 100%;
    }
    
    .comments-list {
        padding: 15px;
    }
    
    .comment-item {
        flex-direction: column;
        gap: 12px;
        padding: 18px 0;
    }
    
    .comment-avatar {
        display: flex;
        justify-content: center;
    }
    
    .avatar-icon {
        font-size: 45px;
    }
    
    .comment-header {
        justify-content: center;
        text-align: center;
    }
    
    .comment-author {
        font-size: 14px;
    }
    
    .comment-date {
        font-size: 11px;
    }
    
    .comment-text {
        text-align: center;
        font-size: 13px;
    }
    
    .admin-reply {
        margin-top: 12px;
        padding: 12px 15px;
    }
    
    .reply-header {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .reply-text {
        text-align: center;
        font-size: 13px;
    }
    
    .approved-title {
        font-size: 15px;
        text-align: center;
    }
    
    .info-message {
        justify-content: center;
        font-size: 11px;
    }
    
    .alert-warning,
    .alert-info {
        font-size: 12px;
        text-align: center;
    }
}

/* Small (576px - 767px) */
@media (max-width: 767px) {
    .comments-section {
        padding: 30px 0;
        margin: 25px 8px;
        border-radius: 14px;
    }
    
    .comments-title {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    .comment-form-wrapper {
        padding: 18px;
        margin-bottom: 30px;
    }
    
    .comment-form .form-group {
        margin-bottom: 15px;
    }
    
    .comment-input,
    .comment-textarea {
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 10px;
    }
    
    .comment-textarea {
        min-height: 80px;
    }
    
    .btn-publish {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .comments-list {
        padding: 12px;
    }
    
    .comment-item {
        padding: 15px 0;
        gap: 10px;
    }
    
    .avatar-icon {
        font-size: 40px;
    }
    
    .comment-author {
        font-size: 13px;
    }
    
    .comment-date {
        font-size: 10px;
    }
    
    .comment-text {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .admin-reply {
        padding: 10px 12px;
    }
    
    .reply-header {
        gap: 8px;
    }
    
    .reply-author {
        font-size: 12px;
    }
    
    .reply-date {
        font-size: 10px;
    }
    
    .reply-text {
        font-size: 12px;
    }
    
    .approved-title {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .no-comments {
        padding: 30px 15px;
    }
    
    .no-comments i {
        font-size: 36px;
    }
    
    .no-comments p {
        font-size: 13px;
    }
    
    .no-comments small {
        font-size: 10px;
    }
    
    .info-message {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .alert-warning,
    .alert-info {
        padding: 10px 12px;
        font-size: 11px;
    }
}

/* Extra Small (320px - 575px) */
@media (max-width: 575px) {
    .comments-section {
        padding: 25px 0;
        margin: 20px 5px;
        border-radius: 12px;
    }
    
    .comments-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .comment-form-wrapper {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    .comment-input,
    .comment-textarea {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .btn-publish {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .comments-list {
        padding: 10px;
    }
    
    .comment-item {
        padding: 12px 0;
    }
    
    .avatar-icon {
        font-size: 35px;
    }
    
    .comment-header {
        gap: 4px;
    }
    
    .comment-author {
        font-size: 12px;
    }
    
    .comment-date {
        font-size: 9px;
    }
    
    .comment-text {
        font-size: 11px;
    }
    
    .admin-reply {
        padding: 8px 10px;
    }
    
    .reply-author {
        font-size: 11px;
    }
    
    .reply-date {
        font-size: 9px;
    }
    
    .reply-text {
        font-size: 11px;
    }
    
    .approved-title {
        font-size: 13px;
    }
    
    .no-comments {
        padding: 20px 10px;
    }
    
    .no-comments i {
        font-size: 32px;
    }
    
    .info-message {
        font-size: 9px;
        padding: 5px 8px;
    }
}

/* Landscape mode untuk mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .comments-section {
        padding: 20px 0;
    }
    
    .comment-form-wrapper {
        padding: 15px;
    }
    
    .comments-list {
        padding: 15px;
    }
    
    .comment-item {
        flex-direction: row;
        gap: 15px;
    }
    
    .comment-avatar {
        flex-shrink: 0;
    }
    
    .avatar-icon {
        font-size: 35px;
    }
    
    .comment-header {
        justify-content: flex-start;
        text-align: left;
    }
    
    .comment-text {
        text-align: left;
    }
    
    .admin-reply {
        text-align: left;
    }
    
    .reply-header {
        justify-content: flex-start;
    }
    
    .reply-text {
        text-align: left;
    }
}

/* Tablet landscape (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .comments-section {
        padding: 45px 0;
    }
    
    .comment-item {
        flex-direction: row;
        gap: 20px;
    }
    
    .comment-avatar {
        flex-shrink: 0;
    }
    
    .comment-header {
        justify-content: flex-start;
    }
    
    .comment-text {
        text-align: left;
    }
    
    .admin-reply {
        text-align: left;
    }
}

/* Print styles */
@media print {
    .comments-section {
        background: white;
        padding: 20px;
        margin: 0;
        box-shadow: none;
    }
    
    .comment-form-wrapper {
        display: none;
    }
    
    .btn-publish {
        display: none;
    }
    
    .comments-list {
        background: white;
        padding: 0;
    }
    
    .comment-item {
        page-break-inside: avoid;
        border-bottom: 1px solid #ddd;
    }
    
    .admin-reply {
        background: #f5f5f5;
        border-left: 2px solid #333;
    }
}


/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .btn-publish {
        min-height: 48px;
    }
    
    .comment-input,
    .comment-textarea {
        font-size: 16px; /* Mencegah zoom otomatis di iOS */
    }
    
    .btn-publish:active {
        transform: scale(0.98);
    }
}

/* Loading state untuk komentar */
.comment-loading {
    text-align: center;
    padding: 20px;
}

.comment-loading .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #5C6844;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

@media (max-width: 575px) {
    .comment-loading .spinner {
        width: 25px;
        height: 25px;
    }
}

/* Smooth transition untuk responsive */
.comments-section,
.comment-form-wrapper,
.comments-list,
.comment-item {
    transition: all 0.3s ease;
}