/* ===== ACF View Table Styles ===== */

/* Wrapper & Table Base */
.acf-view-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #fff;
}

.acf-view-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Table Header */
.acf-view-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.acf-view-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 3px solid #5568d3;
}

/* Table Body */
.acf-view-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.acf-view-table tbody tr:hover {
    background-color: #f9fafb;
}

.acf-view-table tbody tr:last-child {
    border-bottom: none;
}

.acf-view-table td {
    padding: 14px 12px;
    font-size: 14px;
    color: #374151;
    vertical-align: top;
}

/* Label Cell */
.acf-view-table td.label-cell {
    font-weight: 600;
    color: #1f2937;
    background-color: #f3f4f6;
    width: 220px;
    white-space: nowrap;
}

/* Value Cell */
.acf-view-table td.value-cell {
    color: #4b5563;
}

/* Money Values */
.acf-view-table td.value-money {
    font-weight: 600;
    color: #059669;
    font-size: 15px;
}

/* Address Text */
.acf-view-table td .address-text {
    line-height: 1.6;
    color: #6b7280;
}

/* Tracking Code */
.acf-view-table td .tracking-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #7c3aed;
    background-color: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* Links */
.acf-view-table a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.acf-view-table a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* File Links */
.acf-view-table .file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    color: #0284c7;
    font-weight: 500;
    transition: all 0.2s ease;
}

.acf-view-table .file-link:hover {
    background-color: #e0f2fe;
    border-color: #7dd3fc;
    text-decoration: none;
    transform: translateY(-1px);
}

.acf-view-table .file-icon {
    font-size: 16px;
}

/* Status Badges */
.acf-view-table .status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    background-color: #27ae60;
    color: white;
}

.acf-view-table .status-delivery.full {
  background-color: #27ae60; /* Xanh lá */
  color: white;
}

.acf-view-table .status-delivery.partial {
  background-color: #f1c40f; /* Vàng */
  color: white;
}

.acf-view-table .status-delivery.started {
  background-color: #3498db; /* Xanh dương */
  color: white;
}

.acf-view-table .status-delivery.pending {
  background-color: #e67e22; /* Cam */
  color: white;
}

.acf-view-table .status-delivery.unknown {
  background-color: #7f8c8d; /* Xám */
  color: white;
}

.acf-view-table .status-badge.status-invoice {
    background-color: #fef3c7;
    color: #92400e;
}

.acf-view-table .status-badge.status-complete {
    background-color: #d1fae5;
    color: #065f46;
}

/* VAT Badge */
.acf-view-table .vat-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
}

.acf-view-table .vat-badge.active {
    background-color: #d1fae5;
    color: #065f46;
}

.acf-view-table .vat-badge.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ===================================
   COMMENT HISTORY STYLES
   =================================== */

.comment-history {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f3f4f6;
}

.comment-history h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Comment List */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* No Comments */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
}

.no-comments.error {
    background: #fef2f2;
    color: #991b1b;
}

/* Loading Comments */
.loading-comments {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.loading-comments .spinner {
    display: inline-block;
    margin-right: 8px;
}

/* ===================================
   COMMENT ITEM BASE
   =================================== */

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.comment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===================================
   KHÁCH HÀNG COMMENT (Màu xanh dương)
   =================================== */

.comment-item.customer-comment {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #3b82f6;
    border-left: 5px solid #2563eb;
}

.comment-item.customer-comment::before {
    content: '👤';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 20px;
    opacity: 0.3;
}

.customer-comment .comment-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.customer-comment .comment-author {
    color: #1e40af;
}

.customer-comment .comment-body {
    color: #1e3a8a;
}

/* ===================================
   NHÂN VIÊN COMMENT (Màu xanh lá)
   =================================== */

.comment-item.staff-comment {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #10b981;
    border-left: 5px solid #059669;
}

.comment-item.staff-comment::before {
    content: '💼';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 20px;
    opacity: 0.3;
}

.staff-comment .comment-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.staff-comment .comment-author {
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 6px;
}

.staff-comment .comment-author::after {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
}

.staff-comment .comment-body {
    color: #064e3b;
}

/* ===================================
   COMMENT AVATAR
   =================================== */

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

.avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: white;
    font-weight: 700;
    font-size: 18px;
    border-radius: 50%;
    border: 3px solid white;
    text-transform: uppercase;
}

/* ===================================
   COMMENT CONTENT
   =================================== */

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

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.comment-author {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.2px;
}

.comment-date {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    font-weight: 500;
    background: white;
    padding: 3px 8px;
    border-radius: 12px;
}

.customer-comment .comment-date {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.staff-comment .comment-date {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.comment-body {
    font-size: 14px;
    line-height: 1.7;
    word-wrap: break-word;
}

.comment-body p {
    margin: 0 0 12px 0;
}

.comment-body p:last-child {
    margin-bottom: 0;
}

/* Quoted text in comment */
.comment-body blockquote {
    margin: 12px 0;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.7);
    border-left: 3px solid currentColor;
    border-radius: 4px;
    font-style: italic;
}

.customer-comment .comment-body blockquote {
    border-left-color: #3b82f6;
}

.staff-comment .comment-body blockquote {
    border-left-color: #10b981;
}

/* ===================================
   SPECIAL BADGES
   =================================== */

/* Badge cho comment từ Portal */
.customer-comment.from-portal::after {
    content: 'Từ Portal';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #3b82f6;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge cho reply nhanh từ nhân viên */
.staff-comment.quick-reply::after {
    content: 'Phản hồi nhanh';
    position: absolute;
    top: 8px;
    right: 8px;
    background: #10b981;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .comment-item {
        padding: 14px;
        gap: 10px;
    }

    .comment-item::before {
        font-size: 16px;
        top: 10px;
        right: 10px;
    }

    .avatar-initial {
        width: 38px;
        height: 38px;
        font-size: 16px;
        border-width: 2px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .comment-author {
        font-size: 14px;
    }

    .comment-date {
        font-size: 11px;
        padding: 2px 6px;
    }

    .comment-body {
        font-size: 13px;
        line-height: 1.6;
    }

    .customer-comment.from-portal::after,
    .staff-comment.quick-reply::after {
        font-size: 9px;
        padding: 2px 6px;
        top: 6px;
        right: 6px;
    }
}

/* ===================================
   DARK MODE SUPPORT (Optional)
   =================================== */

@media (prefers-color-scheme: dark) {
    .comment-item.customer-comment {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
        border-color: #3b82f6;
    }

    .comment-item.staff-comment {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
        border-color: #10b981;
    }

    .comment-author,
    .comment-body {
        color: white;
    }

    .comment-date {
        background: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.8);
    }
}
/* end */

/* Form validation styles */
.form-group.error #comment-text {
    border-color: #ef4444;
}

.form-group.error .error-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #ef4444;
}

.error-message {
    display: none;
}


/* Responsive Design */
@media (max-width: 768px) {
    .acf-view-table th,
    .acf-view-table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .acf-view-table td.label-cell {
        width: 160px;
        font-size: 12px;
    }
    
    .acf-view-table .file-link {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .acf-view-table .status-badge,
    .acf-view-table .vat-badge {
        padding: 4px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .acf-view-table-wrapper {
        margin: 10px 0;
        border-radius: 6px;
    }
    
    .acf-view-table th {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .acf-view-table td.label-cell {
        width: 130px;
    }
}
.entry-meta{
    display: none;
}
.single .post-navigation a{
    display:none;
}