/* ===================================================================
   SUPER-MODERN ЛОЯЛЬНОСТЬ BIGOR - Стили от Gemini (Версия 3)
   =================================================================== */

/* Стили для отображения email объединенных заказов */
.merged-order-email {
    color: #f39c12;
    font-size: 0.85em;
    font-style: italic;
    margin-left: 5px;
    font-weight: 500;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.merged-order-email:hover {
    opacity: 1;
}

/* Для темной темы админки */
.bigor-loyalty-table .merged-order-email {
    color: #ffa726;
}

/* Адаптивность */
@media (max-width: 768px) {
    .merged-order-email {
        display: block;
        margin-left: 0;
        margin-top: 2px;
        font-size: 0.8em;
    }
    
    .bigor-loyalty-orders td[data-label="Заказ"] .merged-order-email {
        margin-top: 5px;
    }
}
/* Основные стили */
.bigor-loyalty-program {
    max-width: 1000px;
    margin: 2rem auto;
    padding: clamp(1rem, 5vw, 2.5rem);
    background: #111;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 2px rgba(255, 255, 255, 0.1);
    color: #e8e8e8;
    border: 1px solid #333;
    font-family: 'Montserrat', sans-serif;
    overflow: hidden;
}

.bigor-loyalty-title {
    font-family: 'Genos', sans-serif;
    font-size: 25px;
    margin: 0 0 2rem 0;
    color: #fff;
    font-weight: 700;
    background: linear-gradient(145deg, #ffffff, #b0b0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
}

/* Карточка информации о клиенте */
.customer-status-card {
    background: rgba(42, 42, 42, 0.3);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    backdrop-filter: blur(10px);
}

.status-badge-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.bigor-loyalty-status-badge {
    padding: 0.6rem 1.5rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    background: linear-gradient(135deg, #e0e0e0, #ffffff);
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2), inset 0 -2px 5px rgba(0, 0, 0, 0.2);
}

.bigor-loyalty-discount {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.customer-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid #333;
    transition: all 0.3s ease;
    text-align: center;
    display: none;
}

.stat-item:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-3px);
    border-color: #555;
}

.stat-item.pending {
    border-color: rgba(255, 193, 7, 0.4);
}

