/* =====================================================
   Football Predictions Tournament — style.css (v1.3.1)
   ===================================================== */

/* ================= СЛУЖЕБНЫЕ СООБЩЕНИЯ ================= */
.fp-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    display: none;
}

.fp-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fp-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ================= КНОПКИ ПЛАГИНА =================
   Принудительно перебиваем стили кнопок темы сайта:
   скругление, ряд, без наложений                     */
.fp-btn,
button.fp-btn,
.fp-auth-box button,
.fp-auth-box button.fp-btn,
.fp-predictions-page button.fp-btn,
.fp-form-actions button.fp-btn {
    display: inline-block !important;
    width: auto !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    position: static !important;
    box-shadow: 0 2px 10px rgba(0, 60, 100, .15) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    transition: background .25s ease, box-shadow .25s ease, transform .15s ease;
}

.fp-btn:hover,
button.fp-btn:hover,
.fp-auth-box button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 60, 100, .22) !important;
}

.fp-btn:active,
button.fp-btn:active,
.fp-auth-box button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 60, 100, .18) !important;
}

.fp-btn-primary,
button.fp-btn-primary,
.fp-auth-box button.fp-btn-primary {
    background: linear-gradient(135deg, #0082c3 0%, #00639b 100%) !important;
    background-color: #0073aa !important;
    color: #ffffff !important;
}

.fp-btn-primary:hover,
button.fp-btn-primary:hover,
.fp-auth-box button.fp-btn-primary:hover {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%) !important;
    background-color: #005a87 !important;
    color: #ffffff !important;
}

.fp-btn-secondary,
button.fp-btn-secondary,
.fp-auth-box button.fp-btn-secondary {
    background: #eef1f4 !important;
    background-color: #eef1f4 !important;
    color: #2c3540 !important;
    border: 1px solid #d5dbe1 !important;
    box-shadow: none !important;
}

.fp-btn-secondary:hover,
button.fp-btn-secondary:hover,
.fp-auth-box button.fp-btn-secondary:hover {
    background: #e2e7ec !important;
    color: #1a222b !important;
}

.fp-btn-small {
    padding: 9px 18px !important;
    font-size: 14px !important;
    border-radius: 10px !important;
}

/* Контейнер кнопок под формами — КОМПАКТНО В РЯД */
.fp-auth-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 22px 0 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

.fp-auth-buttons .fp-btn,
.fp-auth-buttons button {
    display: inline-block !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* ================= АВТОРИЗАЦИЯ / РЕГИСТРАЦИЯ ================= */
.fp-auth-wrap {
    display: flex;
    justify-content: center;
    padding: 40px 15px;
}

.fp-auth-box {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .10);
    padding: 32px;
    box-sizing: border-box;
}

.fp-auth-box h2 {
    margin-top: 0;
    text-align: center;
    color: #222;
}

.fp-auth-logged { text-align: center; margin-bottom: 20px; }

.fp-auth-form h3 {
    margin: 0 0 18px;
    color: #444;
}

.fp-form-group { margin-bottom: 18px; }

.fp-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
}

.fp-form-group input[type="text"],
.fp-form-group input[type="email"],
.fp-form-group input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d5dbe1;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
    background: #fbfcfd;
    transition: border-color .2s, box-shadow .2s;
}

.fp-form-group input[type="text"]:focus,
.fp-form-group input[type="email"]:focus,
.fp-form-group input[type="password"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, .12);
    background: #fff;
}

.fp-checkbox-group label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: normal;
}

.fp-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.fp-forgot-row { margin-top: 14px; text-align: right; }

.fp-forgot-link {
    font-size: 14px;
    color: #0073aa !important;
    text-decoration: underline;
}

