/**
 * Giveaway listing and detail styles
 */

.giveaway-hero {
    background: linear-gradient(135deg, rgba(100, 49, 92, 0.95) 0%, rgba(22, 26, 39, 0.95) 50%, rgba(38, 152, 70, 0.9) 100%);
    color: #fff;
    padding: 3.5rem 0 2.5rem;
}

.giveaway-hero-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.2);
    color: #f8f9fb;
}

.giveaway-hero-card h1,
.giveaway-hero-card h2,
.giveaway-hero-card h3,
.giveaway-hero-card p {
    color: inherit;
}

.giveaway-hero-card p {
    color: rgba(248, 249, 251, 0.88);
}

.giveaway-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--cc-slate);
}

.giveaway-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: rgba(38, 152, 70, 0.12);
    color: var(--cc-forest);
}

.giveaway-entry-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 153, 0, 0.12);
    color: var(--cc-forest);
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.6rem;
}

.giveaway-entry-status-text {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    margin-left: 0.6rem;
}

.giveaway-entry-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.giveaway-entry-dot.is-ended {
    background: #6c757d;
    box-shadow: 0 0 0 4px rgba(108, 117, 125, 0.18);
}

.giveaway-entry-dot.is-on {
    background: #00ff66;
    box-shadow: 0 0 0 0 rgba(0, 255, 102, 0.6);
    animation: entryPulse 1.6s ease-out infinite;
}

.giveaway-entry-dot.is-off {
    background: #6c757d;
    box-shadow: 0 0 0 4px rgba(108, 117, 125, 0.2);
}

.giveaway-status-pill.upcoming {
    background: rgba(13, 110, 253, 0.2);
    color: #dbe9ff;
}

@keyframes entryPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 102, 0.6);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 255, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 102, 0);
    }
}

.giveaway-status-pill.ended {
    background: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

.giveaway-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #5c6270;
}

.giveaway-meta strong {
    color: #1c1f2a;
}

.giveaway-hero-card .giveaway-meta {
    color: rgba(248, 249, 251, 0.78);
}

.giveaway-hero-card .giveaway-meta strong {
    color: #ffffff;
}

.giveaway-hero-card .giveaway-entries {
    color: #b7ffdb;
}

.giveaway-entries {
    font-weight: 700;
    color: var(--cc-forest);
}

.giveaway-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.giveaway-gallery-item {
    border: none;
    padding: 0;
    background: #f1f3f5;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: block;
    cursor: zoom-in;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.giveaway-gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.16);
}

.giveaway-gallery-item:focus-visible {
    outline: 3px solid rgba(38, 152, 70, 0.6);
    outline-offset: 3px;
}

.giveaway-gallery img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #f1f3f5;
}

.giveaway-lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    background: rgba(10, 10, 10, 0.8);
    padding: 2rem 1rem;
}

.giveaway-lightbox[hidden] {
    display: none;
}

.giveaway-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: transparent;
}

.giveaway-lightbox-content {
    position: relative;
    max-width: min(960px, 90vw);
    max-height: 85vh;
    background: #0f1115;
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.giveaway-lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    background: #111;
}

.giveaway-lightbox-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.giveaway-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

body.giveaway-lightbox-open {
    overflow: hidden;
}

.giveaway-cta-card {
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
    padding: 1.75rem;
    background: #fff;
}

.giveaway-entry-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.giveaway-entry-quantity {
    display: grid;
    grid-template-columns: 40px minmax(110px, 1fr) 40px;
    align-items: center;
    border-radius: 12px;
    background: #fff;
    border: 2px solid #e6e8ef;
    overflow: hidden;
    width: 100%;
}

.giveaway-entry-step {
    height: 100%;
    border: none;
    background: rgba(38, 152, 70, 0.08);
    color: var(--cc-forest);
    font-size: 1.2rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    line-height: 1;
}

.giveaway-entry-step:hover {
    background: rgba(38, 152, 70, 0.18);
}

.giveaway-entry-input {
    width: 100%;
    font-weight: 600;
    border: none;
    text-align: center;
    padding: 0.75rem 0.5rem;
    box-shadow: none;
}

.giveaway-entry-input:focus {
    border: none;
    box-shadow: none;
}

.giveaway-entry-input::-webkit-outer-spin-button,
.giveaway-entry-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.giveaway-entry-input[type="number"] {
    -moz-appearance: textfield;
}

.giveaway-entry-note {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: #526174;
    font-weight: 600;
    line-height: 1.4;
}

.giveaway-entry-note strong {
    color: var(--cc-forest);
}

.giveaway-entry-hint {
    margin: 0;
    font-size: 0.95rem;
    color: #5c6270;
    font-weight: 600;
}

.giveaway-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.giveaway-confirm-modal[hidden] {
    display: none;
}

.giveaway-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 16, 28, 0.65);
    border: none;
}

.giveaway-confirm-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    width: min(440px, 100%);
    box-shadow: 0 20px 50px rgba(12, 18, 35, 0.35);
}

.giveaway-confirm-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    background: #f3f6fb;
    border-radius: 14px;
    padding: 0.85rem 1rem;
}

.giveaway-confirm-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.giveaway-confirm-value {
    font-weight: 700;
    color: #1f2937;
}

.giveaway-confirm-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #5a6478;
}

.giveaway-confirm-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.giveaway-confirm-animation {
    margin-top: 1.5rem;
    text-align: center;
}

.giveaway-confirm-ticket {
    width: 120px;
    height: 120px;
    margin: 0 auto 0.75rem;
}

.giveaway-confirm-success {
    margin: 0;
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--cc-forest);
}

.giveaway-confirm-modal.is-confirming .giveaway-confirm-actions {
    display: none;
}

.giveaway-confirm-modal.is-confirming .giveaway-confirm-card {
    padding: 1.5rem;
}

.giveaway-confirm-modal.is-confirming .giveaway-confirm-summary,
.giveaway-confirm-modal.is-confirming .giveaway-confirm-note,
.giveaway-confirm-modal.is-confirming .giveaway-confirm-card > h2,
.giveaway-confirm-modal.is-confirming .giveaway-confirm-card > .text-muted {
    display: none;
}

.giveaway-winner-card {
    border-radius: 18px;
    background: rgba(38, 152, 70, 0.08);
    border: 1px solid rgba(38, 152, 70, 0.2);
    padding: 1.5rem;
}

.giveaway-winner-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--cc-forest);
}

.giveaway-timeline {
    display: grid;
    gap: 1rem;
}

.giveaway-list-empty {
    border-radius: 18px;
    border: 1px dashed rgba(15, 23, 42, 0.2);
    padding: 2rem;
    text-align: center;
    color: #616873;
    background: #fff;
}

@media (max-width: 768px) {
    .giveaway-hero {
        padding: 2.5rem 0 2rem;
    }

    .giveaway-hero-card {
        padding: 1.5rem;
    }
}
