/* ============================================================
   ESAForum — Giveaways CSS
   Created by ESAGAMES HOSTING SHIELD SRL
   ============================================================ */

/* ------------------------------------------------------------------ */
/* Section headers                                                     */
/* ------------------------------------------------------------------ */
.gw-section { margin-bottom: 40px; }

.gw-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.gw-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-mute);
    flex-shrink: 0;
}

.gw-dot-live {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    animation: gw-pulse 1.6s ease-in-out infinite;
}

@keyframes gw-pulse {
    0%, 100% { box-shadow: 0 0 4px var(--green); }
    50%       { box-shadow: 0 0 14px var(--green), 0 0 28px var(--green); }
}

/* ------------------------------------------------------------------ */
/* Card grid                                                           */
/* ------------------------------------------------------------------ */
.gw-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.gw-grid-past { opacity: .82; }

/* ------------------------------------------------------------------ */
/* Giveaway card                                                       */
/* ------------------------------------------------------------------ */
.gw-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    position: relative;
}

.gw-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0,0,0,.4);
    border-color: var(--primary);
}

.gw-card-active {
    border-color: rgba(var(--primary-rgb), .35);
    box-shadow: 0 0 0 1px rgba(var(--primary-rgb),.12), 0 4px 20px rgba(var(--primary-rgb),.08);
}

.gw-card-active:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 10px 32px rgba(var(--primary-rgb),.2);
}

.gw-card-ended { opacity: .85; }

/* ------------------------------------------------------------------ */
/* Card top — icon + countdown                                         */
/* ------------------------------------------------------------------ */
.gw-card-top {
    position: relative;
    background: linear-gradient(135deg, rgba(var(--primary-rgb),.12) 0%, rgba(47,107,255,.06) 100%);
    border-bottom: 1px solid var(--border);
    padding: 22px 18px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gw-prize-icon {
    font-size: 36px;
    line-height: 1;
    filter: drop-shadow(0 2px 8px rgba(var(--primary-rgb),.4));
}

/* ------------------------------------------------------------------ */
/* Countdown badge on card                                             */
/* ------------------------------------------------------------------ */
.gw-countdown-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(20,20,35,.75);
    border: 1px solid rgba(255,255,255,.1);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(6px);
    white-space: nowrap;
}

.gw-countdown-ended {
    background: rgba(100,100,120,.25);
    border-color: rgba(255,255,255,.06);
    color: var(--text-mute);
}

/* ------------------------------------------------------------------ */
/* Card body                                                           */
/* ------------------------------------------------------------------ */
.gw-card-body {
    padding: 16px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gw-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
}

.gw-title a {
    color: var(--text);
    text-decoration: none;
    transition: color .15s;
}

.gw-title a:hover { color: var(--primary-2); }

.gw-prize-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.gw-prize-tag {
    color: var(--text-mute);
    font-weight: 600;
    flex-shrink: 0;
}

.gw-prize-value {
    color: var(--amber);
    font-weight: 700;
}

.gw-desc {
    font-size: 13px;
    color: var(--text-mute);
    line-height: 1.55;
    margin: 0;
}

.gw-winner-mini {
    font-size: 13px;
    color: var(--amber);
    font-weight: 600;
    background: rgba(245,179,1,.08);
    border: 1px solid rgba(245,179,1,.2);
    border-radius: 8px;
    padding: 6px 10px;
    margin-top: 2px;
}

.gw-no-winner-mini {
    font-size: 12.5px;
    color: var(--text-mute);
}

/* ------------------------------------------------------------------ */
/* Card footer                                                         */
/* ------------------------------------------------------------------ */
.gw-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 16px;
    border-top: 1px solid var(--border);
    gap: 8px;
    flex-wrap: wrap;
}

.gw-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gw-entries-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 20px;
}

.gw-cost-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--amber);
    background: rgba(245,179,1,.1);
    border: 1px solid rgba(245,179,1,.22);
    padding: 3px 10px;
    border-radius: 20px;
}

.gw-free-badge {
    font-size: 12px;
    font-weight: 700;
    color: var(--green);
    background: rgba(46,230,166,.1);
    border: 1px solid rgba(46,230,166,.22);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ------------------------------------------------------------------ */
/* Winner banner (show page)                                           */
/* ------------------------------------------------------------------ */
.gw-winner-banner {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(245,179,1,.12) 0%, rgba(var(--primary-rgb),.12) 100%);
    border: 1px solid rgba(245,179,1,.4);
    margin-bottom: 22px;
    animation: gw-winner-appear .5s ease;
}

@keyframes gw-winner-appear {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gw-winner-banner-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(245,179,1,.15) 0%, transparent 70%),
                radial-gradient(ellipse at 80% 50%, rgba(var(--primary-rgb),.12) 0%, transparent 70%);
    pointer-events: none;
}

/* Confetti-ish sparkle overlay */
.gw-winner-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.35) 1px, transparent 1px),
        radial-gradient(circle, rgba(245,179,1,.25) 1px, transparent 1px);
    background-size: 40px 40px, 27px 27px;
    background-position: 0 0, 14px 14px;
    opacity: .5;
    pointer-events: none;
    animation: gw-sparkle 4s linear infinite;
}

@keyframes gw-sparkle {
    from { background-position: 0 0, 14px 14px; }
    to   { background-position: 40px 40px, 54px 54px; }
}

.gw-winner-banner-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 28px;
}

.gw-winner-trophy {
    font-size: 52px;
    line-height: 1;
    filter: drop-shadow(0 4px 16px rgba(245,179,1,.6));
    animation: gw-trophy-bob 2.4s ease-in-out infinite;
}

@keyframes gw-trophy-bob {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%       { transform: translateY(-6px) rotate(3deg); }
}

