/* Custom Category Review - Frontend styles (modern UI) */
.ccr-form-wrapper,
.ccr-reviews-wrapper {
    max-width: 100%;
    margin: 2.5em auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
    color: #0f172a;
}

/* Card shells */
.ccr-form-wrapper .ccr-review-form,
.ccr-reviews-wrapper {
    background: radial-gradient(circle at top left, #f5f9ff 0, #ffffff 55%, #f9fafb 100%);
    border-radius: 18px;
    padding: 1.75em 1.75em 1.9em;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.12),
        0 1px 0 rgba(148, 163, 184, 0.2);
    border: 1px solid rgba(148, 163, 184, 0.22);
    backdrop-filter: blur(8px);
}

.ccr-form-title,
.ccr-reviews-title {
    margin-top: 0;
    margin-bottom: 0.75em;
    font-size: 1.7rem;
    letter-spacing: -0.03em;
    font-weight: 650;
    color: #020617;
}

/* Form intro */
.ccr-form-intro {
    margin: 0 0 1em;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #475569;
}

/* Form tips */
.ccr-form-tips {
    margin-bottom: 1.5em;
    padding: 1em 1.25em;
    background: rgba(59, 130, 246, 0.06);
    border-left: 4px solid #3b82f6;
    border-radius: 0 10px 10px 0;
}
.ccr-tips-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e40af;
    display: block;
    margin-bottom: 0.5em;
}
.ccr-form-tips ul {
    margin: 0;
    padding-left: 1.25em;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.7;
}

/* Field hints */
.ccr-field-hint {
    margin: 0 0 0.5em;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 400;
}

/* Reviews section intro */
.ccr-reviews-intro {
    margin: 0 0 1.25em;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #475569;
}

/* Empty state when no reviews */
.ccr-empty-state {
    text-align: center;
    padding: 2.5em 1.5em;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), rgba(241, 245, 249, 0.5));
    border-radius: 16px;
    border: 2px dashed rgba(148, 163, 184, 0.4);
}
.ccr-empty-icon {
    font-size: 2.5rem;
    color: #fbbf24;
    opacity: 0.7;
    margin-bottom: 0.75em;
}
.ccr-empty-title {
    margin: 0 0 0.5em;
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
}
.ccr-empty-text {
    margin: 0 0 0.75em;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}
.ccr-empty-cta {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

/* subtle section label above main titles */
.ccr-form-wrapper::before,
.ccr-reviews-wrapper::before {
    content: attr(data-label);
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.ccr-review-form .ccr-field {
    margin-bottom: 1.25em;
}
.ccr-review-form label {
    display: block;
    margin-bottom: 0.35em;
    font-weight: 500;
    color: #1e1e1e;
}
.ccr-review-form .required { color: #b32d2e; }
.ccr-review-form input[type="text"],
.ccr-review-form select,
.ccr-review-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.7em 0.85em;
    border: 1px solid rgba(148, 163, 184, 0.6);
    border-radius: 999px;
    font-size: 0.97rem;
    background: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.08s ease;
}
.ccr-review-form input:focus,
.ccr-review-form select:focus,
.ccr-review-form textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.9), 0 0 0 8px rgba(37, 99, 235, 0.14);
    background: #ffffff;
    transform: translateY(-1px);
}
.ccr-review-form textarea {
    min-height: 110px;
    resize: vertical;
    border-radius: 18px;
}
.ccr-honey { position: absolute; left: -9999px; }

/* Star rating */
.ccr-star-rating {
    display: flex;
    gap: 6px;
    font-size: 1.75rem;
    cursor: pointer;
    color: #cbd5f5;
}
.ccr-star-rating .ccr-star {
    color: inherit;
    text-shadow: 0 0 0 rgba(15, 23, 42, 0.15);
    transition:
        color 0.14s ease,
        transform 0.12s ease,
        text-shadow 0.18s ease;
}
.ccr-star-rating .ccr-star:hover,
.ccr-star-rating .ccr-star.active {
    color: #facc15;
    text-shadow:
        0 8px 18px rgba(250, 204, 21, 0.45),
        0 0 2px rgba(30, 64, 175, 0.4);
}
.ccr-star-rating .ccr-star:hover {
    transform: translateY(-1px) scale(1.07);
}

