.oddsapi-widget {
    max-width: 960px;
    margin: 20px auto;
    padding: 20px;
    background: #0f172a;
    border-radius: 16px;
    color: #e5e7eb;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.25);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.oddsapi-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.oddsapi-header h3 {
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #f9fafb;
}

.oddsapi-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #9ca3af;
}

.oddsapi-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.oddsapi-step {
    flex: 1 1 30%;
    min-width: 220px;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.15), transparent),
                radial-gradient(circle at bottom right, rgba(129, 140, 248, 0.18), transparent);
    border-radius: 12px;
    padding: 12px 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    backdrop-filter: blur(10px);
}

.oddsapi-step-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #cbd5f5;
    margin-bottom: 6px;
}

.oddsapi-step-body {
    display: flex;
    align-items: center;
}

/* --- SELECTS avec texte blanc --- */

.oddsapi-select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background-color: #020617;
    color: #f9fafb;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%),
                      linear-gradient(135deg, #9ca3af 50%, transparent 50%);
    background-position: calc(100% - 14px) 50%, calc(100% - 10px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.oddsapi-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
    background-color: #020617;
    color: #f9fafb;
}

.oddsapi-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* sécurité : on force le texte blanc même si le thème override */
.oddsapi-widget select,
.oddsapi-widget option {
    color: #ffffff !important;
    background-color: #020617 !important;
}

/* Actions */

.oddsapi-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.oddsapi-btn {
    position: relative;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ecfdf5;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.5);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.oddsapi-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(22, 163, 74, 0.7);
    filter: brightness(1.05);
}

.oddsapi-btn:disabled,
.oddsapi-btn.is-loading {
    cursor: wait;
    opacity: 0.6;
    box-shadow: none;
    transform: none;
}

.oddsapi-btn-ghost {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.6);
    color: #e5e7eb;
    box-shadow: none;
}

.oddsapi-btn-ghost:hover {
    background: rgba(15, 23, 42, 0.9);
}

/* Résultats */

.oddsapi-results {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: 12px;
    background: radial-gradient(circle at top, rgba(15, 118, 110, 0.4), rgba(15, 23, 42, 0.9));
    min-height: 80px;
}

.oddsapi-placeholder {
    font-size: 0.9rem;
    color: #cbd5f5;
}

/* Messages */

.oddsapi-message {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oddsapi-message:before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.oddsapi-info {
    background: rgba(37, 99, 235, 0.15);
    color: #bfdbfe;
}

.oddsapi-info:before {
    background: #60a5fa;
}

.oddsapi-error {
    background: rgba(220, 38, 38, 0.18);
    color: #fecaca;
}

.oddsapi-error:before {
    background: #f87171;
}

/* Carte + tableau */

.oddsapi-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    overflow: hidden;
}

.oddsapi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.9), rgba(30, 64, 175, 0.9));
    color: #ecfeff;
}

.oddsapi-match {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.oddsapi-team {
    white-space: nowrap;
}

.oddsapi-vs {
    font-size: 0.85rem;
    opacity: 0.85;
}

.oddsapi-date {
    font-size: 0.8rem;
    opacity: 0.9;
}

.oddsapi-no-odds {
    padding: 10px 12px;
    font-size: 0.9rem;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.5);
}

.oddsapi-table-wrapper {
    overflow-x: auto;
}

.oddsapi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.oddsapi-table thead {
    background: rgba(15, 23, 42, 0.95);
}

.oddsapi-table th,
.oddsapi-table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(30, 64, 175, 0.5);
}

.oddsapi-table th:first-child,
.oddsapi-table td:first-child {
    text-align: left;
}

.oddsapi-table th {
    font-weight: 600;
    color: #cbd5f5;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.09em;
}

.oddsapi-bookmaker-name {
    font-weight: 600;
    color: #f9fafb;
}

/* cellule bookmaker + bouton parrainage */

.oddsapi-bookmaker-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.oddsapi-affiliate-link {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.6);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.oddsapi-affiliate-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.8);
    filter: brightness(1.05);
}

/* Cotes */

.oddsapi-odd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    padding: 4px 8px;
    border-radius: 999px;
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.25), rgba(16, 185, 129, 0.3));
    color: #ecfeff;
    font-weight: 600;
}

.oddsapi-empty {
    opacity: 0.4;
    font-style: italic;
}

/* Responsive */

@media (max-width: 768px) {
    .oddsapi-widget {
        padding: 16px;
        border-radius: 12px;
    }
    .oddsapi-steps {
        flex-direction: column;
    }
    .oddsapi-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .oddsapi-btn,
    .oddsapi-btn-ghost {
        width: 100%;
        justify-content: center;
    }
    .oddsapi-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