.gw-winner-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 4px;
}

.gw-winner-name {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #f5b301, #ffdd70, #f5b301);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.gw-winner-sub {
    font-size: 13px;
    color: var(--text-mute);
    margin-top: 4px;
}

.gw-winner-sub em {
    color: var(--text-dim);
    font-style: normal;
    font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Hero card (show page)                                               */
/* ------------------------------------------------------------------ */
.gw-hero {
    background: linear-gradient(180deg, rgba(var(--primary-rgb),.07) 0%, transparent 100%);
    border: 1px solid rgba(var(--primary-rgb),.22);
}

.gw-hero-prize-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.gw-hero-prize-icon {
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 2px 10px rgba(var(--primary-rgb),.5));
}

.gw-hero-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-mute);
    margin-bottom: 4px;
}

.gw-hero-prize-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--amber);
    line-height: 1.2;
}

.gw-hero-countdown {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(var(--primary-rgb),.15);
    border: 1px solid rgba(var(--primary-rgb),.3);
    color: var(--primary-2);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.gw-hero-countdown-ended {
    background: rgba(100,100,120,.25);
    border-color: rgba(255,255,255,.08);
    color: var(--text-mute);
}

.gw-hero-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin: 18px 0 0;
    line-height: 1.25;
}

.gw-description {
    font-size: 14.5px;
    color: var(--text-dim);
    line-height: 1.7;
    word-break: break-word;
}

/* ------------------------------------------------------------------ */
/* Meta grid (show page)                                               */
/* ------------------------------------------------------------------ */
.gw-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.gw-meta-cell {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gw-meta-key {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--text-mute);
}

.gw-meta-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.gw-free  { color: var(--green) !important; }
.gw-cost  { color: var(--amber) !important; }
.gw-green { color: var(--green) !important; }
.gw-amber { color: var(--amber) !important; }
.gw-red   { color: var(--red)   !important; }

/* ------------------------------------------------------------------ */
/* Entrants list                                                        */
/* ------------------------------------------------------------------ */
.gw-entrants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.gw-entrant-avatar {
    display: inline-block;
    border-radius: 50%;
    transition: transform .15s ease, box-shadow .15s ease;
}

.gw-entrant-avatar:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--primary);
    z-index: 2;
    position: relative;
}

.gw-entrant-avatar img {
    display: block;
}

.gw-entrant-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface-3);
    border: 1px solid var(--border);
    color: var(--text-mute);
    font-size: 11px;
    font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Sidebar widgets                                                      */
/* ------------------------------------------------------------------ */
.gw-enter-widget .widget-head,
.gw-draw-widget  .widget-head {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.gw-already-entered {
    border-color: rgba(46,230,166,.3);
    background: linear-gradient(135deg, rgba(46,230,166,.06) 0%, transparent 100%);
}

.gw-cost-info {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.gw-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 13.5px;
}

.gw-cost-row + .gw-cost-row {
    border-top: 1px solid var(--border);
}

.gw-cost-row span { color: var(--text-mute); }

.gw-free-info {
    background: rgba(46,230,166,.07);
    border: 1px solid rgba(46,230,166,.2);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--text-dim);
}

.gw-free-info strong { color: var(--green); }

.gw-draw-widget {
    border-color: rgba(245,179,1,.25);
    background: linear-gradient(135deg, rgba(245,179,1,.05) 0%, transparent 100%);
}

/* ------------------------------------------------------------------ */
/* About info list                                                      */
/* ------------------------------------------------------------------ */
.gw-info-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 14px;
    font-size: 13px;
}

.gw-info-list dt {
    color: var(--text-mute);
    font-weight: 600;
    white-space: nowrap;
}

.gw-info-list dd {
    margin: 0;
    color: var(--text);
}

/* ------------------------------------------------------------------ */
/* Form helpers (used in giveaway/form.php)                            */
/* ------------------------------------------------------------------ */
.gw-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.gw-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 700px) {
    .gw-grid         { grid-template-columns: 1fr; }
    .gw-hero-prize-wrap { flex-direction: column; align-items: flex-start; }
    .gw-hero-countdown  { margin-left: 0; }
    .gw-winner-banner-inner { padding: 16px 18px; gap: 14px; }
    .gw-winner-trophy { font-size: 38px; }
    .gw-winner-name   { font-size: 20px; }
    .gw-meta-grid     { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .gw-card-footer { flex-direction: column; align-items: flex-start; }
    .gw-card-footer .btn { width: 100%; text-align: center; }
    .gw-hero-prize-wrap { gap: 12px; }
}

@media (max-width: 480px) {
    .gw-grid { grid-template-columns: 1fr; }
    .gw-card { border-radius: 10px; }
    .gw-card-top { padding: 16px 14px 14px; }
    .gw-prize-icon { font-size: 28px; }
    .gw-card-body { padding: 12px 14px; }
    .gw-title { font-size: 14px; }
    .gw-winner-banner { border-radius: 10px; }
    .gw-winner-banner-inner { flex-direction: column; padding: 14px 16px; gap: 10px; }
    .gw-winner-trophy { font-size: 32px; }
    .gw-winner-name { font-size: 18px; }
    .gw-winner-label { font-size: 10px; }
    .gw-hero-prize-icon { font-size: 36px; }
    .gw-hero-prize-name { font-size: 18px; }
    .gw-hero-title { font-size: 18px; }
    .gw-meta-grid { grid-template-columns: 1fr 1fr; }
    .gw-form-row { grid-template-columns: 1fr; }
    .gw-form-actions { flex-direction: column-reverse; }
    .gw-form-actions .btn { width: 100%; text-align: center; }
    .gw-cost-row { flex-wrap: wrap; gap: 4px; }
    .gw-entrants-list { gap: 6px; }
}
