/* ================================================
   CLUB STATUS CARD
   Version: 4.1
   Style: Neumorphic — blue-silver base
   Layout: Left image panel (inset) + right content panel
   ================================================ */

/* ------------------------------------------------
   Custom Properties
   Neumorphic shadow pair derived from the blue-silver
   gradient midpoint (#ddeaf3):
     --nm-dark:  #b4cad9  (panel-to end of gradient)
     --nm-light: #f5fbff  (blue-white highlight)
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] {
    --cs-red:          #EB232D;
    --cs-red-hover:    #c91e27;
    --cs-red-glow:     rgba(235, 35, 45, 0.14);
    --cs-green:        #22c55e;
    --cs-green-hover:  #16a34a;
    --cs-green-glow:   rgba(34, 197, 94, 0.15);
    --cs-green-bg:     rgba(34, 197, 94, 0.13);
    --cs-green-border: rgba(34, 197, 94, 0.30);
    --cs-navy:         #1a2e3d;
    --cs-navy-mid:     #3a5a72;
    --cs-navy-muted:   #5a7a90;
    --cs-navy-hint:    #7a9aae;
    --cs-radius:       18px;
    --cs-radius-sm:    8px;
    --cs-radius-xs:    6px;

    /* Neumorphic base & shadow pair */
    --nm-base:  #ddeaf3;
    --nm-dark:  #b4cad9;
    --nm-light: #f5fbff;

    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

/* ------------------------------------------------
   Card Shell — raised from blue-silver surface
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] .rdwcs-card {
    display: grid;
    grid-template-columns: 40% 1fr;
    border-radius: var(--cs-radius);
    overflow: hidden;
    background: var(--nm-base);
    box-shadow:
        9px 9px 18px var(--nm-dark),
        -9px -9px 18px var(--nm-light);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    transition: box-shadow 0.3s ease;
}

[class*="rdwcs-wrap-"] .rdwcs-card:hover {
    box-shadow:
        12px 12px 24px var(--nm-dark),
        -12px -12px 24px var(--nm-light);
}

/* ------------------------------------------------
   Left: Image Column — inset into the raised shell
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] .rdwcs-img-wrap {
    display: flex;
    flex-direction: column;
    background-color: #b8cfe0;
    position: relative;
    border-radius: var(--cs-radius) 0 0 var(--cs-radius);
    box-shadow:
        inset 4px 4px 10px var(--nm-dark),
        inset -3px -3px 8px var(--nm-light);
    overflow: hidden;
}

[class*="rdwcs-wrap-"] .rdwcs-img-inner {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 90px;
    display: block;
}

[class*="rdwcs-wrap-"] .rdwcs-card-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #b8cfe0;
    transition: transform 0.4s ease;
}

[class*="rdwcs-wrap-"] .rdwcs-card-bg.rdwcs-no-image {
    background: linear-gradient(145deg, #c2d4e4 0%, #96b4c8 100%);
}

[class*="rdwcs-wrap-"] .rdwcs-card:hover .rdwcs-card-bg {
    transform: scale(1.04);
}

/* Free ribbon */
[class*="rdwcs-wrap-"] .rdwcs-free-ribbon {
    position: absolute;
    top: 11px;
    left: -26px;
    background: var(--cs-green);
    color: #ffffff;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 32px;
    transform: rotate(-35deg);
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    pointer-events: none;
    z-index: 2;
}

