/*
 * PLANS.CSS — Стили для карточек тарифов
 * Используется в /payment, /payment/plans и на лендинге
 * ======================================================
 */

/* --- PLAN CARD --- */
.plan-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    position: relative;
}

.plan-card:hover {
    /*border-color: #111827;*/
    /*transform: translateY(-4px);*/
    /*box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);*/
}

@media (min-width: 768px) {
    .plan-card {
        padding: 2rem;
    }
}

/* Plan title */
.plan-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #111827;
}

@media (min-width: 768px) {
    .plan-card h3 {
        font-size: 1.5rem;
    }
}

/* Plan description */
.plan-card > p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* --- FEATURES LIST --- */
.bold-items {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.bold-items li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #374151;
}

.bold-items li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 600;
}

/* --- PRICE --- */
.plan-card .price {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111827;
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px dashed #e5e7eb;
}

/* --- BUTTONS --- */
.plan-card .btn-primary {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    background: red;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-card .btn-primary:hover {
    background: #374151;
    transform: translateY(-1px);
}

.btn-current-plan {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
}

/* --- CURRENT PLAN STATE --- */
.plan-card.current-plan {
    border: 2px solid #111827;
    background: #f9fafb;
}

.plan-card.current-plan::after {
    content: "✓ Current";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #111827;
    color: #fff;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* --- SKELETON LOADING --- */
.plan-card.skeleton {
    pointer-events: none;
}

.skeleton-title,
.skeleton-text,
.skeleton-item,
.skeleton-price {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 12px;
}

.skeleton-text {
    height: 16px;
    width: 90%;
    margin-bottom: 16px;
}

.skeleton-list {
    margin-bottom: 16px;
    flex-grow: 1;
}

.skeleton-item {
    height: 14px;
    width: 80%;
    margin-bottom: 8px;
}

.skeleton-item:nth-child(2) {
    width: 70%;
}

.skeleton-item:nth-child(3) {
    width: 85%;
}

.skeleton-price {
    height: 28px;
    width: 40%;
    margin-top: auto;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- MOBILE SLIDER OVERRIDES (< 768px) --- */
@media (max-width: 767px) {
    .plans-grid:not(.no-slider) {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;

        /* --- MAGIC FIX: Вырываемся из контейнера --- */
        margin-left: -1.5rem;       /* Компенсируем левый паддинг контейнера */
        margin-right: -1.5rem;      /* Компенсируем правый паддинг контейнера */
        width: calc(100% + 3rem);   /* Растягиваем ширину (100% + 1.5rem + 1.5rem) */

        /* Добавляем внутренний отступ, чтобы первая карточка
           визуально начиналась там же, где и остальной контент */
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-bottom: 2rem; /* Чуть больше места снизу для теней и скролла */

        /* Скрываем скроллбар */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .plans-grid:not(.no-slider)::-webkit-scrollbar {
        display: none;
    }

    /* Карточка */
    .plans-grid:not(.no-slider) .plan-card {
        min-width: 85%;
        scroll-snap-align: center;
        margin-right: 0;
    }

    /* Эти псевдо-элементы больше не нужны для центрирования,
       так как мы используем padding-left у родителя,
       но можно оставить пустой контент для надежности */
    .plans-grid:not(.no-slider)::before,
    .plans-grid:not(.no-slider)::after {
        content: none;
    }
}

/* --- PAGINATION DOTS --- */
.plans-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* Скрываем точки на десктопе */
@media (min-width: 768px) {
    .plans-pagination {
        display: none;
    }
}

.pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #e5e7eb; /* Серый (неактивный) */
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-dot.active {
    background-color: #111827; /* Черный (активный) */
    transform: scale(1.25);
}