﻿/* ============================================================
   COMPLAINT MODULE - VistaGamble MainApp
   Refined editorial design: confident, trustworthy, clean
   ============================================================ */

/* --- Hero / Page Header --- */
.complaint-hero {
    background: linear-gradient(135deg, var(--bleachedcedar) 0%, var(--dark-light) 50%, var(--bleachedcedar) 100%);
    position: relative;
    overflow: hidden;
    padding: 3.5rem 0 3rem;
    margin-top: -1px;
}

.complaint-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(254, 80, 1, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.complaint-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(254, 80, 1, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.complaint-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(254, 80, 1, 0.15);
    color: var(--orange-light);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: 1px solid rgba(254, 80, 1, 0.25);
    margin-bottom: 1rem;
}

.complaint-hero h1 {
    color: #fff;
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.complaint-hero .hero-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.05rem;
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
}

.complaint-hero .hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
}

.complaint-hero .hero-stat {
    text-align: center;
}

.complaint-hero .hero-stat-value {
    display: block;
    color: var(--orange);
    font-size: 1.5rem;
    font-weight: 800;
}

.complaint-hero .hero-stat-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.complaint-hero .btn-submit-cta {
    margin-top: 1.5rem;
}

/* Hero action row: primary CTA + secondary ghost link side by side, wrapping on mobile */
.complaint-hero .hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.5rem;
}
.complaint-hero .hero-actions .btn-submit-cta { margin-top: 0; }

/* Secondary ghost button on the dark hero — must not compete with the orange primary CTA */
.btn-hero-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-weight: 700;
    font-size: 0.925rem;
    text-decoration: none;
    transition: var(--transition);
}
.btn-hero-ghost i { color: var(--orange-light); }
.btn-hero-ghost:hover {
    border-color: rgba(254, 80, 1, 0.6);
    background: rgba(254, 80, 1, 0.12);
    color: #fff;
    transform: translateY(-2px);
}

/* --- Breadcrumb --- */
.complaint-breadcrumb {
    padding: 1rem 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.complaint-breadcrumb .breadcrumb {
    margin: 0;
    font-size: 0.875rem;
}

.complaint-breadcrumb .breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.complaint-breadcrumb .breadcrumb-item a:hover {
    color: var(--orange);
}

.complaint-breadcrumb .breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* --- Complaint Cards (Index / ByCasino) — diagonal-banner design --- */
.mdr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.mdr-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #ece7f2;
    box-shadow: 0 10px 24px rgba(40, 30, 50, 0.09), 0 2px 6px rgba(40, 30, 50, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.mdr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(40, 30, 50, 0.13), 0 2px 6px rgba(40, 30, 50, 0.05);
    border-color: rgba(254, 80, 1, 0.25);
}

/* Entrance is enhancement-only: cards are visible by default and animate from the hidden
   keyframe only when motion is allowed — content must never depend on an animation firing. */
@media (prefers-reduced-motion: no-preference) {
    .mdr-card { animation: mdrRise 0.6s cubic-bezier(0.22, 0.8, 0.32, 1) backwards; }
    .mdr-card:nth-child(2) { animation-delay: 0.06s; }
    .mdr-card:nth-child(3) { animation-delay: 0.12s; }
}

@keyframes mdrRise {
    from { opacity: 0; transform: translateY(16px); }
}

.mdr-banner {
    position: relative;
    background: #281e32;
    height: 104px;
    clip-path: polygon(0 0, 100% 0, 100% 74%, 0 100%);
    flex-shrink: 0;
}

.mdr-banner-shape {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 55%, rgba(254, 80, 1, 0.9) 55%, rgba(254, 80, 1, 0.9) 60%, transparent 60%);
    opacity: 0.5;
}

/* Outcome traffic light on the diagonal stripe:
   yellow = in progress, green = resolved, red = closed without resolution */