/* ------------------------------------------------
   Qualifying Items Button
   Raised pill floating above the inset image panel.
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] .rdwcs-qi-btn-wrap {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

[class*="rdwcs-wrap-"] .rdwcs-qi-btn {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cs-red);
    background: var(--nm-base);
    border: none;
    padding: 4px 13px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    pointer-events: all;
    box-shadow:
        3px 3px 7px rgba(0, 0, 0, 0.18),
        -3px -3px 6px rgba(255, 255, 255, 0.75);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    font-family: inherit;
    line-height: 1.4;
}

[class*="rdwcs-wrap-"] .rdwcs-qi-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        4px 4px 9px rgba(0, 0, 0, 0.22),
        -4px -4px 8px rgba(255, 255, 255, 0.80);
}

[class*="rdwcs-wrap-"] .rdwcs-qi-btn:active {
    transform: translateY(0);
    box-shadow:
        inset 2px 2px 5px rgba(0, 0, 0, 0.14),
        inset -2px -2px 4px rgba(255, 255, 255, 0.60);
}

[class*="rdwcs-wrap-"] .rdwcs-qi-btn.rdwcs-complete {
    color: #15803d;
}

[class*="rdwcs-wrap-"] .rdwcs-qi-btn:focus-visible {
    outline: 2px solid var(--cs-navy);
    outline-offset: 2px;
}

/* ------------------------------------------------
   Right: Content Panel
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] .rdwcs-card-inner {
    background: transparent;
    padding: 13px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

/* ------------------------------------------------
   Club Name + Tagline
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] .rdwcs-club-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--cs-navy);
    line-height: 1.25;
    margin: 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[class*="rdwcs-wrap-"] .rdwcs-club-tagline {
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--cs-navy-muted);
    letter-spacing: 0.03em;
    margin: 1px 0 0;
}

/* ------------------------------------------------
   Dot Progress Indicator
   Inset trough — filled dots read as raised beads,
   empty dots as recessed holes.
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] .rdwcs-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    background: var(--nm-base);
    border-radius: 30px;
    padding: 6px 9px;
    box-shadow:
        inset 3px 3px 8px var(--nm-dark),
        inset -3px -3px 8px var(--nm-light);
}

[class*="rdwcs-wrap-"] .rdwcs-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    background: var(--nm-base);
    box-shadow:
        inset 2px 2px 4px var(--nm-dark),
        inset -1px -1px 3px var(--nm-light);
    border: none;
}

[class*="rdwcs-wrap-"] .rdwcs-dot.rdwcs-filled {
    background: var(--cs-red);
    box-shadow:
        2px 2px 5px var(--nm-dark),
        -2px -2px 4px var(--nm-light);
}

[class*="rdwcs-wrap-"] .rdwcs-dot.rdwcs-filled.rdwcs-complete {
    background: var(--cs-green);
    box-shadow:
        2px 2px 5px var(--nm-dark),
        -2px -2px 4px var(--nm-light);
}

[class*="rdwcs-wrap-"] .rdwcs-dot.rdwcs-goal {
    background: var(--nm-base);
    box-shadow:
        inset 2px 2px 4px var(--nm-dark),
        inset -1px -1px 3px var(--nm-light);
    border: 1.5px dashed var(--cs-red);
}

[class*="rdwcs-wrap-"] .rdwcs-dot.rdwcs-goal.rdwcs-complete {
    border-color: var(--cs-green);
}

/* Collapsed mode (>12 required) */
[class*="rdwcs-wrap-"] .rdwcs-dot-sm {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--nm-base);
    box-shadow:
        inset 2px 2px 4px var(--nm-dark),
        inset -1px -1px 3px var(--nm-light);
    border: none;
}

[class*="rdwcs-wrap-"] .rdwcs-dot-sm.rdwcs-filled {
    background: var(--cs-red);
    box-shadow:
        2px 2px 4px var(--nm-dark),
        -1px -1px 3px var(--nm-light);
}

[class*="rdwcs-wrap-"] .rdwcs-dot-sm.rdwcs-goal {
    background: var(--nm-base);
    box-shadow:
        inset 2px 2px 4px var(--nm-dark),
        inset -1px -1px 3px var(--nm-light);
    border: 1.5px dashed var(--cs-red);
}

[class*="rdwcs-wrap-"] .rdwcs-dot-count {
    font-size: 0.59rem;
    font-weight: 600;
    color: var(--cs-navy-muted);
    white-space: nowrap;
    margin-left: 1px;
}

