/* ==========================================================================
   Giveaway Postback Manager — Frontend Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Banner: [gpm_giveaway_banner]
   -------------------------------------------------------------------------- */

.gpm-banner-wrap {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 12px 0;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.gpm-banner-track {
    display: flex;
    gap: 20px;
    width: max-content;
    will-change: transform;
}

.gpm-banner-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 10px 16px;
    min-width: 260px;
    max-width: 320px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.gpm-banner-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.gpm-banner-img img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
}

.gpm-banner-info {
    flex: 1;
    min-width: 0;
}

.gpm-banner-title {
    display: block;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.gpm-banner-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 3px;
}

.gpm-banner-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.gpm-banner-sold {
    font-size: 11px;
    color: #888;
}

/* --------------------------------------------------------------------------
   User Tickets: [gpm_user_tickets]
   -------------------------------------------------------------------------- */

.gpm-user-tickets {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gpm-ticket-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.gpm-ticket-header {
    display: flex;
    gap: 16px;
    padding: 18px;
    align-items: flex-start;
}

.gpm-ticket-img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.gpm-ticket-meta {
    flex: 1;
    min-width: 0;
}

.gpm-ticket-giveaway-title {
    margin: 0 0 6px;
    font-size: 18px;
    line-height: 1.3;
}

.gpm-ticket-giveaway-title a {
    text-decoration: none;
    color: inherit;
}

.gpm-ticket-giveaway-title a:hover {
    text-decoration: underline;
}

.gpm-ticket-draw-date {
    font-size: 13px;
    color: #777;
    margin: 0 0 8px;
}

.gpm-ticket-progress {
    margin-top: 4px;
}

.gpm-ticket-progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.gpm-ticket-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #6610f2);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.gpm-ticket-progress-text {
    font-size: 12px;
    color: #888;
}

.gpm-ticket-numbers {
    padding: 14px 18px;
    background: #f9fafb;
    border-top: 1px solid #eee;
}

.gpm-ticket-numbers strong {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    color: #444;
}

.gpm-ticket-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gpm-ticket-badge {
    display: inline-block;
    background: #e9ecef;
    color: #333;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.gpm-login-prompt,
.gpm-no-tickets {
    padding: 30px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 8px;
}

.gpm-login-prompt a {
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   All Giveaways Grid: [gpm_all_giveaways]
   -------------------------------------------------------------------------- */

.gpm-all-giveaways {
    display: grid;
    gap: 20px;
}

.gpm-grid-cols-1 { grid-template-columns: 1fr; }
.gpm-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.gpm-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.gpm-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .gpm-grid-cols-2,
    .gpm-grid-cols-3,
    .gpm-grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .gpm-grid-cols-3,
    .gpm-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gpm-giveaway-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gpm-giveaway-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.gpm-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.gpm-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gpm-card-body {
    padding: 16px;
}

.gpm-card-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.gpm-card-progress {
    margin-bottom: 10px;
}

.gpm-card-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.gpm-card-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.gpm-card-sold-text {
    font-size: 12px;
    color: #888;
}

.gpm-card-draw-date {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px;
}

.gpm-card-winner {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 13px;
}

.gpm-card-winner-label {
    font-weight: 600;
}

.gpm-card-winner-ticket {
    color: #666;
    font-size: 12px;
}

.gpm-card-status-closed {
    display: inline-block;
    background: #f8d7da;
    color: #721c24;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.gpm-card-status-active {
    display: inline-block;
    background: #d4edda;
    color: #155724;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.gpm-card-closed {
    opacity: 0.75;
}

/* --------------------------------------------------------------------------
   Giveaway Notice (single product page)
   -------------------------------------------------------------------------- */

.gpm-giveaway-notice {
    margin: 15px 0;
}
