/* Giao diện Đánh giá sản phẩm thông minh - Premium WooCommerce Reviews */

.dawp-reviews-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    color: #334155;
    margin: 30px auto;
    max-width: 100%;
}

/* 0. Header Title */
.dawp-reviews-title-header {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 15px 0;
}

/* 1. Reviews Summary */
.dawp-reviews-summary {
    display: flex;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 25px;
    gap: 20px;
    align-items: center;
}

.dawp-summary-left {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e2e8f0;
    padding-right: 20px;
    text-align: center;
}

@media (max-width: 768px) {
    .dawp-summary-left {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-right: 0;
        padding-bottom: 15px;
    }
}

.dawp-rating-avg-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 5px;
}

.dawp-rating-avg {
    font-size: 52px;
    font-weight: 800;
    color: #ff9800; /* Orange vibrant */
    line-height: 1;
}

.dawp-rating-avg-star {
    font-size: 36px;
    color: #ff9800;
    line-height: 1;
}

.dawp-rating-avg-text {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dawp-summary-center {
    flex: 2.2;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.dawp-summary-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
}

.dawp-bar-label {
    width: 25px;
    color: #475569;
    text-align: right;
    white-space: nowrap;
}

.dawp-bar-track {
    flex: 1;
    height: 8px;
    background: #f1f5f9;
    border-radius: 2px;
    overflow: hidden;
}

.dawp-bar-fill {
    height: 100%;
    background: #ff9800;
    border-radius: 2px;
    transition: width 0.6s ease;
}

.dawp-bar-count {
    width: 120px;
    color: #0088cc;
    font-size: 12px;
}

.dawp-summary-right {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dawp-btn-toggle-form {
    background: #0088cc; /* Blue matching screenshot */
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 136, 204, 0.15);
    width: 100%;
    box-sizing: border-box;
}

.dawp-btn-toggle-form:hover {
    background: #0077b3;
}

.dawp-btn-toggle-form.active {
    background: #ef4444;
}

/* 2. Review Form Container */
.dawp-review-form-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 25px;
    animation: dawpSlideDown 0.25s ease-out;
}

@keyframes dawpSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dawp-form-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}

.dawp-form-group {
    margin-bottom: 15px;
}

.dawp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .dawp-form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.dawp-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.dawp-form-label span.required {
    color: #ef4444;
}

.dawp-form-control {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    color: #0f172a;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.dawp-form-control:focus {
    outline: none;
    border-color: #0088cc;
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.08);
}

/* Rating Stars Input */
.dawp-rating-select-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 4px;
}

.dawp-rating-stars-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.dawp-star-select {
    font-size: 26px;
    color: #cbd5e1;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.1s ease;
}

.dawp-star-select:hover,
.dawp-star-select:hover ~ .dawp-star-select,
.dawp-star-select.selected,
.dawp-star-select.selected ~ .dawp-star-select {
    color: #ff9800;
}

.dawp-star-select:active {
    transform: scale(0.9);
}