/* ------------------------------------------------
   Card Footer
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] .rdwcs-footer {
    margin-top: auto;
}

[class*="rdwcs-wrap-"] .rdwcs-msg {
    min-width: 0;
}

/* ------------------------------------------------
   Free Item Badge
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] .rdwcs-free-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--cs-green-bg);
    border: 1px solid var(--cs-green-border);
    color: #166534;
    font-size: 0.64rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    margin-bottom: 2px;
    white-space: nowrap;
}

[class*="rdwcs-wrap-"] .rdwcs-free-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cs-green);
    flex-shrink: 0;
    animation: rdwcs-pulse-dot 2s ease-in-out infinite;
}

@keyframes rdwcs-pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ------------------------------------------------
   Motivation Message
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] .rdwcs-motivation {
    font-size: 0.64rem;
    font-style: italic;
    color: var(--cs-navy-muted);
    line-height: 1.4;
    margin: 0 0 2px;
}

/* ------------------------------------------------
   Date Line
   ------------------------------------------------ */
[class*="rdwcs-wrap-"] .rdwcs-date-line {
    font-size: 0.57rem;
    color: var(--cs-navy-hint);
    line-height: 1.5;
    margin: 0;
}

[class*="rdwcs-wrap-"] .rdwcs-date-line span {
    color: var(--cs-navy-mid);
    font-weight: 500;
}

/* ------------------------------------------------
   Modal Overlay
   ------------------------------------------------ */
.rdwcs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 35, 0.65);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    padding: 20px;
}

.rdwcs-modal-overlay.rdwcs-modal-active {
    opacity: 1;
    visibility: visible;
}

.rdwcs-modal-content {
    background: #ddeaf3;
    color: #1a2e3d;
    border: none;
    border-radius: 16px;
    width: 100%;
    max-width: 460px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow:
        12px 12px 28px #b4cad9,
        -12px -12px 28px #f5fbff;
    transform: scale(0.93) translateY(8px);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
}

.rdwcs-modal-overlay.rdwcs-modal-active .rdwcs-modal-content {
    transform: scale(1) translateY(0);
}

.rdwcs-modal-header {
    padding: 16px 18px 13px;
    border-bottom: 1px solid rgba(26, 46, 61, 0.10);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.rdwcs-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2e3d;
    margin: 0 0 2px;
    line-height: 1.3;
}

.rdwcs-modal-subtitle {
    font-size: 0.72rem;
    color: #5a7a90;
    margin: 0;
    font-weight: 400;
}

.rdwcs-modal-close-x {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ddeaf3;
    border: none;
    color: #3a5a72;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    line-height: 1;
    box-shadow:
        3px 3px 7px #b4cad9,
        -3px -3px 6px #f5fbff;
    transition: box-shadow 0.15s ease, color 0.15s ease;
}

.rdwcs-modal-close-x:hover {
    box-shadow:
        4px 4px 9px #b4cad9,
        -4px -4px 8px #f5fbff;
    color: #1a2e3d;
}

.rdwcs-modal-close-x:active {
    box-shadow:
        inset 2px 2px 5px #b4cad9,
        inset -2px -2px 4px #f5fbff;
}

.rdwcs-modal-close-x:focus-visible { outline: 2px solid #1a2e3d; outline-offset: 2px; }

.rdwcs-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.rdwcs-modal-body::-webkit-scrollbar       { width: 4px; }
.rdwcs-modal-body::-webkit-scrollbar-track { background: transparent; }
.rdwcs-modal-body::-webkit-scrollbar-thumb { background: rgba(26, 46, 61, 0.20); border-radius: 2px; }
.rdwcs-modal-body::-webkit-scrollbar-thumb:hover { background: rgba(26, 46, 61, 0.35); }

.rdwcs-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    border-bottom: 1px solid rgba(26, 46, 61, 0.07);
    transition: background 0.10s ease;
}

.rdwcs-item-row:last-child { border-bottom: none; }
.rdwcs-item-row:hover      { background: rgba(26, 46, 61, 0.04); }

