/**
 * NoDeposit GEO Offers - Styles
 * Adapté du template bonus-ranking.hbs
 */

/* ============================================
   CONTAINER
   ============================================ */
.ndgo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================
   GEO SELECTOR (onglets pays)
   ============================================ */
.ndgo-geo-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #eee;
}

.ndgo-geo-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f5f5f5;
    color: #555;
    border: 2px solid transparent;
    border-radius: 28px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.ndgo-geo-tab:hover {
    background: #e8e8f8;
    color: #444;
    border-color: #c0c0e0;
}

.ndgo-geo-tab-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
}

.ndgo-geo-tab-active:hover {
    background: linear-gradient(135deg, #5a70d6 0%, #6a4392 100%);
    color: #fff;
    border-color: transparent;
}

.ndgo-geo-tab-flag {
    font-size: 18px;
    line-height: 1;
}

.ndgo-geo-tab-label {
    line-height: 1;
}

@media (max-width: 640px) {
    .ndgo-geo-selector {
        gap: 6px;
    }
    .ndgo-geo-tab {
        padding: 6px 12px;
        font-size: 13px;
    }
    .ndgo-geo-tab-flag {
        font-size: 16px;
    }
}

/* ============================================
   GEO BADGE (dans chaque panel)
   ============================================ */
.ndgo-geo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.ndgo-geo-flag {
    font-size: 18px;
}

.ndgo-geo-count {
    opacity: 0.8;
    font-weight: 400;
    font-size: 13px;
    margin-left: 4px;
}

/* ============================================
   LOADING SPINNER (AJAX)
   ============================================ */
.ndgo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
    color: #888;
    font-size: 14px;
}

.ndgo-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e8e8e8;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: ndgo-spin 0.7s linear infinite;
}

@keyframes ndgo-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   GRID
   ============================================ */
.ndgo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 992px) {
    .ndgo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .ndgo-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ============================================
   CARD
   ============================================ */
.ndgo-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.ndgo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.ndgo-card.ndgo-top-choice {
    border-color: #f0c040;
    box-shadow: 0 2px 8px rgba(240, 192, 64, 0.2);
}

/* ============================================
   RANK BADGE
   ============================================ */
.ndgo-rank {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.4);
}

.ndgo-top-choice .ndgo-rank {
    background: linear-gradient(135deg, #f5af19, #f12711);
}

/* ============================================
   TOP BADGE
   ============================================ */
.ndgo-top-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f0c040;
    color: #333;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   HEADER (logo + info)
   ============================================ */
.ndgo-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.ndgo-logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: contain;
    background: #f5f5f5;
    padding: 4px;
    flex-shrink: 0;
}

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

.ndgo-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.ndgo-highlight {
    display: inline-block;
    background: linear-gradient(135deg, #00c851, #00a040);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    line-height: 1.3;
}

/* ============================================
   PROMO CODE
   ============================================ */
.ndgo-promo {
    background: #fff5f5;
    border: 1px dashed #e74c3c;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
}

.ndgo-promo-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #e74c3c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ndgo-promo-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ndgo-promo-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #e74c3c;
    letter-spacing: 1px;
    background: transparent;
    padding: 0;
}

.ndgo-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.ndgo-copy-btn:hover {
    background: #c0392b;
}

.ndgo-copy-btn.copied {
    background: #27ae60;
}

/* ============================================
   STEPS
   ============================================ */
.ndgo-steps {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    flex: 1;
}

.ndgo-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 5px 0;
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

.ndgo-step + .ndgo-step {
    border-top: 1px solid #eee;
}

.ndgo-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    min-width: 20px;
    background: #667eea;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    margin-top: 1px;
}

.ndgo-step a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.ndgo-step a:hover {
    text-decoration: underline;
}

/* ============================================
   ELIGIBLE GAMES
   ============================================ */
.ndgo-games {
    margin-bottom: 12px;
    padding: 0 2px;
}

.ndgo-games small {
    font-size: 12px;
    color: #888;
    line-height: 1.3;
}

/* ============================================
   ACTIONS (CTA + Details)
   ============================================ */
.ndgo-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.ndgo-cta {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00c851, #00a040);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.ndgo-cta:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 200, 81, 0.3);
    color: #fff !important;
}

.ndgo-details-btn {
    background: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.ndgo-details-btn:hover {
    background: #e0e0e0;
}

/* ============================================
   MODAL
   ============================================ */
.ndgo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ndgo-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ndgo-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.ndgo-modal-close:hover {
    color: #333;
}

/* Modal inner content */
.ndgo-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.ndgo-modal-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    background: #f5f5f5;
    padding: 4px;
}

.ndgo-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.ndgo-modal-bonus {
    font-size: 16px;
    color: #00a040;
    font-weight: 600;
}

.ndgo-modal-section {
    margin-bottom: 16px;
}

.ndgo-modal-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ndgo-modal-section-value {
    font-size: 15px;
    color: #333;
}

.ndgo-modal-cta {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #00c851, #00a040);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none !important;
    text-align: center;
    text-transform: uppercase;
    margin-top: 20px;
    transition: transform 0.2s;
}

.ndgo-modal-cta:hover {
    transform: scale(1.02);
    color: #fff !important;
}
