/* ============================================================
   Pirate Win — Survey Wall Widget
   Matches the main Pirate Win page design (dark navy + gold)
   ============================================================ */

:root {
    --survey-bg: #0f1729;
    --survey-card: #18243b;
    --survey-card-light: #1e2a45;

    --survey-border: rgba(255, 255, 255, 0.07);

    --survey-gold: #f5a623;
    --survey-gold-light: #ffc861;

    --survey-green: #22c55e;
    --survey-red: #ef4444;

    --survey-text: #ffffff;
    --survey-muted: #94a3b8;
    --survey-text-light: #cbd5e1;

    --survey-radius: 18px;
    --survey-radius-lg: 24px;
}


/* ============================================================
   CONTAINER
   ============================================================ */

.survey-wrap {
    width: 100%;
    max-width: 1080px;

    margin: 0 auto;
    padding: 0 0 20px;

    color: var(--survey-text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


/* ============================================================
   INTRODUCTION
   ============================================================ */

.survey-intro {
    position: relative;

    display: flex;
    align-items: center;

    gap: 20px;

    margin-bottom: 24px;
    padding: 24px;

    border-radius: var(--survey-radius-lg);

    background: linear-gradient(135deg, rgba(30, 42, 69, 0.9), rgba(24, 36, 59, 0.9));

    border: 1px solid var(--survey-border);

    overflow: hidden;
}

.survey-intro::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -80px;
    top: -100px;
    border-radius: 50%;
    background: rgba(245, 166, 35, 0.08);
    filter: blur(40px);
    pointer-events: none;
}

.survey-intro-icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(245, 166, 35, 0.1);
    border: 1px solid rgba(245, 166, 35, 0.25);
    font-size: 25px;
}

.survey-intro-content {
    position: relative;
    z-index: 2;
    flex: 1;
}

.survey-intro-title {
    margin: 0 0 5px;
    color: var(--survey-text);
    font-size: 21px;
    line-height: 1.3;
    font-weight: 800;
}

.survey-intro-text {
    margin: 0;
    max-width: 700px;
    color: var(--survey-muted);
    font-size: 14px;
    line-height: 1.6;
}

.survey-balance {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-left: 20px;
    border-left: 1px solid var(--survey-border);
}

.survey-balance-label {
    margin-bottom: 3px;
    color: var(--survey-muted);
    font-size: 12px;
}

.survey-balance strong {
    color: var(--survey-gold-light);
    font-size: 19px;
    font-weight: 800;
}


/* ============================================================
   TABS (Available / History)
   ============================================================ */

.survey-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.survey-tab {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid var(--survey-border);
    background: transparent;
    color: var(--survey-muted);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.survey-tab--active {
    color: #1a1206;
    background: linear-gradient(135deg, var(--survey-gold-light), var(--survey-gold));
    border-color: transparent;
}

.survey-panel { display: none; }
.survey-panel--active { display: block; }


/* ============================================================
   SURVEY LIST
   ============================================================ */

.survey-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.survey-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;

    padding: 18px 20px;

    background: linear-gradient(145deg, rgba(30, 42, 69, 0.95), rgba(24, 36, 59, 0.95));
    border: 1px solid var(--survey-border);
    border-radius: var(--survey-radius);

    transition: transform 0.2s ease, border-color 0.2s ease;
}

.survey-item:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 166, 35, 0.35);
}

.survey-item-info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.survey-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(245, 166, 35, 0.1);
    font-size: 20px;
}

.survey-item-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.survey-item-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--survey-text);
}

.survey-item-sub {
    font-size: 12.5px;
    color: var(--survey-muted);
}

.survey-item-stars {
    color: var(--survey-gold);
    font-size: 12px;
}

.survey-item-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.survey-item-payout {
    color: var(--survey-gold-light);
    font-size: 16px;
    font-weight: 800;
    white-space: nowrap;
}

.survey-btn--start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    color: #1a1206;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--survey-gold-light), var(--survey-gold));
    box-shadow: 0 6px 18px rgba(245, 166, 35, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.survey-btn--start:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 166, 35, 0.3);
    color: #1a1206;
}


/* ============================================================
   EMPTY / LOADING STATES
   ============================================================ */

.survey-empty,
.survey-loading {
    padding: 60px 25px;
    text-align: center;
    background: linear-gradient(145deg, rgba(30, 42, 69, 0.7), rgba(24, 36, 59, 0.7));
    border: 1px solid var(--survey-border);
    border-radius: var(--survey-radius-lg);
    color: var(--survey-muted);
}

.survey-empty h3 {
    margin: 0 0 8px;
    color: var(--survey-text);
    font-size: 19px;
    font-weight: 800;
}


/* ============================================================
   HISTORY TABLE
   ============================================================ */

.survey-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.survey-history-table th,
.survey-history-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--survey-border);
    color: var(--survey-text-light);
}

.survey-history-table th {
    color: var(--survey-muted);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.survey-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.survey-status--completed {
    color: #86efac;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.survey-status--reversed {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.survey-history-totals {
    margin-bottom: 16px;
    color: var(--survey-muted);
    font-size: 14px;
}

.survey-history-totals strong {
    color: var(--survey-gold-light);
}


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

@media (max-width: 600px) {

    .survey-intro {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 15px;
        padding: 18px;
    }

    .survey-balance {
        grid-column: 1 / -1;
        align-items: flex-start;
        padding-left: 0;
        padding-top: 14px;
        border-left: 0;
        border-top: 1px solid var(--survey-border);
    }

    .survey-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .survey-item-actions {
        width: 100%;
        justify-content: space-between;
    }

    .survey-history-table {
        font-size: 12px;
    }
}