.dawp-rating-desc {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

/* Tags Checklist Selection in Form */
.dawp-form-tags-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.dawp-tag-select-item {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.dawp-tag-select-item input[type="checkbox"] {
    margin: 0 6px 0 0;
    padding: 0;
    width: 14px;
    height: 14px;
}

.dawp-tag-select-item:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.dawp-tag-select-item:has(input:checked) {
    background: #ecf8ff;
    border-color: #0088cc;
    color: #0088cc;
    font-weight: 500;
}

/* Image Upload Area */
.dawp-image-upload-zone {
    border: 2px dashed #cbd5e1;
    background: #ffffff;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dawp-image-upload-zone:hover,
.dawp-image-upload-zone.dragover {
    border-color: #0088cc;
    background: #f8fafc;
}

.dawp-upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #64748b;
    pointer-events: none;
}

.dawp-upload-prompt * {
    pointer-events: none;
}

.dawp-upload-prompt span.dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #475569;
}

.dawp-upload-prompt p {
    margin: 4px 0 0 0;
    font-size: 13px;
    font-weight: 600;
}

.dawp-upload-note {
    font-size: 11px;
    color: #94a3b8;
}

/* Preview grid */
.dawp-image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.dawp-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.dawp-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dawp-preview-item .remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

.dawp-preview-item .remove-btn:hover {
    background: rgba(239, 68, 68, 0.9);
}

/* Submit row */
.dawp-form-submit-row {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.dawp-btn-submit {
    background: #0088cc;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    min-width: 120px;
}

.dawp-btn-submit:hover:not(:disabled) {
    background: #0077b3;
}

.dawp-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dawp-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: dawpSpin 0.8s linear infinite;
}

@keyframes dawpSpin {
    to { transform: rotate(360deg); }
}

.dawp-form-message {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    display: none;
}

.dawp-form-message.success {
    display: block;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.dawp-form-message.error {
    display: block;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* 2.1 Customer Gallery Section */
.dawp-reviews-customer-gallery {
    margin-bottom: 25px;
}

.dawp-gallery-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
}

.dawp-gallery-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.dawp-gallery-scroll::-webkit-scrollbar {
    height: 6px;
}

.dawp-gallery-scroll::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.dawp-gallery-item {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.dawp-gallery-item:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.dawp-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3. Review Filters Bar */
.dawp-reviews-filters {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 20px;
}

.dawp-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dawp-filter-btn {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.dawp-filter-btn:hover {
    background: #f1f5f9;
}

.dawp-filter-btn.active {
    background: #0088cc;
    color: #ffffff;
    border-color: #0088cc;
}

/* 4. Reviews List */
.dawp-reviews-list-outer {
    position: relative;
    min-height: 100px;
}

.dawp-reviews-loading {
    text-align: center;
    padding: 30px;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.dawp-no-reviews {
    text-align: center;
    padding: 35px 20px;
    font-size: 14px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.dawp-review-item {
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
    animation: dawpFading 0.25s ease;
}

@keyframes dawpFading {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.dawp-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 8px;
}

.dawp-reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dawp-reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    user-select: none;
}

.dawp-reviewer-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dawp-reviewer-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.dawp-reviewer-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.dawp-verified-badge {
    font-size: 11px;
    color: #2e7d32; /* Green Verified Purchase Badge */
    font-weight: 700;
}

.dawp-review-stars .dawp-star {
    font-size: 13px;
}

.dawp-review-stars .dawp-star.full,
.dawp-review-stars .dawp-star.half {
    color: #ff9800;
}

.dawp-review-stars .dawp-star.empty {
    color: #cbd5e1;
}

.dawp-review-body {
    padding-left: 52px;
}

@media (max-width: 480px) {
    .dawp-review-body {
        padding-left: 0;
    }
}

.dawp-review-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: #334155;
    word-break: break-word;
}

/* Badges / Pill Tags display on reviews list */
.dawp-review-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.dawp-review-tag-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}

.dawp-review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.dawp-review-img-thumb {
    width: 70px;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.dawp-review-img-thumb:hover {
    transform: scale(1.02);
    border-color: #475569;
}

.dawp-review-img-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Review Footer Links */
.dawp-review-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding-left: 52px;
}

@media (max-width: 480px) {
    .dawp-review-footer {
        padding-left: 0;
    }
}

.dawp-btn-reply-link {
    background: none;
    border: none;
    padding: 0;
    color: #0088cc;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

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

.dawp-footer-dot {
    color: #cbd5e1;
    font-size: 12px;
}

.dawp-review-footer-date {
    color: #94a3b8;
    font-size: 11px;
}

/* Review Reply by Admin */
.dawp-review-reply {
    margin-top: 15px;
    margin-left: 52px;
    background: #f1f5f9;
    border-left: 3px solid #64748b;
    border-radius: 0 4px 4px 0;
    padding: 12px 16px;
}

@media (max-width: 480px) {
    .dawp-review-reply {
        margin-left: 0;
    }
}

.dawp-reply-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.dawp-reply-header span.dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1.2;
}

.dawp-reply-author {
    color: #0f172a;
}

.dawp-reply-date {
    color: #94a3b8;
    font-weight: 500;
}

.dawp-reply-body {
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
}

/* Pagination */
.dawp-reviews-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 25px;
}

.dawp-page-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dawp-page-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.dawp-page-btn.active {
    background: #0088cc;
    border-color: #0088cc;
    color: #ffffff;
}

/* 5. Lightbox css */
.dawp-lightbox {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dawp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.15s ease;
    user-select: none;
}

.dawp-lightbox-close:hover {
    color: #cbd5e1;
}

.dawp-lightbox-content-wrap {
    position: relative;
    max-width: 85%;
    max-height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dawp-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    animation: dawpZoom 0.25s ease-out;
}

@keyframes dawpZoom {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.dawp-lightbox-prev,
.dawp-lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: 0.15s ease;
    user-select: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.dawp-lightbox-prev:hover,
.dawp-lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dawp-lightbox-prev {
    left: -60px;
}

.dawp-lightbox-next {
    right: -60px;
}

@media (max-width: 768px) {
    .dawp-lightbox-prev {
        left: 10px;
    }
    .dawp-lightbox-next {
        right: 10px;
    }
}