.stat-label {
    color: #aaa;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-value {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Промокод */
.bigor-loyalty-promo {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed #444;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.promo-label {
    display: block;
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.promo-code-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.promo-code {
    font-family: 'Genos', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: 1px solid #444;
    letter-spacing: 2px;
}

@media (max-width: 767px) { 
    .promo-code {
     font-size: 4vw;
}
}

/* Увеличиваем специфичность селектора, чтобы перебить глобальные стили */
.bigor-loyalty-program .copy-promo-btn {
    background: #333;
    border: 1px solid #555;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Явно указываем стили для hover, чтобы они не заменялись на #c36 */
.bigor-loyalty-program .copy-promo-btn:hover {
    background: #444; /* Наш цвет при наведении */
    border-color: #777;
    color: #fff; /* Наш цвет текста при наведении */
    transform: translateY(-2px);
    text-decoration: none;
}

/* Явно указываем стили для focus */
.bigor-loyalty-program .copy-promo-btn:focus,
.bigor-loyalty-program .copy-promo-btn:focus-visible {
    background: #333; /* Наш цвет при фокусе */
    color: #fff; /* Наш цвет текста при фокусе */
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.bigor-loyalty-program .copy-promo-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.bigor-loyalty-program .copy-promo-btn.copied .dashicons {
    animation: copy-icon-pop 1.5s ease-out forwards;
}

@keyframes copy-icon-pop {
    0% { transform: scale(1); color: #fff; }
    20% { transform: scale(1.4) rotate(15deg); color: #4caf50; }
    40% { transform: scale(0.9) rotate(-10deg); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); color: #fff; }
}


/* ===================================================================
   ВАУ ПРОГРЕСС-ШКАЛА (ИСПРАВЛЕННАЯ)
   =================================================================== */
.bigor-loyalty-all-levels-progress {
    margin: 4rem 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 2rem 0; /* Уменьшаем боковые паддинги контейнера */
    position: relative;
}

.progress-title {
    font-family: 'Genos', sans-serif;
    text-align: center;
    margin: 0 0px 0rem 0px !important;
    color: #FFFFFF !important;
    font-size: 1.5rem;
    font-weight: 600;
}

/* ИСПРАВЛЕНИЕ СКРОЛЛОВ */
.all-levels-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0rem 100px 7rem 100px;
    scrollbar-width: thin;
    scrollbar-color: #555 #222;
}
.all-levels-scroll-container::-webkit-scrollbar { height: 8px; }
.all-levels-scroll-container::-webkit-scrollbar-track { background: #222; border-radius: 4px; }
.all-levels-scroll-container::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }

.all-levels-track {
    position: relative;
    min-width: 800px;
    height: 140px;
    margin: 0;
    padding: 0 40px; /* ДОБАВЛЯЕМ ОТСТУПЫ ДЛЯ КРАЙНИХ ЭЛЕМЕНТОВ */
}

.all-levels-line {
    position: absolute;
    top: 50%;
    left: 40px; /* Синхронизируем с паддингом трека */
    right: 40px; /* Синхронизируем с паддингом трека */
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    transform: translateY(-50%);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.progress-completed, .progress-current, .progress-pending {
    height: 100%;
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 0;
    transition: all 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-completed {
    background: linear-gradient(90deg, #4caf50, #81c784);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    z-index: 3;
}

.progress-current {
    background: linear-gradient(90deg, #b0b0b0, #ffffff);
    box-shadow: 0 0 15px rgba(224, 224, 224, 0.5);
    z-index: 2;
}

.progress-pending {
    background: repeating-linear-gradient(45deg, rgba(255, 193, 7, 0.4), rgba(255, 193, 7, 0.4) 10px, rgba(255, 193, 7, 0.5) 10px, rgba(255, 193, 7, 0.5) 20px);
    z-index: 1;
}

.level-milestone {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.milestone-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #555;
    background: #111;
    transition: all 0.4s ease;
    box-shadow: 0 0 10px rgba(0,0,0,0.7);
}

.milestone-dot .dashicons { font-size: 16px; }

.level-milestone.completed .milestone-dot {
    background: #4caf50;
    border-color: #81c784;
    color: white;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.7);
}

.level-milestone.current .milestone-dot {
    width: 32px;
    height: 32px;
    background: #fff;
    border-color: #fff;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
    animation: currentGlow 2s infinite alternate;
}

@keyframes currentGlow {
    from { box-shadow: 0 0 20px rgba(255, 255, 255, 0.6); transform: scale(1); }
    to { box-shadow: 0 0 35px rgba(255, 255, 255, 1); transform: scale(1.1); }
}

.current-pulse {
    width: 12px;
    height: 12px;
    background: #111;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(0.8); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.milestone-info {
    text-align: center;
    min-width: 100px;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 20px;
    transition: all 0.3s ease;
    opacity: 0.8;
}
.level-milestone:hover .milestone-info {
    transform: translate(-50%, 5px);
    opacity: 1;
}

.milestone-name { font-size: 0.9rem; font-weight: 600; color: #e8e8e8; }
.milestone-amount { font-size: 0.8rem; color: #aaa; }
.milestone-discount {
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    display: inline-block;
    margin-top: 4px;
}
.level-milestone.current .milestone-name { color: #fff; font-size: 1rem; }
.level-milestone.current .milestone-discount { background: #fff; color: #111; }

.progress-summary-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 3rem 1.5rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
}

.summary-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2; /* Можно подобрать оптимальное значение */
}
.summary-label { color: #aaa; font-size: 0.85rem; }
.summary-value { color: #e8e8e8; font-size: 1.2rem; font-weight: 600; }
.summary-item.pending { border-color: rgba(255, 193, 7, 0.4); }

/* ===================================================================
   СВЕТЛАЯ ТАБЛИЦА ЗАКАЗОВ
   =================================================================== */
.bigor-loyalty-history {
    margin-top: 4rem;
    background: none;
    border: none;
    padding: 0;
}

.bigor-loyalty-history-title {
    font-family: 'Genos', sans-serif;
    font-size: 1.8rem;
    margin: 0 0 2rem 0;
    color: #FFFFFF !important; /* СВЕТЛЫЙ ЦВЕТ */
    text-align: center;
}

.orders-table-container {
    border-radius: 12px;
    background: #000000;
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
}

.bigor-loyalty-orders {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.bigor-loyalty-orders th {
    text-align: left;
    padding: 1rem 1.25rem;
    color: #888; /* ТЕМНЫЙ ТЕКСТ */
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #e0e0e0;
}

.bigor-loyalty-orders td {
    padding: 1.25rem;
    color: #fff !important; /* ТЕМНЫЙ ТЕКСТ */
    vertical-align: middle;
    background: transparent;
    transition: background 0.3s ease;
}

.bigor-loyalty-orders tbody tr {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bigor-loyalty-orders tbody tr:hover {
    background: #0e0e0e; /* СВЕТЛЫЙ ХОВЕР */
    transform: scale(1.015);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    z-index: 5;
    position: relative;
}

.bigor-loyalty-orders tbody tr:hover td:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px;}
.bigor-loyalty-orders tbody tr:hover td:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px;}

.bigor-loyalty-orders td a {
    color: #fff !important; /* СТАНДАРТНЫЙ ЦВЕТ ССЫЛКИ */
    text-decoration: none;
    font-weight: 600;
}
.bigor-loyalty-orders td a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.bigor-loyalty-view-all-orders {
    text-align: center;
    margin-top: 2rem;
}

/* СВЕТЛАЯ КНОПКА */
.bigor-loyalty-view-all {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    background: #fff;
    color: #333 !important;
    border: 1px solid #ccc;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.bigor-loyalty-view-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    border-color: #bbb;
    color: #000;
}

/* Адаптивность */
@media (max-width: 768px) {
    .all-levels-track { min-width: 700px; }
    .bigor-loyalty-orders th { display: none; }
    .bigor-loyalty-orders tr {
        display: contents;
        margin-bottom: 1.5rem;
        border-radius: 12px;
        border: 1px solid #e0e0e0;
        padding: 1rem;
        background: #fff;
    }
    .bigor-loyalty-orders td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0.5rem;
        border-bottom: 1px solid #eee;
    }
    .bigor-loyalty-orders td:last-child { border-bottom: none; }
    .bigor-loyalty-orders td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #888;
    }
    .bigor-loyalty-orders td[data-label="Заказ"] a { font-size: 0.8rem; }
    .bigor-loyalty-orders tbody tr:hover { transform: none; box-shadow: none; background: #f0f0f0; }
}

@media (max-width: 480px) {
    .all-levels-track { min-width: 600px; }
}

/* Анимации загрузки */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.bigor-loyalty-program > * {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.bigor-loyalty-program > *:nth-child(2) { animation-delay: 0.15s; }
.bigor-loyalty-program > *:nth-child(3) { animation-delay: 0.3s; }