/* Image preview */
.ccr-image-preview {
    margin-top: 0.5em;
}
.ccr-image-preview img {
    max-width: 160px;
    height: auto;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* Submit */
.ccr-submit {
    background-image: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    border: none;
    padding: 0.7em 1.6em;
    font-size: 0.98rem;
    border-radius: 999px;
    cursor: pointer;
    margin-top: 0.5em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow:
        0 10px 25px rgba(37, 99, 235, 0.35),
        0 0 0 1px rgba(15, 23, 42, 0.02);
    font-weight: 500;
    letter-spacing: 0.02em;
    transition:
        transform 0.12s ease,
        box-shadow 0.15s ease,
        filter 0.1s ease;
}
.ccr-submit::after {
    content: '↗';
    font-size: 0.85rem;
}
.ccr-submit:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 32px rgba(37, 99, 235, 0.45),
        0 0 0 1px rgba(15, 23, 42, 0.06);
    filter: brightness(1.02);
}
.ccr-submit:active {
    transform: translateY(0);
    box-shadow:
        0 6px 14px rgba(37, 99, 235, 0.4),
        0 0 0 1px rgba(15, 23, 42, 0.1);
}
.ccr-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}
.ccr-form-message {
    margin-top: 1em;
    padding: 0.75em;
    border-radius: 6px;
    display: none;
}
.ccr-form-message.show { display: block; }
.ccr-form-message.success { background: #d4edda; color: #155724; }
.ccr-form-message.error { background: #f8d7da; color: #721c24; }

/* Summary */
.ccr-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.75em;
    margin-bottom: 1.75em;
    padding: 1.1em 1.35em;
    background: linear-gradient(135deg, #0f172a, #020617);
    border-radius: 18px;
    color: #e5e7eb;
    position: relative;
    overflow: hidden;
}
.ccr-summary::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.35), transparent 55%),
        radial-gradient(circle at bottom right, rgba(52, 211, 153, 0.25), transparent 55%);
    opacity: 0.8;
    pointer-events: none;
}
.ccr-summary > * {
    position: relative;
}
.ccr-avg-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ccr-avg-number { font-size: 2.4rem; font-weight: 750; color: #fbbf24; }
.ccr-avg-max { font-size: 1rem; color: #e5e7eb; }
.ccr-avg-stars { margin: 0.25em 0; }
.ccr-total { font-size: 0.9rem; color: #cbd5f5; }
.ccr-filter .ccr-filter-form { display: inline-flex; flex-wrap: wrap; gap: 0.5em; align-items: center; }
.ccr-filter select {
    padding: 0.45em 0.9em;
    border: 1px solid rgba(148, 163, 184, 0.7);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    font-size: 0.9rem;
}
.ccr-filter-btn {
    padding: 0.45em 0.9em;
    background: #f97316;
    color: #111827;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 0.35em;
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.4);
    transition: transform 0.1s ease, box-shadow 0.15s ease, filter 0.12s ease;
}
.ccr-filter-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.45);
}

/* Review cards */
.ccr-reviews-list { margin-top: 1em; }
.ccr-review-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    padding: 1.25em;
    margin-bottom: 1em;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.10),
        0 1px 0 rgba(148, 163, 184, 0.18);
    transition:
        transform 0.12s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease,
        background-color 0.12s ease;
}
.ccr-review-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.45);
    background-color: #f9fafb;
}
.ccr-review-card.ccr-5star {
    border-left: 4px solid #fbbf24;
}
.ccr-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5em 1em;
    margin-bottom: 0.75em;
}
.ccr-author { margin-right: 0.25em; }
.ccr-verified {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.8rem;
}
.ccr-category-badge {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    font-size: 0.8rem;
}
.ccr-card-rating { margin-left: auto; }
.ccr-date { font-size: 0.85rem; color: #666; }
.ccr-card-body {
    color: #333;
    line-height: 1.5;
    margin-bottom: 0.5em;
}
.ccr-card-image img {
    max-width: 200px;
    height: auto;
    border-radius: 12px;
    margin-top: 0.5em;
}
.ccr-stars-inline .ccr-star-inline { color: #ddd; }
.ccr-stars-inline .ccr-star-inline.filled { color: #f0b429; }
.ccr-stars-inline .ccr-star-inline.half { color: #f0b429; opacity: 0.7; }
.ccr-no-reviews { color: #666; padding: 1.5em 0; }
.ccr-pagination {
    margin-top: 1.5em;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25em;
}
.ccr-pagination a,
.ccr-pagination span {
    padding: 0.4em 0.7em;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #2271b1;
}
.ccr-pagination a:hover { background: #f0f0f1; }
.ccr-pagination .current { background: #2271b1; color: #fff; border-color: #2271b1; }

@media (max-width: 640px) {
    .ccr-summary { flex-direction: column; align-items: flex-start; }
    .ccr-card-header { flex-direction: column; align-items: flex-start; }
    .ccr-card-rating { margin-left: 0; }
}
input#ccr_image {
    border-radius: 12px !important;
    background: linear-gradient(135deg, #5f9ea0, #4aa3a3) !important;
    padding: 14px 18px !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

input#ccr_image:hover {
    background: linear-gradient(135deg, #4aa3a3, #3d8b8b) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2) !important;
}

input#ccr_image:focus {
    box-shadow: 0 0 0 3px rgba(95, 158, 160, 0.4) !important;
}