/*
 * ===================================================================
 * RankUP Customizations - Единый файл стилей (ФИНАЛЬНЫЙ ЧИСТЫЙ UI)
 * ===================================================================
 */

/* ------------------------------------------------------------------
 * 1. ОСНОВНЫЕ СЕТКА И КАРТОЧКИ (BASE)
 * ------------------------------------------------------------------ */
.rankup-cards {
    display: grid;
    grid-template-columns: repeat(var(--rankup-columns, 2), 1fr);
    gap: 16px;
    margin-top: 20px;
}
@media(max-width:768px) {
    .rankup-cards {
        grid-template-columns: 1fr;
    }
}
.rankup-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px; 
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s ease;
}
.rankup-card:hover {
    border-color: #a1a1aa;
}
.rankup-card-img-wrap {
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 3px; 
    margin-bottom: 12px;
    border: 1px solid #f3f4f6;
}
.rankup-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}
.rankup-card:hover .rankup-card-img {
    opacity: 0.95;
}
.rankup-card h3 {
    font-size: 17px; 
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.3;
}
.rankup-card h3 a {
    text-decoration: none;
    color: #1f2937;
    transition: color 0.2s ease;
}
.rankup-card h3 a:hover {
    color: #007cba;
}


/* ------------------------------------------------------------------
 * 2. КНОПКИ (Telegram Акценты)
 * ------------------------------------------------------------------ */
.rankup-card-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px; 
}
.rankup-card-actions .button, .rankup-logout-action .button {
    min-width: 110px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px; 
    transition: background 0.2s ease;
    border: none;
    line-height: 1.2;
}
/* Кнопка "Купить" */
.rankup-purchase-btn {
    background: #3b82f6; 
    color: #fff !important;
}
.rankup-purchase-btn:hover:not(:disabled) {
    background: #2563eb; 
}
/* Кнопка "Telegram" (ENABLED) */
.button-tg {
    background: #0088cc !important; 
    color: #fff !important;
}
.button-tg:hover:not(:disabled) {
    background: #0077b3; 
}
/* Кнопка "Telegram" (DISABLED) */
.button-disabled {
    background: #f4f4f5 !important;
    color: #a1a1aa !important;
    cursor: not-allowed !important;
}

/* Дополнительный класс для кнопки "Выход" */
.rankup-logout-action .button-secondary {
    background: #f8f8f8;
    color: #4b5563 !important;
    border: 1px solid #d1d5db;
}
.rankup-logout-action .button-secondary:hover {
    background: #f3f4f6;
    border-color: #a1a1aa;
}

/* ------------------------------------------------------------------
 * 3. СТАТУСНЫЕ И ИНФОБЛОКИ (Акценты)
 * ------------------------------------------------------------------ */
.rankup-thankyou-box {
    border: 1px solid #eee;
    border-radius: 4px; 
    padding: 15px 20px;
    margin-bottom: 20px;
    border-left-width: 4px;
}
.rankup-thankyou-box h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    display: flex;
    align-items: center;
}
.status-pending {
    border-left-color: #f59e0b; 
    background: #fffdf7;
}
.status-pending h3 {
    color: #f59e0b;
}
.status-completed {
    border-left-color: #10b981; 
    background: #f0fdfa;
}
.status-completed h3 {
    color: #10b981;
}
.rankup-thankyou-status h3::before {
    font-size: 22px; 
    margin-right: 10px;
}
.rankup-thankyou-status.status-pending h3::before {
    content: '⏳';
}
.rankup-thankyou-status.status-completed h3::before {
    content: '✅';
}
.rankup-card .rankup-thankyou-box.card-infobox {
    padding: 8px 10px; 
    margin: 0; 
}
.rankup-card .rankup-thankyou-box.card-infobox h3 {
    font-size: 14px; 
}
.rankup-card .rankup-thankyou-box.card-infobox h3::before {
    font-size: 16px; 
    margin-right: 6px;
}


/* ------------------------------------------------------------------
 * 4. КОНТЕКСТ: СТРАНИЦА "СПАСИБО" (thankyou.php)
 * ------------------------------------------------------------------ */
.rankup-thankyou-page {
    max-width: 800px;
    margin: 0 auto;
}
.rankup-thankyou-title {
    font-size: 24px;
    margin-bottom: 15px;
}
.rankup-order-overview {
    border: 1px solid #e5e7eb;
    border-radius: 4px; 
    padding: 12px;
    margin-bottom: 20px;
    list-style: none;
    gap: 8px;
}
.rankup-order-overview .overview-item {
    border-left: 3px solid #d4d4d8;
    background: #f8f8f8;
    border-radius: 2px; 
    padding: 8px 10px;
}
.rankup-thankyou-columns {
    display: grid;
    grid-template-columns: 1.2fr 1fr; 
    gap: 20px;
    margin-top: 20px;
}
.rankup-thankyou-subtitle {
    font-size: 18px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}
.rankup-thankyou-column address {
    font-style: normal;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 4px; 
}
@media (max-width: 768px) {
    .rankup-thankyou-columns {
        grid-template-columns: 1fr;
    }
}


/* ------------------------------------------------------------------
 * 5. КОНТЕКСТ: КАСТОМНЫЙ ДАШБОРД ([rankup_custom_dashboard])
 * ------------------------------------------------------------------ */
.rankup-custom-dashboard .rankup-dashboard-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}
.rankup-custom-dashboard .rankup-dashboard-info {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 15px;
}
.rankup-logout-action {
    /* Margin добавлен в HTML-коде для удобства */
}
.rankup-dashboard-content {
    margin-top: 20px;
}
.rankup-dashboard-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

/* ------------------------------------------------------------------
 * 6. КОНТЕКСТ: СТРАНИЦА ТОВАРА ([rankup_product_card])
 * ------------------------------------------------------------------ */
.rankup-purchase-card .rankup-purchase-info {
    margin: 10px 0; 
    padding: 10px; 
    background: #f8fafc; 
    border-radius: 4px; 
    border-left: 4px solid #3b82f6;
}
.rankup-card .rankup-card-welcome {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.rankup-card .rankup-card-welcome h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}
.rankup-card .rankup-card-welcome p {
    font-size: 14px;
    color: #555;
    margin: 0;
}

/* Добавьте это в ваш существующий style.css */

.rankup-purchase-info.expired-info {
    border-left: 4px solid #ef4444; /* Красный акцент */
    background: #fef2f2;
    padding: 10px;
}
.rankup-purchase-info.expired-info p {
    color: #b91c1c; /* Темно-красный текст */
    font-weight: 500;
}