.rdwcs-item-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ddeaf3;
    color: #5a7a90;
    font-size: 0.63rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow:
        inset 2px 2px 4px #b4cad9,
        inset -1px -1px 3px #f5fbff;
}

.rdwcs-item-details { flex: 1; min-width: 0; }

.rdwcs-item-name {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: #1a2e3d;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rdwcs-item-upc { display: inline-flex; align-items: center; gap: 5px; }

.rdwcs-upc-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    background: #7a9aae;
    padding: 2px 5px;
    border-radius: 3px;
    line-height: 1.5;
    flex-shrink: 0;
}

.rdwcs-upc-val {
    font-family: "SF Mono", "Fira Code", "Consolas", monospace;
    font-size: 0.78rem;
    font-weight: 500;
    color: #3a6278;
}

.rdwcs-modal-footer {
    padding: 11px 18px 14px;
    border-top: 1px solid rgba(26, 46, 61, 0.10);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.rdwcs-modal-item-count {
    font-size: 0.70rem;
    color: #7a9aae;
    font-weight: 500;
    margin: 0;
}

.rdwcs-modal-close-btn {
    background: #1a2e3d;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 600;
    padding: 8px 22px;
    transition: background 0.15s ease, transform 0.15s ease;
    font-family: inherit;
}

.rdwcs-modal-close-btn:hover  { background: #2d4a60; transform: translateY(-1px); }
.rdwcs-modal-close-btn:active { transform: translateY(0); }
.rdwcs-modal-close-btn.rdwcs-complete       { background: #22c55e; }
.rdwcs-modal-close-btn.rdwcs-complete:hover { background: #16a34a; }

.rdwcs-modal-close-btn:focus-visible,
.rdwcs-modal-close-x:focus-visible {
    outline: 2px solid #1a2e3d;
    outline-offset: 2px;
}

/* ------------------------------------------------
   Responsive
   ------------------------------------------------ */
@media (max-width: 768px) {
    [class*="rdwcs-wrap-"] .rdwcs-card       { grid-template-columns: 38% 1fr; border-radius: 14px; }
    [class*="rdwcs-wrap-"] .rdwcs-img-wrap   { border-radius: 14px 0 0 14px; }
    [class*="rdwcs-wrap-"] .rdwcs-img-inner  { min-height: 80px; }
    [class*="rdwcs-wrap-"] .rdwcs-card-inner { padding: 10px 11px 9px; }
    [class*="rdwcs-wrap-"] .rdwcs-club-name  { font-size: 0.82rem; }
    [class*="rdwcs-wrap-"] .rdwcs-dot        { width: 12px; height: 12px; }
    [class*="rdwcs-wrap-"] .rdwcs-dot-sm     { width: 9px; height: 9px; }
    [class*="rdwcs-wrap-"] .rdwcs-motivation { font-size: 0.62rem; }
    [class*="rdwcs-wrap-"] .rdwcs-date-line  { font-size: 0.55rem; }

    .rdwcs-modal-overlay { padding: 12px; }
    .rdwcs-modal-content { max-height: 88vh; }
    .rdwcs-modal-header  { padding: 13px 15px 11px; }
    .rdwcs-item-row      { padding: 10px 15px; }
    .rdwcs-modal-footer  { padding: 10px 15px 13px; }
}

@media (max-width: 480px) {
    [class*="rdwcs-wrap-"] .rdwcs-card      { grid-template-columns: 35% 1fr; border-radius: 12px; }
    [class*="rdwcs-wrap-"] .rdwcs-img-wrap  { border-radius: 12px 0 0 12px; }
    [class*="rdwcs-wrap-"] .rdwcs-club-name { font-size: 0.78rem; }
}

/* ------------------------------------------------
   Reduced Motion
   ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    [class*="rdwcs-wrap-"] .rdwcs-card-bg,
    [class*="rdwcs-wrap-"] .rdwcs-free-dot,
    .rdwcs-modal-overlay,
    .rdwcs-modal-content {
        animation: none !important;
        transition: none !important;
    }
}