.mdr-banner-shape.mdr-shape-active { background: linear-gradient(115deg, transparent 55%, rgba(255, 196, 61, 0.9) 55%, rgba(255, 196, 61, 0.9) 60%, transparent 60%); }
.mdr-banner-shape.mdr-shape-resolved { background: linear-gradient(115deg, transparent 55%, rgba(21, 163, 91, 0.9) 55%, rgba(21, 163, 91, 0.9) 60%, transparent 60%); }
.mdr-banner-shape.mdr-shape-closed { background: linear-gradient(115deg, transparent 55%, rgba(225, 66, 66, 0.9) 55%, rgba(225, 66, 66, 0.9) 60%, transparent 60%); }

.mdr-ticket-id {
    position: absolute;
    top: 18px;
    left: 22px;
    font-size: 11px;
    font-weight: 700;
    color: #c9bfd4;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    z-index: 2;
}

.mdr-status-tag {
    position: absolute;
    top: 16px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 6px 11px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffd27a;
    z-index: 2;
}

.mdr-status-tag svg { width: 11px; height: 11px; flex-shrink: 0; }
/* Pill tints follow the stripe's traffic light: yellow in progress (base), green resolved, red closed */
.mdr-status-tag.mdr-review { color: #ffd27a; }
.mdr-status-tag.mdr-resolved { color: #7fe8b3; }
.mdr-status-tag.mdr-closed { color: #ff9a9a; }

/* Doubles as the initial-letter fallback tile when the casino has no logo */
.mdr-logo-wrap {
    position: relative;
    margin: -32px 0 0 22px;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(40, 30, 50, 0.15);
    z-index: 2;
    background: #281e32;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 22px;
}

.mdr-logo-wrap img { width: 100%; height: 100%; object-fit: cover; }

.mdr-body {
    padding: 14px 22px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mdr-casino-name {
    font-size: 18px;
    font-weight: 800;
    color: #281e32;
    margin: 0 0 2px;
}

.mdr-casino-name a { color: inherit; text-decoration: none; }
.mdr-casino-name a:hover { color: var(--orange); }

.mdr-casino-sub {
    font-size: 12.5px;
    color: #8a7f96;
    margin: 0 0 16px;
}

.mdr-stat-band {
    display: flex;
    background: #f4f1f7;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

.mdr-stat-cell {
    flex: 1;
    padding: 11px 14px;
    position: relative;
}

.mdr-stat-cell + .mdr-stat-cell::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: #ece7f2;
}

.mdr-stat-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #8a7f96;
    margin-bottom: 3px;
}

.mdr-stat-value {
    font-size: 17px;
    font-weight: 800;
    color: #281e32;
}

.mdr-stat-value.mdr-accent { color: #d94d00; }

.mdr-desc {
    font-size: 13.5px;
    line-height: 1.55;
    color: #8a7f96;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mdr-actions {
    display: flex;
    gap: 9px;
    margin-top: auto;
}

.mdr-btn {
    flex: 1;
    border: none;
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.mdr-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.mdr-btn:active { transform: scale(0.97); }
.mdr-btn-primary { background: var(--orange); color: #fff; }
.mdr-btn-primary:hover { background: #d94d00; color: #fff; }
.mdr-btn-ghost { background: #f4f1f7; color: #281e32; }
.mdr-btn-ghost:hover { background: #e9e2f0; color: #281e32; }

/* --- Status & Resolution Badges --- */
.status-badge,
.resolution-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.status-badge { text-transform: uppercase; }

/* Same traffic light as the card stripes/pills, in light-background variants:
   yellow = in progress, green = resolved, red = closed/unresolved, gray = rejected */
.status-open,
.status-underreview,
.status-waitingforplayer,
.status-waitingforcasino { background: #fff3d1; color: #8a6100; }
.status-resolved { background: #e2f6ec; color: #107a45; }
.status-closed { background: #fdeaea; color: #c43333; }

.resolution-resolved { background: #e2f6ec; color: #107a45; }
.resolution-unresolved { background: #fdeaea; color: #c43333; }
.resolution-rejected { background: #f1eef5; color: #6f6580; }
.resolution-opened { background: #fff3d1; color: #8a6100; }

/* --- Submit Form --- */
.complaint-form-wrapper {
    max-width: 820px;
    margin: 0 auto;
    position: relative; /* anchor point for the Select2 dropdowns — see Submit.cshtml. Select2's
                           body-append positioning miscomputes here (sets the panel to top:-974427px);
                           anchoring the panel to this local positioned wrapper makes it position
                           relative to the field, which is correct. */
}

.complaint-form-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    /* No overflow:hidden — it would clip the custom-select dropdown panels. The footer rounds its
       own bottom corners (below) so the card still looks clipped at the corners. */
}

.complaint-form-card .form-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.complaint-form-card .form-section:last-of-type {
    border-bottom: none;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.form-section-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--orange-light));
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.form-section-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin: 0;
}

.complaint-form-card .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.complaint-form-card .form-control,
.complaint-form-card .form-select {
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    transition: border-color 0.25s, box-shadow 0.25s;
    background-color: #fff;
}

.complaint-form-card .form-control:focus,
.complaint-form-card .form-select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(254, 80, 1, 0.1);
}

.complaint-form-card textarea.form-control {
    resize: vertical;
    min-height: 140px;
}

/* --- Validation states --- */
/* Per-field error text */
.complaint-form-card .text-danger {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.825rem;
    font-weight: 500;
}

/* Invalid inputs (class added by jQuery unobtrusive validation) */
.complaint-form-card .input-validation-error {
    border-color: #dc3545 !important;
}

.complaint-form-card .input-validation-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12) !important;
}

/* The native <select> is hidden by Select2 — mirror its error state onto the rendered control */
.complaint-form-card select.input-validation-error + .select2-container .select2-selection--single {
    border-color: #dc3545;
}

/* Model-level error summary (e.g. the duplicate-complaint guard) */
.complaint-validation-summary {
    display: none;
}

.complaint-validation-summary.validation-summary-errors {
    display: block;
    background: #fdecea;
    border: 1px solid #f5c2c0;
    color: #842029;
    border-radius: 12px;
    padding: 0.875rem 1.125rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.complaint-validation-summary ul {
    margin: 0;
    padding-left: 1.15rem;
}

.complaint-validation-summary li {
    margin: 0.15rem 0;
}

.form-footer {
    padding: 1.5rem 2rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    /* Round the bottom corners ourselves since the card no longer clips with overflow:hidden. */
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.btn-submit-complaint {
    background: linear-gradient(135deg, var(--orange), var(--orange-light));
    color: #fff;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(254, 80, 1, 0.3);
    cursor: pointer;
}

.btn-submit-complaint:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 80, 1, 0.4);
    color: #fff;
}

.btn-submit-complaint:active {
    transform: translateY(0);
}

.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    background: var(--bg-light);
    transition: border-color 0.25s, background 0.25s;
    cursor: pointer;
    position: relative;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--orange);
    background: var(--orange-lighter);
}

.file-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.file-upload-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.file-upload-text strong {
    color: var(--orange);
}

.file-upload-hint {
    color: var(--text-light);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}


.cmp-page { max-width: 1120px; margin: 0 auto; padding: 26px 20px 60px; }

/* Breadcrumb */
.cmp-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: #8a8594; margin-bottom: 18px; }
.cmp-breadcrumb a { color: #8a8594; text-decoration: none; }
.cmp-breadcrumb a:hover { color: #fe5001; }
.cmp-breadcrumb-sep { opacity: .5; }

/* Two-column layout */
.cmp-layout { display: grid; grid-template-columns: 1fr 304px; gap: 28px; align-items: start; }
.cmp-main { min-width: 0; }

/* ===== Header card ===== */
.cmp-head {
    position: relative; background: #fff; border: 1px solid #ecebef;
    border-radius: 20px; box-shadow: 0 1px 3px rgba(29,23,38,.05), 0 8px 24px rgba(29,23,38,.05);
    padding: 30px 30px 26px; overflow: hidden; margin-bottom: 28px;
}
.cmp-head::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, #fe5001, #ff8c3a); }

.cmp-head-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.cmp-clogo {
    width: 60px; height: 60px; border-radius: 16px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #0d1b2e; color: #fff; font-weight: 800; font-size: 22px;
    box-shadow: 0 6px 16px rgba(13,27,46,.25); overflow: hidden; text-decoration: none;
}
.cmp-clogo img { width: 100%; height: 100%; object-fit: cover; }
.cmp-cmeta { min-width: 0; }
.cmp-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: #8a8594; }
.cmp-cname { font-size: 17px; font-weight: 700; color: #1d1726; text-decoration: none; }
a.cmp-cname:hover { color: #fe5001; }

.cmp-title { font-size: 29px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: #1d1726; margin: 0 0 14px; }

.cmp-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }

/* facts strip */
.cmp-facts {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px;
    background: linear-gradient(180deg, #fafafb, #f5f5f7); border: 1px solid #ecebef;
    border-radius: 16px; padding: 6px; margin-bottom: 24px;
}
.cmp-fact { padding: 12px 16px; border-radius: 12px; }
.cmp-fact-label { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #8a8594; margin-bottom: 3px; }
.cmp-fact-value { font-size: 16px; font-weight: 700; color: #1d1726; }
.cmp-fact-amount { color: #fe5001; }

.cmp-summary-h { font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #8a8594; margin: 0 0 8px; }
.cmp-summary { color: #4b4458; font-size: 15px; line-height: 1.7; margin: 0; white-space: pre-wrap; word-wrap: break-word; }

/* evidence */
.cmp-evidence { margin-top: 20px; padding-top: 18px; border-top: 1px solid #ecebef; }
.cmp-evidence-h { font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #8a8594; margin: 0 0 10px; display: flex; align-items: center; gap: 7px; }
.cmp-evidence-lock { color: #d97706; }

.cmp-head-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #ecebef; }
.cmp-byline { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.cmp-byline-av { width: 34px; height: 34px; border-radius: 50%; background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cmp-byline-who { display: flex; flex-direction: column; }
.cmp-byline-who strong { font-weight: 700; color: #1d1726; }
.cmp-byline-role { color: #8a8594; font-size: 12px; }
.cmp-dates { font-size: 12px; color: #8a8594; }

/* ===== Right sidebar — status card ===== */
.cmp-aside { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 18px; } /* 90px = fixed nav (75px) + gap, so the card header clears the navbar */
.cmp-status-card { background: #fff; border: 1px solid #ecebef; border-radius: 18px; box-shadow: 0 1px 3px rgba(29,23,38,.05), 0 8px 24px rgba(29,23,38,.05); padding: 22px; overflow: hidden; }
.cmp-sc-title { font-size: 15px; font-weight: 800; color: #1d1726; margin-bottom: 16px; }
.cmp-sc-timer { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #ecebef; }
.cmp-ring { position: relative; width: 88px; height: 88px; flex-shrink: 0; }
.cmp-ring svg { width: 88px; height: 88px; transform: rotate(-90deg); }
.cmp-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.cmp-ring-text b { font-size: 20px; font-weight: 800; color: #1d1726; }
.cmp-ring-text span { font-size: 9px; color: #8a8594; text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; white-space: nowrap; }
/* Finished complaint — clean outcome block (replaces the days-open ring for resolved/closed) */
.cmp-sc-outcome { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid #ecebef; }
.cmp-sc-outcome-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cmp-sc-outcome--resolved .cmp-sc-outcome-icon { background: #dcfce7; color: #16a34a; }
.cmp-sc-outcome--closed .cmp-sc-outcome-icon { background: #e2e8f0; color: #475569; }
.cmp-sc-outcome-title { font-size: 18px; font-weight: 800; line-height: 1.15; }
.cmp-sc-outcome--resolved .cmp-sc-outcome-title { color: #16a34a; }
.cmp-sc-outcome--closed .cmp-sc-outcome-title { color: #475569; }
.cmp-sc-outcome-sub { font-size: 12.5px; color: #8a8594; margin-top: 2px; }
.cmp-sc-disputed { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #ecebef; }
.cmp-sc-disputed-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #8a8594; }
.cmp-sc-disputed-value { font-size: 18px; font-weight: 800; color: #1d1726; }
.cmp-sc-amount-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #8a8594; }
.cmp-sc-amount { font-size: 20px; font-weight: 800; color: #1d1726; }
.cmp-sc-help { font-size: 14px; font-weight: 700; color: #1d1726; margin-bottom: 14px; line-height: 1.4; }

/* ===== Discussion ===== */
.cmp-disc-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 20px; }
.cmp-disc-head h2 { font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: #1d1726; margin: 0; }
.cmp-disc-count { background: #fe5001; color: #fff; font-size: 12px; font-weight: 800; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; }
.cmp-disc-line { flex: 1; height: 1px; background: #ecebef; }

.cmp-msg {
    background: #fff; border: 1px solid #ecebef; border-radius: 18px;
    box-shadow: 0 1px 3px rgba(29,23,38,.05), 0 8px 24px rgba(29,23,38,.05);
    padding: 22px 24px; margin-bottom: 16px;
    display: grid; grid-template-columns: 84px 1fr; gap: 20px;
}
.cmp-msg:last-of-type { margin-bottom: 0; }
.cmp-msg-system { background: #fbfbfc; }

.cmp-msg-id { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.cmp-av { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 20px; overflow: hidden; flex-shrink: 0; }
.cmp-av img { width: 100%; height: 100%; object-fit: cover; }
.cmp-av-player { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.cmp-av-casino { background: #0d1b2e; }
.cmp-av-vg { background: #1a1614; box-shadow: 0 6px 16px rgba(254,80,1,.3); }
.cmp-av-vg img { object-fit: cover; padding: 0; }
.cmp-av-ring { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(254,80,1,.15); }
.cmp-av-locked { background: #f3f2f5; color: #bdb8c6; }
.cmp-av-initial { font-size: 22px; }
.cmp-id-name { font-size: 13px; font-weight: 700; color: #1d1726; line-height: 1.2; word-break: break-word; }
.cmp-id-role { font-size: 11px; color: #8a8594; }

.cmp-msg-body { min-width: 0; }
.cmp-msg-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cmp-msg-time { font-size: 12px; color: #8a8594; }
.cmp-vis { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.cmp-vis svg { width: 12px; height: 12px; }
.cmp-vis-public { background: #e8f7ef; color: #15a35b; }
.cmp-vis-private { background: #fdf2e3; color: #d97706; }
.cmp-msg-text { color: #4b4458; font-size: 14.5px; line-height: 1.72; margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.cmp-msg-text-muted { color: #8a8594; font-style: italic; }

.cmp-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cmp-file { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 10px; background: #f7f7f9; border: 1px solid #ecebef; font-size: 13px; font-weight: 600; color: #4b4458; text-decoration: none; transition: background .2s, border-color .2s, color .2s; }
.cmp-file svg { color: #fe5001; flex-shrink: 0; }
.cmp-file:hover { background: #fff5f0; border-color: rgba(254,80,1,.3); color: #fe5001; }

/* Empty */
.cmp-empty { text-align: center; padding: 36px 20px; color: #8a8594; background: #fff; border: 1px dashed #e0e0e0; border-radius: 18px; }
.cmp-empty p { margin: 0; }

/* ===== Reply ===== */
.cmp-reply { background: #fff; border: 1px solid #ecebef; border-radius: 18px; box-shadow: 0 1px 3px rgba(29,23,38,.05), 0 8px 24px rgba(29,23,38,.05); padding: 24px; margin-top: 8px; }
.cmp-reply h3 { margin: 0 0 14px; font-size: 16px; font-weight: 800; color: #1d1726; }
.cmp-reply label { display: block; font-size: 13px; font-weight: 600; color: #4b4458; margin-bottom: 7px; }
.cmp-reply textarea { width: 100%; border: 1.5px solid #ecebef; border-radius: 12px; padding: 13px 15px; font: inherit; font-size: 14px; resize: vertical; min-height: 96px; transition: border-color .2s, box-shadow .2s; }
.cmp-reply textarea:focus { outline: none; border-color: #fe5001; box-shadow: 0 0 0 4px rgba(254,80,1,.1); }
.cmp-reply-check { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: #4b4458; font-weight: 500; }

.cmp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; padding: 13px 28px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #fe5001, #ff8c3a); box-shadow: 0 6px 18px rgba(254,80,1,.32); transition: transform .2s, box-shadow .2s; text-decoration: none; }
.cmp-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(254,80,1,.42); color: #fff; }
.cmp-btn-block { display: flex; width: 100%; }

/* Secondary outline button — sits under a primary .cmp-btn on white cards without competing with it */
.cmp-btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-weight: 700; font-size: 14px; padding: 12px 28px;
    border-radius: 12px; border: 1.5px solid #ecebef; background: #fff; color: #4b4458;
    text-decoration: none; transition: border-color .2s, color .2s, background .2s;
    margin-top: 10px;
}
.cmp-btn-outline svg { color: #fe5001; flex-shrink: 0; }
.cmp-btn-outline:hover { border-color: rgba(254,80,1,.35); background: #fff5f0; color: #fe5001; }
.cmp-reply .cmp-btn { margin-top: 16px; }

/* header "see all" inline link */
.cmp-see-all-link { display: inline-block; margin-top: 5px; font-size: 12.5px; font-weight: 600; color: #fe5001; text-decoration: none; }
.cmp-see-all-link:hover { text-decoration: underline; }

/* ===== More complaints against this casino ===== */
.cmp-related { margin-top: 32px; }
.cmp-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; }

/* Related-complaint cards — compact version of the list page's diagonal-banner card */
.mdr-rel-card {
    display: flex; flex-direction: column; min-height: 100%;
    background: #fff; border: 1px solid #ece7f2; border-radius: 14px; overflow: hidden;
    text-decoration: none; box-shadow: 0 1px 3px rgba(29,23,38,.05);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.mdr-rel-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(29,23,38,.10); border-color: rgba(254,80,1,.25); }
.mdr-rel-banner {
    position: relative; background: #281e32; flex-shrink: 0;
    /* Diagonal lives entirely inside the 32px bottom padding (24px wedge + 8px clearance),
       so it can never cross the content regardless of card width or display scaling */
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), 0 100%);
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 5px; padding: 12px 14px 32px;
}
/* The big-banner children are absolutely positioned — the mini banner stacks them (status
   first) down the left edge, where the diagonal clip leaves full height at any card width */
.mdr-rel-banner .mdr-ticket-id { position: static; white-space: nowrap; }
.mdr-rel-banner .mdr-status-tag { position: static; padding: 4px 9px; font-size: 10px; white-space: nowrap; }
.mdr-rel-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.mdr-rel-title {
    margin: 0; font-size: 14px; font-weight: 800; color: #281e32; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mdr-rel-text { margin: 0; font-size: 12.5px; line-height: 1.5; color: #8a7f96; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mdr-rel-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: #8a7f96; margin-top: auto; }
.mdr-rel-amount { font-size: 13px; font-weight: 800; color: #d94d00; white-space: nowrap; }

/* ===== Player Complaints section on the casino review page (rvc-*) ===== */

/* Anchor chip in the dark review hero — the one interactive chip, jumps to #ComplaintsSection */
.rvc-chip {
    display: inline-flex; align-items: center; gap: 7px;
    margin: 2px 0 12px; padding: 7px 14px; border-radius: 100px;
    border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08);
    color: #fff; font-size: 13px; font-weight: 600; text-decoration: none;
    transition: background .2s, border-color .2s;
}
.rvc-chip i { color: var(--orange-light); }
.rvc-chip b { font-weight: 800; font-variant-numeric: tabular-nums; }
.rvc-chip-arrow { font-size: 11px; opacity: .7; }
.rvc-chip:hover { border-color: rgba(254,80,1,.5); background: rgba(254,80,1,.15); color: #fff; }
.rvc-chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

.rvc-section { padding: 0 0 32px; scroll-margin-top: 90px; }

/* Dark "watchdog zone" panel — the section's own dark moment, echoing the review hero
   and the cards' diagonal-banner identity. Everything below is scoped to .rvc-panel. */
.rvc-panel {
    position: relative; overflow: hidden;
    background: #281e32; border-radius: 22px;
    padding: 30px 30px 28px;
}
.rvc-panel::before {
    /* signature diagonal stripe, top-right, behind the content */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 80%, rgba(254,80,1,.9) 80%, rgba(254,80,1,.9) 85%, transparent 85%);
    opacity: .35;
}
.rvc-panel::after {
    content: ""; position: absolute; top: -140px; right: -100px; width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(254,80,1,.22), transparent 70%);
    pointer-events: none;
}
.rvc-panel > * { position: relative; z-index: 1; }

.rvc-title { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; color: #fff; letter-spacing: -.01em; margin: 0; }
.rvc-title-icon { width: 24px; height: 24px; color: #fe5001; flex-shrink: 0; }
.rvc-sub { font-size: 13.5px; color: #c9bfd4; max-width: 78ch; margin: 4px 0 0; }

/* Glassy stat chips on the dark panel */
.rvc-panel .rvc-stat { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.rvc-panel .rvc-stat b { color: #fff; }
.rvc-panel .rvc-stat-label { color: #c9bfd4; }
.rvc-panel .rvc-dot-total { background: #fff; }

/* White cards pop on the dark panel; lighten their banner a step so it doesn't
   merge with the identical panel background */
.rvc-panel .mdr-rel-card { border-color: transparent; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.rvc-panel .mdr-rel-banner { background: #362a48; }

/* Ghost submit tile + empty state, dark variants */
.rvc-panel .rvc-submit-tile { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.05); }
.rvc-panel .rvc-submit-icon { background: rgba(254,80,1,.22); color: #ff8c3a; }
.rvc-panel .rvc-submit-title { color: #fff; }
.rvc-panel .rvc-submit-text { color: #c9bfd4; }
.rvc-panel .rvc-empty { border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.04); }
.rvc-panel .rvc-empty h3 { color: #fff; }
.rvc-panel .rvc-empty p { color: #c9bfd4; }

/* See-all as a quiet outline on dark */
.rvc-panel .cmp-btn-outline { background: transparent; border-color: rgba(255,255,255,.25); color: #fff; }
.rvc-panel .cmp-btn-outline:hover { border-color: rgba(254,80,1,.6); background: rgba(254,80,1,.12); color: #ff8c3a; }

.rvc-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0 20px; }
.rvc-stat {
    display: flex; align-items: center; gap: 10px;
    border: 1px solid #ecebef; border-radius: 12px; background: #fbfafc;
    padding: 10px 18px 10px 14px;
}
.rvc-stat b { font-size: 20px; font-weight: 800; color: #1d1726; font-variant-numeric: tabular-nums; }
.rvc-stat-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8a7f96; }
.rvc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rvc-dot-total { background: #281e32; }
.rvc-dot-open { background: #ffc43d; }
.rvc-dot-resolved { background: #15a35b; }

/* Empty state — trust-positive; keeps the hub link crawlable from day one via the chip + section */
.rvc-empty {
    text-align: center; padding: 34px 24px;
    border: 1px dashed #dcd6e4; border-radius: 16px; background: #fbfafc;
}
.rvc-empty-shield {
    width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    background: #e8f7ef; color: #15a35b;
}
.rvc-empty h3 { color: #1d1726; font-size: 16px; font-weight: 800; margin: 0 0 4px; }
.rvc-empty p { font-size: 13.5px; color: #8a7f96; max-width: 46ch; margin: 0 auto; }
.rvc-file-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13px; font-weight: 700; color: #fe5001; text-decoration: none; }
.rvc-file-link:hover { text-decoration: underline; }

/* auto-fit (vs auto-fill) collapses empty tracks, so the 3 cards + submit tile
   stretch across the review page's wide container with no dead columns */
.rvc-section .cmp-related-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Submit CTA as the grid's last tile — deliberately NOT a card-family member: a dashed
   "empty slot" ghost tile (same vocabulary as .rvc-empty) so it can't be mistaken for a
   real complaint */
.rvc-submit-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: 8px; padding: 24px 20px;
    border: 1.5px dashed #dcd6e4; border-radius: 14px; background: #fbfafc;
}
.rvc-submit-icon {
    width: 56px; height: 56px; border-radius: 50%; margin-bottom: 2px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(254,80,1,.1); color: #fe5001;
}
.rvc-submit-icon svg { width: 28px; height: 28px; }
.rvc-submit-title { margin: 0; font-size: 15px; font-weight: 800; color: #1d1726; line-height: 1.35; }
.rvc-submit-text { margin: 0; font-size: 12.5px; line-height: 1.5; color: #8a7f96; }
.rvc-submit-btn { margin-top: 8px; padding: 12px 22px; }

.rvc-seeall { text-align: center; }

/* Responsive */
@media (max-width: 920px) {
    .cmp-layout { grid-template-columns: 1fr; }
    .cmp-aside { position: static; order: -1; }
}
@media (max-width: 680px) {
    .rvc-panel { padding: 22px 16px 20px; border-radius: 18px; }
    .cmp-page { padding: 16px 14px 40px; }
    .cmp-head { padding: 22px 18px; }
    .cmp-title { font-size: 23px; }
    .cmp-msg { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
    .cmp-msg-id { flex-direction: row; text-align: left; gap: 12px; }
    .cmp-av { width: 46px; height: 46px; font-size: 16px; }
    .cmp-av svg { width: 22px; height: 22px; }
}

/* --- My Complaints Table --- */
.my-complaints-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.my-complaints-table thead th {
    background: var(--bg-light);
    padding: 0.875rem 1rem;
    font-size: 0.775rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.my-complaints-table thead th:first-child {
    border-radius: 12px 0 0 0;
}

.my-complaints-table thead th:last-child {
    border-radius: 0 12px 0 0;
}

.my-complaints-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.my-complaints-table tbody tr {
    transition: background 0.2s;
}

.my-complaints-table tbody tr:hover {
    background: var(--bg-light);
}

.my-complaints-table .complaint-id {
    font-weight: 700;
    color: var(--primary-dark);
}

.my-complaints-table .casino-name {
    font-weight: 600;
}

.btn-view-complaint {
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--orange);
    background: var(--orange-lighter);
    border: 1px solid rgba(254, 80, 1, 0.2);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-view-complaint:hover {
    background: var(--orange);
    color: #fff;
    border-color: var(--orange);
}

/* --- Pagination --- */
.complaint-pagination .pagination {
    gap: 4px;
}

.complaint-pagination .page-link {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
    transition: var(--transition);
}

.complaint-pagination .page-link:hover {
    background: var(--orange-lighter);
    border-color: rgba(254, 80, 1, 0.3);
    color: var(--orange);
}

.complaint-pagination .page-item.active .page-link {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    box-shadow: 0 2px 8px rgba(254, 80, 1, 0.3);
}

.complaint-pagination .page-item.disabled .page-link {
    background: var(--bg-light);
    color: var(--text-light);
}

/* --- Empty State --- */
.complaint-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.complaint-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: var(--text-light);
    font-size: 1.5rem;
}

.complaint-empty h3 {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.complaint-empty p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.btn-submit-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--orange), var(--orange-light));
    color: #fff;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.925rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(254, 80, 1, 0.3);
}

.btn-submit-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 80, 1, 0.4);
    color: #fff;
}

/* --- Back Button --- */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: #fff;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: var(--transition);
}

.btn-back:hover {
    background: var(--bg-light);
    color: var(--primary-dark);
    border-color: #ced4da;
}

/* --- Loading Overlay --- */
.complaint-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(40, 30, 50, 0.75);
    z-index: 9999;
    backdrop-filter: blur(6px);
    display: none;
}

.complaint-loading-overlay .loading-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.complaint-loading-overlay .loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: complaint-spin 0.7s linear infinite;
}

.complaint-loading-overlay .loading-text {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
}

@keyframes complaint-spin {
    to { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .complaint-hero h1 {
        font-size: 1.6rem;
    }

    .complaint-hero .hero-stats {
        gap: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .complaint-hero {
        padding: 2.5rem 0 2rem;
    }

    .complaint-hero h1 {
        font-size: 1.4rem;
    }

    .complaint-form-card .form-section {
        padding: 1.5rem;
    }

    .form-footer {
        padding: 1.25rem 1.5rem;
    }
}
