/* ==========================================================
   Premium Pill Pagination — Option A (Global)
   Applied across: All tabs — Pariharasthalams, God tabs,
   Temple Listings, Liked Temples
   
   Uses high-specificity selectors to override Bootstrap 5
   ========================================================== */

/* ── Container ──────────────────────────────────────────── */
ul.premium-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    list-style: none !important;
    padding: 30px 0 10px !important;
    margin: 0 !important;
    flex-wrap: wrap !important;
}

/* ── Page Info Text ("Page 1 of 9") ─────────────────────── */
.pagination-info {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 8px;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}
.pagination-info strong {
    color: #ff6b00;
    font-weight: 700;
}

/* ── Base Button (all pagination items) ─────────────────── */
ul.premium-pagination li.page-item .page-link,
ul.premium-pagination .page-item > .page-link,
ul.premium-pagination li > a,
ul.premium-pagination li > strong {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 16px !important;
    border-radius: 50px !important; /* pill shape */
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    border: 2px solid #e8e8e8 !important;
    color: #555 !important;
    background: #f5f5f5 !important;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    cursor: pointer !important;
    user-select: none;
    line-height: 1 !important;
    margin: 0 !important;
}

/* ── Hover State ────────────────────────────────────────── */
ul.premium-pagination li.page-item .page-link:hover,
ul.premium-pagination .page-item > .page-link:hover,
ul.premium-pagination li > a:hover {
    background: linear-gradient(45deg, #ff6b00, #ff9100) !important;
    color: #fff !important;
    border-color: #ff6b00 !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.35) !important;
}

/* ── Active Page ────────────────────────────────────────── */
ul.premium-pagination li.page-item.active .page-link,
ul.premium-pagination li.active > a,
ul.premium-pagination li.active > strong {
    background: linear-gradient(45deg, #ff6b00, #ff9100) !important;
    color: #fff !important;
    border-color: #ff6b00 !important;
    box-shadow: 0 6px 22px rgba(255, 107, 0, 0.45) !important;
    transform: translateY(-2px) !important;
    pointer-events: none;
}

/* ── Disabled State (prev/next at boundaries) ───────────── */
ul.premium-pagination li.page-item.disabled .page-link,
ul.premium-pagination li.disabled > a {
    background: #f0f0f0 !important;
    color: #ccc !important;
    border-color: #e8e8e8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
    pointer-events: none;
}

/* ── Prev / Next — Orange Outlined Circle Buttons ───────── */
ul.premium-pagination li.page-item:first-child .page-link,
ul.premium-pagination li.page-item:last-child .page-link,
ul.premium-pagination li:first-child > a,
ul.premium-pagination li:last-child > a {
    background: #fff !important;
    color: #ff6b00 !important;
    border: 2px solid #ff6b00 !important;
    min-width: 44px !important;
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: 50% !important; /* circle for arrows */
    font-size: 1rem !important;
    font-weight: 700 !important;
}
ul.premium-pagination li.page-item:first-child .page-link:hover,
ul.premium-pagination li.page-item:last-child .page-link:hover,
ul.premium-pagination li:first-child > a:hover,
ul.premium-pagination li:last-child > a:hover {
    background: linear-gradient(45deg, #ff6b00, #ff9100) !important;
    color: #fff !important;
    border-color: #ff6b00 !important;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4) !important;
}

/* ── Disabled Prev / Next ───────────────────────────────── */
ul.premium-pagination li.page-item:first-child.disabled .page-link,
ul.premium-pagination li.page-item:last-child.disabled .page-link,
ul.premium-pagination li:first-child.disabled > a,
ul.premium-pagination li:last-child.disabled > a {
    background: #f8f8f8 !important;
    color: #ddd !important;
    border-color: #e0e0e0 !important;
    box-shadow: none !important;
}

/* ── Ellipsis ───────────────────────────────────────────── */
ul.premium-pagination li.page-item.ellipsis .page-link,
ul.premium-pagination li.ellipsis > a {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #999 !important;
    font-size: 1.1rem !important;
    letter-spacing: 2px;
    cursor: default;
    pointer-events: none;
    min-width: 30px !important;
    padding: 0 6px !important;
}

/* ── Remove Bootstrap's negative margin on non-first items ── */
ul.premium-pagination .page-item:not(:first-child) .page-link,
ul.premium-pagination li:not(:first-child) > a {
    margin-left: 0 !important;
}

/* ── Remove Bootstrap border-radius overrides ───────────── */
ul.premium-pagination .page-item:first-child .page-link,
ul.premium-pagination .page-item:last-child .page-link {
    border-top-left-radius: 50% !important;
    border-bottom-left-radius: 50% !important;
    border-top-right-radius: 50% !important;
    border-bottom-right-radius: 50% !important;
}

/* ── Paginate Item Transition (client-side pages) ───────── */
.paginate-item {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 576px) {
    ul.premium-pagination {
        gap: 6px !important;
        padding: 20px 0 8px !important;
    }
    ul.premium-pagination li.page-item .page-link,
    ul.premium-pagination .page-item > .page-link,
    ul.premium-pagination li > a,
    ul.premium-pagination li > strong {
        min-width: 36px !important;
        height: 36px !important;
        padding: 0 12px !important;
        font-size: 0.8rem !important;
    }
    ul.premium-pagination li.page-item:first-child .page-link,
    ul.premium-pagination li.page-item:last-child .page-link,
    ul.premium-pagination li:first-child > a,
    ul.premium-pagination li:last-child > a {
        min-width: 36px !important;
        width: 36px !important;
        height: 36px !important;
    }
}