.fp-forgot-link:hover { color: #005a87 !important; }

.fp-forgot-hint {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* ================= СТРАНИЦА ПРОГНОЗОВ ================= */
.fp-predictions-page {
    max-width: 960px;
    margin: 20px auto;
}

.fp-user-info {
    background: #f0f8ff;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid #0073aa;
}

.fp-user-info h2 { margin: 0 0 10px; }
.fp-points { font-size: 24px; color: #0073aa; }
.fp-hint { font-style: italic; color: #666; }

/* Выбор любимой команды */
.fp-favorite-team {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #b9c9d8;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.fp-favorite-team label { font-weight: 600; color: #333; }

.fp-select {
    padding: 10px 12px;
    border: 1px solid #ccd5dd;
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
    min-width: 220px;
    cursor: pointer;
}

.fp-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, .12);
}

#fp-favorite-current { color: #0a7a3d; }

/* ---------- АККОРДЕОН ТУРОВ ---------- */
.fp-accordion { margin: 20px 0 40px; }

.fp-accordion-item {
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
}

.fp-accordion-item.fp-round-open { border-left: 4px solid #0073aa; }

.fp-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f5f7fa;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    color: #333;
}

.fp-accordion-header:hover { background: #eef2f7; }

.fp-accordion-header::after {
    content: '\25BE';
    margin-left: 10px;
    transition: transform .25s;
    color: #0073aa;
}

.fp-accordion-item.open .fp-accordion-header::after { transform: rotate(-180deg); }

.fp-accordion-body {
    display: none;
    padding: 16px;
    border-top: 1px solid #e2e6ea;
}

.fp-accordion-item.open .fp-accordion-body { display: block; }

.fp-round-status { font-size: 13px; font-weight: 600; }
.fp-status-open     { color: #0a7a3d; }
.fp-status-live     { color: #b26a00; }
.fp-status-finished { color: #6c757d; }

/* ---------- ТАБЛИЦА МАТЧЕЙ ---------- */
.fp-table-wrap { overflow-x: auto; }

.fp-matches-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.fp-matches-table th,
.fp-matches-table td {
    padding: 12px 10px;
    border: 1px solid #e0e0e0;
    text-align: center;
    vertical-align: middle;
}

.fp-matches-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.fp-matches-table tr.started   { background: #fff3cd; }
.fp-matches-table tr.completed { background: #d4edda; }

.fp-date { white-space: nowrap; font-size: 14px; }
.fp-team { font-weight: 600; text-align: left !important; min-width: 110px; }
.fp-score-cell { font-weight: bold; font-size: 16px; }
.fp-vs { color: #999; font-size: 13px; }

/* Поля прогноза в одну строку */
.fp-prediction-cell { white-space: nowrap; }

.fp-prediction-cell input[type="number"] {
    width: 52px;
    padding: 7px 4px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    display: inline-block;
    vertical-align: middle;
    -moz-appearance: textfield;
}

.fp-prediction-cell input[type="number"]::-webkit-outer-spin-button,
.fp-prediction-cell input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fp-colon {
    display: inline-block;
    padding: 0 6px;
    font-weight: 700;
    vertical-align: middle;
}

.fp-locked { color: #555; font-weight: 600; }

.fp-status.started   { color: #856404; font-weight: 500; }
.fp-status.completed { color: #155724; font-weight: 500; }

.fp-form-actions {
    text-align: center;
    margin: 18px 0 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ================= ТУРНИРНАЯ ТАБЛИЦА ================= */
.fp-leaderboard { max-width: 860px; margin: 20px auto; }

.fp-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.fp-leaderboard-table th,
.fp-leaderboard-table td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.fp-leaderboard-table th {
    background: #0073aa;
    color: #fff;
    font-weight: 600;
}

.fp-leaderboard-table tr:nth-child(even) { background: #f9f9f9; }
.fp-leaderboard-table tr.fp-current-user { background: #fff3cd !important; font-weight: 600; }
.fp-leaderboard-table tr:hover { background: #f0f0f0; }

.fp-position { font-weight: bold; font-size: 18px; }

.fp-medal {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    color: #fff;
    font-weight: bold;
}

.fp-medal-1 { background: #ffd700; color: #333; }
.fp-medal-2 { background: #c0c0c0; color: #333; }
.fp-medal-3 { background: #cd7f32; color: #fff; }

.fp-empty { padding: 30px; text-align: center; color: #999; font-style: italic; }

.fp-scoring-rules {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.fp-scoring-rules h4 { margin-top: 0; color: #333; }
.fp-scoring-rules ul { margin: 10px 0 0; padding-left: 20px; }
.fp-scoring-rules li { margin: 8px 0; }

/* Рейтинг по любимым клубам */
.fp-club-table .fp-team-left { text-align: left !important; font-weight: 600; }
.fp-club-table tr.fp-my-club { background: #e6f4ea !important; }

/* ================= АДМИНКА ================= */
.fp-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.fp-status-upcoming  { background: #e0f0ff; color: #0073aa; }
.fp-status-active    { background: #fff3cd; color: #856404; }
.fp-status-completed { background: #d4edda; color: #155724; }

.fp-rounds-list { margin-top: 20px; }

.fp-points-input { width: 80px; padding: 4px 6px; }

.fp-delete-user {
    color: #a00 !important;
    border-color: #a00 !important;
    background: #fff !important;
}

.fp-delete-user:hover {
    background: #a00 !important;
    color: #fff !important;
}

/* ================= АДАПТИВНОСТЬ ================= */
@media (max-width: 768px) {
    .fp-matches-table,
    .fp-leaderboard-table { font-size: 13px; }

    .fp-matches-table th,
    .fp-matches-table td,
    .fp-leaderboard-table th,
    .fp-leaderboard-table td { padding: 8px 5px; }

    .fp-prediction-cell input[type="number"] { width: 42px; }
    .fp-team { min-width: 80px; }

    .fp-auth-box { margin: 15px; padding: 22px; }

    .fp-accordion-header { padding: 12px 14px; font-size: 14px; }

    .fp-favorite-team { flex-direction: column; align-items: flex-start; }
    .fp-select { width: 100%; }

    /* Кнопки в ряд, компактно, без наложений */
    .fp-auth-buttons {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .fp-auth-buttons .fp-btn,
    .fp-auth-buttons button {
        padding: 11px 16px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
    }
}
/* ================= ВЕРСИЯ 1.5.0: ПАГИНАЦИЯ + ОРАНЖЕВАЯ ПОДСВЕТКА ================= */

/* Строка текущего пользователя — оранжевая (перебивает прежнюю жёлтую) */
.fp-leaderboard-table tr.fp-current-user,
.fp-leaderboard-table tr.fp-current-user td {
    background: #ffe8dd !important;
    color: #c2410c !important;
    font-weight: 700;
}

.fp-leaderboard-table tr.fp-current-user td:first-child {
    border-left: 4px solid #e8571d;
}

.fp-leaderboard-table tr.fp-current-user td strong {
    color: #c2410c !important;
}

/* Разделитель перед строкой пользователя (если он вне страницы) */
.fp-leaderboard-table tr.fp-gap-row td {
    background: #f5f6f7 !important;
    color: #98a2ad;
    text-align: center;
    padding: 4px 0 !important;
    letter-spacing: 4px;
    border-top: none !important;
    border-bottom: none !important;
}

/* Пагинация */
.fp-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 18px 0 6px;
}

.fp-pagination a,
.fp-pagination span {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #d5dbe1;
    background: #fff;
    color: #0073aa !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: background .2s ease, color .2s ease;
}

.fp-pagination a:hover {
    background: #eaf4fb;
    color: #005a87 !important;
}

.fp-pagination .fp-page-current {
    background: linear-gradient(135deg, #e8571d, #c2410c);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(232, 87, 29, .35);
}

.fp-pagination .fp-dots {
    border: none;
    background: transparent;
    color: #77808a;
}

.fp-pagination .fp-page-prev,
.fp-pagination .fp-page-next {
    padding: 0 14px;
    font-size: 16px;
}

.fp-pagination-info {
    text-align: center;
    color: #77808a;
    font-size: 13px;
    margin: 6px 0 0;
}

@media (max-width: 768px) {
    .fp-pagination a,
    .fp-pagination span {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }
}