/* ==========================================================================
   CIPL CUSTOM STYLES - DOTCALLING (Refined Mobile Typography & Animations)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

/* Native App Feel: Smooth touch & prevent accidental text selection on buttons */
body.theme-light,
body.theme-light #page {
    background: linear-gradient(180deg, #ffeef2 0%, #f3ecff 45%, #eef2ff 100%) !important;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    -webkit-user-select: none;
}

/* =========================================================
   KEYFRAME ANIMATIONS
   ========================================================= */

/* 1. Card Staggered Slide-Up Entrance */
@keyframes ciplFadeUp {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 2. Online Status Radar Pulse */
@keyframes ciplPulseGreen {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* 3. Phone Icon Gentle Ringing Wiggle */
@keyframes ciplPhoneRing {
    0%, 65%, 100% { transform: rotate(0deg); }
    70% { transform: rotate(-14deg) scale(1.1); }
    75% { transform: rotate(14deg) scale(1.1); }
    80% { transform: rotate(-12deg) scale(1.1); }
    85% { transform: rotate(12deg) scale(1.1); }
    90% { transform: rotate(0deg) scale(1); }
}

/* 4. Button Light Shimmer Sweep */
@keyframes ciplShimmer {
    0% { left: -100%; }
    35%, 100% { left: 160%; }
}

/* =========================================================
   1. TOP HEADER BAR (Compact & Frosted Glass)
   ========================================================= */
.cipl-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px 14px;
    position: sticky;
    top: 0;
    z-index: 95;
    background: rgba(255, 238, 242, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.cipl-brand-logo {
    font-family: 'Pacifico', cursive, 'Inter', sans-serif !important;
    font-size: 22px;
    color: #1a1a1a !important;
    letter-spacing: 0.2px;
    line-height: 1;
}

.cipl-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cipl-wallet-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #4b6cb7 0%, #3b82f6 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 12.5px;
    padding: 4px 10px;
    border-radius: 50px;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.28);
    transition: transform 0.15s ease;
}

.cipl-wallet-btn:active {
    transform: scale(0.94);
}

.cipl-wallet-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    background: #ffffff;
    color: #3b82f6;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 900;
}

.cipl-user-avatar {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.cipl-user-avatar:active {
    transform: scale(0.9);
}

/* =========================================================
   2. RANDOM CALL PROMO BANNER
   ========================================================= */
.cipl-promo-banner {
    margin: 4px 14px 14px 14px;
    padding: 13px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff0f5 0%, #e4d7ff 55%, #d9c6ff 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(149, 117, 205, 0.14);
    position: relative;
    overflow: hidden;
    animation: ciplFadeUp 0.35s ease-out both;
}

.cipl-promo-text h3 {
    font-size: 13.5px;
    font-weight: 800;
    color: #252525 !important;
    margin-bottom: 1px;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.cipl-promo-text p {
    font-size: 13px;
    font-weight: 800;
    color: #3b66f5 !important;
    margin-bottom: 0 !important;
    line-height: 1.25;
}

.cipl-random-btn {
    background: linear-gradient(90deg, #8b5cf6 0%, #ec4899 55%, #ef4444 100%);
    color: #ffffff !important;
    font-size: 11.5px;
    font-weight: 700;
    padding: 8px 13px;
    border-radius: 50px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.32);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease;
}

.cipl-random-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    animation: ciplShimmer 3.5s infinite;
}

.cipl-random-btn:active {
    transform: scale(0.95);
}

/* =========================================================
   3. SECTION HEADING & HORIZONTAL CATEGORY PILLS
   ========================================================= */
.cipl-section-heading {
    font-size: 16px;
    font-weight: 800;
    color: #141414 !important;
    margin: 0 14px 9px 14px;
    letter-spacing: -0.3px;
}

.cipl-category-scroll {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    padding: 2px 14px 12px 14px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cipl-category-scroll::-webkit-scrollbar {
    display: none;
}

.cipl-cat-pill {
    padding: 4px 13px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 600;
    color: #2b2b2b !important;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #e17088;
    white-space: nowrap;
    transition: all 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
    line-height: 1.4;
}

.cipl-cat-pill:active {
    transform: scale(0.93);
}

.cipl-cat-pill.active {
    background: linear-gradient(90deg, #6366f1 0%, #ec4899 55%, #ef4444 100%);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 3px 8px rgba(236, 72, 153, 0.28);
    transform: translateY(-1px);
}

/* =========================================================
   4. EXPERT CALLING CARDS (Compact + Staggered Animation)
   ========================================================= */
.cipl-expert-list {
    padding: 0 14px 20px 14px;
}

.cipl-expert-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 11px 12px 10px 12px;
    margin-bottom: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.95);
    animation: ciplFadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* Staggered load delay for cards 1 to 6 */
.cipl-expert-card:nth-child(1) { animation-delay: 0.05s; }
.cipl-expert-card:nth-child(2) { animation-delay: 0.12s; }
.cipl-expert-card:nth-child(3) { animation-delay: 0.19s; }
.cipl-expert-card:nth-child(4) { animation-delay: 0.26s; }
.cipl-expert-card:nth-child(5) { animation-delay: 0.33s; }
.cipl-expert-card:nth-child(6) { animation-delay: 0.40s; }

.cipl-expert-card:active {
    transform: scale(0.985);
}

.cipl-expert-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

/* Left Column: Avatar + Online Badge + Rating */
.cipl-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 58px;
    flex-shrink: 0;
}

.cipl-avatar-box {
    position: relative;
    width: 52px;
    height: 52px;
}

.cipl-avatar-img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #f1f5f9;
}

.cipl-status-dot {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    background-color: #22c55e;
    border: 1.8px solid #ffffff;
    border-radius: 50%;
    animation: ciplPulseGreen 2s infinite;
}

.cipl-online-pill {
    margin-top: -7px;
    position: relative;
    z-index: 2;
    background: #ffffff;
    color: #16a34a;
    border: 1px solid #22c55e;
    font-size: 9px;
    font-weight: 700;
    padding: 0px 6px;
    border-radius: 20px;
    line-height: 1.35;
}

.cipl-rating {
    margin-top: 3px;
    font-size: 10px;
    font-weight: 700;
    color: #555555;
    display: flex;
    align-items: center;
    gap: 2.5px;
    line-height: 1.2;
}

.cipl-rating i {
    color: #facc15;
    font-size: 9.5px;
}

/* Middle Column: Name, Age, Location, Category, Price */
.cipl-info-col {
    flex-grow: 1;
    min-width: 0;
    padding-top: 1px;
}

.cipl-name-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.cipl-expert-name {
    font-size: 14.5px;
    font-weight: 800;
    color: #141414;
    line-height: 1.2;
}

.cipl-expert-age {
    font-size: 11.5px;
    font-weight: 600;
    color: #7a7a7a;
}

.cipl-expert-loc {
    font-size: 11.5px;
    font-weight: 500;
    color: #3f3f46;
    margin-top: 1px;
    line-height: 1.25;
}

.cipl-expert-tag {
    font-size: 11px;
    font-weight: 700;
    color: #e11d48;
    margin-top: 1px;
    line-height: 1.25;
}

.cipl-expert-rate {
    font-size: 12.5px;
    font-weight: 800;
    color: #18181b;
    margin-top: 2px;
    line-height: 1.25;
}

/* Right Column: Languages & Call Now Button */
.cipl-action-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    flex-shrink: 0;
    min-height: 62px;
}

.cipl-lang-text {
    font-size: 10.5px;
    font-weight: 600;
    color: #52525b;
    margin-bottom: 8px;
}

.cipl-call-btn {
    background: linear-gradient(90deg, #4f7cff 0%, #3b66f5 100%);
    color: #ffffff !important;
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 13px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 3px 9px rgba(59, 102, 245, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cipl-call-btn i {
    font-size: 11px;
    animation: ciplPhoneRing 3s infinite;
}

.cipl-call-btn:active {
    transform: scale(0.93);
    box-shadow: 0 1px 4px rgba(59, 102, 245, 0.2);
}

/* Bio Quote Line */
.cipl-expert-bio {
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
    font-size: 11px;
    color: #6b7280 !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* =========================================================
   5. BOTTOM NAVIGATION BAR
   ========================================================= */
.cipl-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(54px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 248, 250, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 98;
}

.cipl-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280 !important;
    font-size: 10px;
    font-weight: 600;
    gap: 1px;
    flex: 1;
    height: 100%;
    transition: transform 0.15s ease, color 0.15s ease;
}

.cipl-nav-item i {
    font-size: 16px;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cipl-nav-item:active i {
    transform: scale(0.85);
}

.cipl-nav-item.active {
    color: #3b66f5 !important;
    font-weight: 700;
}

.cipl-nav-item.active i {
    transform: translateY(-1px);
}

/* Ultra-Small Screen Responsiveness (< 350px) */
@media (max-width: 350px) {
    .cipl-promo-text h3 {
        font-size: 12.5px;
    }
    .cipl-random-btn {
        padding: 7px 10px;
        font-size: 11px;
    }
    .cipl-call-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}



/* =========================================================
   6. SIDEBAR (menu-main) — Profile Drawer
   ========================================================= */

/* Fix the AppKit drawer width & background */
#menu-main.menu-box-left {
    width: 290px !important; /* Forces exact width for mobile */
    max-width: 85vw !important; /* Prevents it being too wide on tablets */
    background: linear-gradient(180deg, #fcecef 0%, #f0f2ff 55%, #e6ebff 100%) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-right: none !important;
}

/* Fix AppKit's default hidden overflow causing missing profile */
#menu-main.menu-box-left .menu-content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cipl-side-profile {
    padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px)) 16px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
}

/* --- Top bar --- */
.cipl-side-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Pushes left and right apart */
    padding: calc(12px + env(safe-area-inset-top, 0px)) 0 12px 0;
    flex-shrink: 0;
}

.cipl-side-topbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cipl-side-back-btn {
    color: #141414 !important;
    font-size: 16px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.cipl-side-title {
    font-size: 15px;
    font-weight: 700;
    color: #141414;
    letter-spacing: -0.2px;
}

.cipl-side-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}


.cipl-side-wallet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #4b6cb7 0%, #3b82f6 100%);
    color: #fff !important;
    font-weight: 700;
    font-size: 12px;
    padding: 5px 5px 5px 12px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.cipl-side-wallet-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #fff;
    color: #3b82f6;
    border-radius: 50%;
    font-size: 9px;
}

.cipl-side-settings {
    color: #141414 !important;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
}

/* --- Profile card --- */
.cipl-side-profile-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px 14px 14px 14px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
    flex-shrink: 0;
}

.cipl-side-avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.cipl-side-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #eef2ff;
}

.cipl-side-name {
    font-size: 15px;
    font-weight: 700;
    color: #141414 !important;
    margin: 0 0 2px 0;
}

.cipl-side-since {
    font-size: 10.5px;
    font-weight: 500;
    color: #737373 !important;
    margin: 0 0 12px 0;
}

.cipl-side-profile-btns {
    display: flex;
    gap: 6px;
}

.cipl-side-btn-outline,
.cipl-side-btn-solid {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
}

.cipl-side-btn-outline {
    color: #1a1a1a !important;
    background: #ffffff;
    border: 1.5px solid #1a1a1a;
}

.cipl-side-btn-solid {
    color: #ffffff !important;
    background: linear-gradient(90deg, #4f7cff 0%, #3b66f5 100%);
    box-shadow: 0 3px 8px rgba(59, 102, 245, 0.25);
}

/* --- Menu list --- */
.cipl-side-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.cipl-side-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    min-height: 46px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.cipl-side-menu-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #3b66f5;
    flex-shrink: 0;
}

.cipl-side-menu-icon-hindi {
    font-weight: 900;
    font-size: 14px;
    color: #3b66f5;
}

.cipl-side-menu-icon-star {
    color: #f59e0b;
}

.cipl-side-menu-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #141414 !important;
    line-height: 1.2;
}

.cipl-side-menu-value {
    font-size: 11.5px;
    font-weight: 700;
    color: #3b66f5 !important;
}

.cipl-side-chevron {
    font-size: 10px;
    color: #b0b0b0;
    flex-shrink: 0;
}

/* --- Footer badge --- */
.cipl-side-footer {
    margin-top: auto;
    padding: 16px 0 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    color: #16a34a !important;
    flex-shrink: 0;
}

.cipl-side-footer i { font-size: 12px; }

/* Tablet responsiveness */
@media (min-width: 768px) {
    #menu-main.menu-box-left {
        width: 320px !important; /* Slightly wider on iPad */
    }
}

/* =========================================================
   7. TRANSACTIONS PAGE
   ========================================================= */
.cipl-topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: transform 0.15s ease;
}
.cipl-topbar-icon:active { transform: scale(0.9); }

.cipl-transaction-list {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto; /* Centers the list on tablets */
}

.cipl-txn-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.95);
    animation: ciplFadeUp 0.35s ease-out both;
}

.cipl-txn-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 16px 12px 16px;
}

.cipl-txn-info {
    flex: 1;
    min-width: 0;
}

.cipl-txn-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #3b66f5 !important; /* Blue text for amount */
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.cipl-txn-meta {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280 !important;
    margin: 0;
    line-height: 1.3;
    display: flex;
    align-items: center;
}
.cipl-txn-meta i {
    font-size: 12px;
    opacity: 0.7;
    margin-left: 4px;
}

.cipl-txn-status {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    margin-left: 10px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.cipl-txn-status.failed { color: #ef4444; }
.cipl-txn-status.success { color: #22c55e; }

.cipl-txn-bottom {
    background: #f8f9fc;
    padding: 8px 16px;
    display: flex;
    justify-content: center;
    border-top: 1px solid #f1f5f9;
}

.cipl-txn-help {
    font-size: 13px;
    font-weight: 600;
    color: #52525b !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cipl-txn-help i { font-size: 14px; }
.cipl-txn-help:active { opacity: 0.7; }

/* =========================================================
   8. LANGUAGE PAGE
   ========================================================= */
.cipl-lang-page {
    display: flex;
    flex-direction: column;
    padding: 16px 14px calc(20px + env(safe-area-inset-bottom, 0px)) 14px;
    min-height: calc(100vh - 80px);
}

.cipl-lang-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 col on small phones */
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

/* 2 Columns on slightly larger phones and tablets */
@media (min-width: 400px) {
    .cipl-lang-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 3 Columns on tablets/desktops for wider layout */
@media (min-width: 768px) {
    .cipl-lang-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

.cipl-lang-card {
    position: relative;
    background: rgba(255, 255, 255, 0.65);
    border: 1.5px solid #3b82f6;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* This pushes Name left, Radio center, Native right */
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    z-index: 1;
}

.cipl-lang-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Custom Radio Button (Center) */
.cipl-lang-radio {
    width: 18px;
    height: 18px;
    border: 1.5px solid #3b82f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: transparent;
    z-index: 2;
}

.cipl-lang-radio i {
    font-size: 10px;
    color: transparent; /* Hidden by default */
    transition: all 0.2s ease;
}

/* Text Formatting */
.cipl-lang-name {
    font-size: 14px;
    font-weight: 700;
    color: #3b82f6;
    z-index: 2;
    flex: 1; /* Takes up space on the left */
    text-align: left;
}

.cipl-lang-native {
    font-size: 13px;
    font-weight: 500;
    color: #60a5fa;
    z-index: 2;
    flex: 1; /* Takes up space on the right */
    text-align: right;
}

/* Watermark Background */
.cipl-lang-watermark {
    position: absolute;
    right: 10px;
    bottom: -15px;
    font-size: 65px;
    font-weight: 400;
    color: #bfdbfe;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
    line-height: 1;
}

/* ACTIVE STATE */
.cipl-lang-card.active {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.cipl-lang-card.active .cipl-lang-radio {
    background: #ffffff;
    border-color: #ffffff;
}

.cipl-lang-card.active .cipl-lang-radio i {
    color: #3b82f6; /* Blue dot inside white circle */
}

.cipl-lang-card.active .cipl-lang-name,
.cipl-lang-card.active .cipl-lang-native {
    color: #ffffff;
}

.cipl-lang-card.active .cipl-lang-watermark {
    color: #1d4ed8;
    opacity: 0.3;
}

/* SAVE BUTTON */
.cipl-lang-save-wrap {
    margin-top: auto;
    padding-top: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.cipl-lang-save-btn {
    width: 100%;
    background: #9ca3af;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    padding: 14px 0;
    cursor: pointer;
    transition: background 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cipl-lang-save-btn:active {
    background: #6b7280;
    transform: scale(0.98);
}





/* =========================================================
   CIPL WALLET & PAYMENT PAGES (Ultra-Native Connecto Match)
   ========================================================= */

/* Common Page Container */
.cipl-app-page {
    padding: 12px 14px calc(110px + env(safe-area-inset-bottom, 0px)) 14px;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Common White Card Base */
.cipl-white-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.025);
    border: 1px solid rgba(0, 0, 0, 0.03);
    animation: ciplFadeUp 0.35s ease-out both;
}

/* Header Adjustments */
.cipl-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px 16px;
    position: sticky;
    top: 0;
    z-index: 95;
    background: rgba(255, 238, 242, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.cipl-page-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #141414;
    letter-spacing: -0.2px;
    margin: 0;
}

.cipl-pill-link {
    font-size: 11.5px;
    font-weight: 600;
    color: #4f7cff !important;
    border: 1px solid rgba(79, 124, 255, 0.3);
    padding: 5px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 124, 255, 0.05);
    text-decoration: none;
}

/* =========================================================
   WALLET PAGE SPECIFICS
   ========================================================= */

.cipl-bal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cipl-bal-label { font-size: 13.5px; font-weight: 500; color: #3f3f46; }
.cipl-bal-amount { font-size: 19px; font-weight: 700; color: #3b66f5; letter-spacing: -0.5px; }

.cipl-section-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #141414;
    margin: 4px 4px -2px 4px;
}

/* Pack Grid & Cards */
.cipl-pack-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 10px;
    padding: 0 16px 16px 16px; 
}

.cipl-pack-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    /* Increased right padding to prevent text from overlapping the badge */
    padding: 10px 45px 10px 12px; 
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: background 0.15s, border 0.15s, transform 0.1s;
    cursor: pointer;
    animation: ciplFadeUp 0.35s ease-out both;
    overflow: hidden; /* Ensures nothing bleeds outside the rounded corners */
}

/* Stagger animations for grid */
.cipl-pack-card:nth-child(1) { animation-delay: 0.05s; }
.cipl-pack-card:nth-child(2) { animation-delay: 0.10s; }
.cipl-pack-card:nth-child(3) { animation-delay: 0.15s; }
.cipl-pack-card:nth-child(4) { animation-delay: 0.20s; }
.cipl-pack-card:nth-child(5) { animation-delay: 0.25s; }
.cipl-pack-card:nth-child(6) { animation-delay: 0.30s; }

.cipl-pack-card.active {
    border-color: #3b66f5;
    background: #f4f7ff;
}

.cipl-pack-card:active { transform: scale(0.97); }

.cipl-pack-amt { 
    font-size: 15px; 
    font-weight: 700; 
    color: #3b66f5; 
    line-height: 1;
    /* Ensure long amounts wrap if needed on very small screens */
    word-wrap: break-word; 
}

.cipl-pack-extra { 
    font-size: 10px; 
    font-weight: 600; 
    color: #16a34a; 
    margin-top: 4px;
    line-height: 1;
}

/* Floating Badges - Responsive Fix */
.cipl-pack-badge {
    position: absolute;
    /* Anchor to top-right corner natively */
    right: 0; 
    top: 0;
    /* Use a sleek corner-ribbon style that fits all screen widths naturally */
    border-radius: 0 9px 0 8px; 
    background: #ef4444;
    color: #ffffff;
    font-size: 8px;
    font-weight: 700;
    padding: 4px 8px;
    box-shadow: -1px 2px 4px rgba(239, 68, 68, 0.15);
    white-space: nowrap;
    line-height: 1;
    z-index: 2;
}

/* Ultra-Small Screen Responsiveness (< 350px) */
@media (max-width: 350px) {
    .cipl-pack-card {
        padding: 10px 8px; /* Reduce padding to fit content */
        min-height: 50px;
    }
    .cipl-pack-badge {
        font-size: 7px;
        padding: 3px 5px;
    }
}

/* =========================================================
   PAYMENT PAGE SPECIFICS
   ========================================================= */

.cipl-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cipl-summary-label { font-size: 13.5px; font-weight: 500; color: #4b5563; }
.cipl-summary-value { font-size: 13.5px; font-weight: 600; color: #141414; }

.cipl-dashed-line {
    border-bottom: 1.5px dotted #9ca3af;
    flex-grow: 1;
    margin: 0 10px;
    opacity: 0.5;
    position: relative;
    top: 4px;
}

.cipl-divider-line {
    border-top: 1px solid #f1f5f9;
    margin: 12px 0;
}

.cipl-total-label { font-size: 14.5px; font-weight: 700; color: #141414; }
.cipl-total-value { font-size: 17px; font-weight: 800; color: #3b66f5; }

/* Interactive Row Buttons */
.cipl-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.cipl-action-row:active { opacity: 0.7; }
.cipl-action-icon { color: #3b66f5; font-size: 14px; margin-right: 8px; }
.cipl-action-text { font-size: 14.5px; font-weight: 600; color: #141414; flex-grow: 1; }
.cipl-action-arrow { font-size: 12px; color: #9ca3af; }

/* Green Success Alert */
.cipl-success-alert {
    background: #f0fdf4;
    border: 1px solid #22c55e;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cipl-success-alert i { color: #22c55e; font-size: 16px; }
.cipl-success-alert span { font-size: 13px; font-weight: 600; color: #16a34a; }

/* UPI Section */
.cipl-upi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.cipl-upi-title { font-size: 14.5px; font-weight: 700; color: #141414; display: flex; align-items: center; gap: 8px; }
.cipl-upi-title img { height: 14px; }
.cipl-upi-subtitle { font-size: 11px; font-weight: 600; color: #16a34a; margin-top: 4px; display: block; }
.cipl-upi-fastest { font-size: 11.5px; font-weight: 600; color: #3b66f5; display: flex; align-items: center; gap: 4px; }

.cipl-upi-apps {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
}
.cipl-upi-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.cipl-upi-app:active { transform: scale(0.95); }
.cipl-upi-app-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1f5f9;
}
.cipl-upi-app-icon img { width: 24px; height: 24px; object-fit: contain; }
.cipl-upi-app span { font-size: 10.5px; font-weight: 500; color: #141414; }

/* =========================================================
   TRUST BADGES & STICKY BOTTOM BAR (Strict Bootstrap Override)
   ========================================================= */

.cipl-trust-row { 
    display: flex; justify-content: space-evenly; align-items: center; 
    padding: 8px 16px 0 16px; margin-top: auto;
}
.cipl-trust-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cipl-trust-item i { font-size: 16px; color: #52525b; }
.cipl-trust-item span { font-size: 9px; color: #52525b; font-weight: 500; }
.cipl-trust-div { width: 1px; height: 16px; background: #e2e8f0; }

.cipl-sticky-bottom {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #ffffff;
    padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)) 16px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    z-index: 100;
}

.cipl-bottom-msg { 
    font-size: 11.5px; font-weight: 600; color: #16a34a; 
    margin-bottom: 8px; display: block; min-height: 16px;
}

/* 100% Native Button - No Bootstrap Bloat */
.cipl-native-btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 600px;
    margin: 0 auto !important;
    height: 46px !important;
    background: #3b66f5 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    outline: none !important;
    box-shadow: 0 4px 10px rgba(59, 102, 245, 0.25) !important;
    text-decoration: none !important;
    transition: transform 0.1s ease !important;
}

.cipl-native-btn:active {
    transform: scale(0.97) !important;
}


/* =========================================================
   CIPL RECENTS & SETTINGS PAGES (Native App Proportions)
   ========================================================= */

/* Header Adjustments for Toggles & Icons */
.cipl-header-right { 
    display: flex; 
    align-items: center; 
    gap: 14px; 
}
.cipl-online-switch-wrap { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 13.5px; 
    font-weight: 600; 
    color: #3b66f5; 
}

/* Custom Native Toggle Switch (Connecto Style) */
.cipl-switch { 
    position: relative; 
    display: inline-block; 
    width: 38px; 
    height: 22px; 
}
.cipl-switch input { 
    opacity: 0; 
    width: 0; 
    height: 0; 
}
.cipl-slider { 
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; 
    background-color: #cbd5e1; 
    transition: .3s; 
    border-radius: 30px; 
}
.cipl-slider:before { 
    position: absolute; content: ""; 
    height: 18px; width: 18px; left: 2px; bottom: 2px; 
    background-color: white; transition: .3s; border-radius: 50%; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.cipl-switch input:checked + .cipl-slider { background-color: #3b66f5; }
.cipl-switch input:checked + .cipl-slider:before { transform: translateX(16px); }

.cipl-header-dot-menu { 
    font-size: 18px; 
    color: #141414; 
    padding: 2px 4px;
    cursor: pointer;
}
.cipl-header-dot-menu:active { opacity: 0.6; }


/* =========================================================
   RECENTS PAGE (Empty State)
   ========================================================= */
.cipl-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 150px); /* Centers in available space */
    text-align: center;
    animation: ciplFadeUp 0.4s ease-out both;
    padding: 0 20px;
}

.cipl-empty-icon-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #3f3f46; /* Dark gray circle */
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 45px;
    margin-bottom: 20px;
}

.cipl-empty-title {
    font-size: 19px;
    font-weight: 800;
    color: #141414;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

.cipl-empty-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: #71717a;
    margin-bottom: 24px;
}

.cipl-empty-btn {
    background: #3b66f5 !important;
    color: #ffffff !important;
    font-size: 14.5px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(59, 102, 245, 0.3);
    text-decoration: none !important;
    transition: transform 0.15s ease;
}

.cipl-empty-btn i { font-size: 16px; }
.cipl-empty-btn:active { transform: scale(0.95); }


/* =========================================================
   SETTINGS PAGE
   ========================================================= */
.cipl-settings-list {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 600px; /* Tablet constraint */
    margin: 0 auto;
}

.cipl-settings-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.025);
    text-decoration: none !important;
    transition: transform 0.1s ease, background 0.15s ease;
    animation: ciplFadeUp 0.35s ease-out both;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Staggered entrance for lists */
.cipl-settings-item:nth-child(1) { animation-delay: 0.05s; }
.cipl-settings-item:nth-child(2) { animation-delay: 0.10s; }
.cipl-settings-item:nth-child(3) { animation-delay: 0.15s; }
.cipl-settings-item:nth-child(4) { animation-delay: 0.20s; }
.cipl-settings-item:nth-child(5) { animation-delay: 0.25s; }

.cipl-settings-item:active {
    transform: scale(0.98);
    background: #f8fafc;
}

.cipl-settings-icon {
    font-size: 17px;
    color: #3b66f5;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.cipl-settings-label {
    flex: 1;
    font-size: 14.5px;
    font-weight: 600;
    color: #141414;
}

.cipl-settings-arrow {
    font-size: 13px;
    color: #9ca3af;
}

/* Red styling for dangerous actions (e.g. Delete Account) */
.cipl-settings-item.cipl-danger .cipl-settings-icon,
.cipl-settings-item.cipl-danger .cipl-settings-label {
    color: #ef4444;
}

.cipl-settings-footer {
    text-align: center;
    margin-top: 24px;
    padding-bottom: 20px;
    animation: ciplFadeUp 0.35s ease-out 0.35s both;
}

.cipl-settings-safe {
    font-size: 12.5px;
    font-weight: 600;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}
.cipl-settings-safe i { font-size: 14px; }

.cipl-settings-version {
    font-size: 11.5px;
    font-weight: 500;
    color: #141414;
}

/* =========================================================
   HEADER DROPDOWN MENU (3 Dots)
   ========================================================= */
/* =========================================================
   HEADER DROPDOWN MENU (3 Dots & Country Code)
   ========================================================= */
.cipl-dropdown-menu {
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    padding: 6px !important;
    min-width: 160px !important;
    margin-top: 12px !important;
    animation: ciplFadeUp 0.2s ease-out both;
    
    /* FIX: Force menu to right edge for 3-dots */
    right: 0 !important;
    left: auto !important;
    transform-origin: top right;
    
    /* FIX: Ensure the dropdown floats above all other elements (like buttons) */
    z-index: 40000 !important;
}

/* For the login screen country dropdown specifically, we need it to drop straight down, not hug the right edge */
.cipl-phone-group .cipl-dropdown-menu {
    right: auto !important;
    left: 0 !important;
    transform-origin: top left;
}
.cipl-dropdown-item {
    padding: 10px 14px !important;
    border-radius: 8px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #141414 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    transition: background 0.15s !important;
}

.cipl-dropdown-item:active,
.cipl-dropdown-item:hover,
.cipl-dropdown-item:focus {
    background-color: #f1f5f9 !important;
    color: #3b66f5 !important;
}

.cipl-dropdown-item i {
    font-size: 15px;
    color: #6b7280;
    transition: color 0.15s;
}

.cipl-dropdown-item:active i,
.cipl-dropdown-item:hover i {
    color: #3b66f5;
}


/* =========================================================
   CIPL RECENTS PAGE (Populated Call History)
   ========================================================= */

.cipl-recents-container {
    padding: 12px 14px calc(80px + env(safe-area-inset-bottom, 0px)) 14px;
    max-width: 600px; /* Centers neatly on tablets */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Call History Card */
.cipl-recent-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    animation: ciplFadeUp 0.35s ease-out both;
    transition: transform 0.15s ease, background 0.15s ease;
    text-decoration: none !important;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.cipl-recent-card:active {
    transform: scale(0.97);
    background: #f8fafc;
}

/* Staggered load animation */
.cipl-recent-card:nth-child(1) { animation-delay: 0.05s; }
.cipl-recent-card:nth-child(2) { animation-delay: 0.10s; }
.cipl-recent-card:nth-child(3) { animation-delay: 0.15s; }
.cipl-recent-card:nth-child(4) { animation-delay: 0.20s; }
.cipl-recent-card:nth-child(5) { animation-delay: 0.25s; }

.cipl-recent-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #f1f5f9;
    flex-shrink: 0;
}

.cipl-recent-info {
    flex: 1;
    min-width: 0; /* Prevents text overflow */
}

.cipl-recent-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #141414;
    margin: 0 0 2px 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cipl-recent-meta {
    font-size: 11.5px;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Call Direction Icons */
.cipl-call-icon {
    font-size: 11px;
}
/* Arrow angled down-left for Incoming */
.cipl-call-in { color: #22c55e; transform: rotate(45deg); } 
/* Arrow angled up-right for Outgoing */
.cipl-call-out { color: #3b82f6; transform: rotate(45deg); } 
/* Arrow angled down-left for Missed */
.cipl-call-missed { color: #ef4444; transform: rotate(45deg); }

/* Right side elements */
.cipl-recent-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.cipl-recent-time {
    font-size: 10.5px;
    font-weight: 600;
    color: #9ca3af;
}

/* Call Back Action Button */
.cipl-recent-action {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f0fdf4;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.15);
    transition: transform 0.15s ease, background 0.15s ease;
}

.cipl-recent-action:active {
    transform: scale(0.85);
    background: #dcfce7;
}







/* =========================================================
   CIPL EDIT PROFILE PAGE
   ========================================================= */

.cipl-edit-profile-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    max-width: 500px;
    margin: 0 auto;
    animation: ciplFadeUp 0.3s ease-out both;
}

/* Avatar Section */
.cipl-edit-avatar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.cipl-edit-avatar-img {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    background: #e0e7ff; /* Soft blue placeholder background */
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cipl-edit-avatar-change {
    font-size: 13.5px;
    font-weight: 600;
    color: #3b82f6 !important; /* Connecto blue */
    text-decoration: none;
    padding: 4px 8px;
    transition: opacity 0.15s;
    cursor: pointer;
}
.cipl-edit-avatar-change:active { opacity: 0.6; }


/* Form Fields */
.cipl-form-group {
    width: 100%;
    margin-bottom: 16px;
}

.cipl-form-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 6px;
    margin-left: 2px;
}

.cipl-form-input {
    width: 100%;
    height: 48px;
    background: #ffffff;
    border: 1.5px solid #ef4444; /* Red border from screenshot */
    border-radius: 10px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 500;
    color: #141414;
    outline: none;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cipl-form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}


/* Birthday Row */
.cipl-bday-row {
    display: flex;
    gap: 10px;
    width: 100%;
}
.cipl-bday-col { flex: 1; }
.cipl-bday-col:last-child { flex: 1.5; } /* Year field is wider */


/* Save Button */
.cipl-edit-save-btn {
    width: 200px; /* Pill shape */
    height: 46px;
    background: #a1a1aa; /* Gray inactive state from screenshot */
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-size: 14.5px;
    font-weight: 700;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: background 0.2s, transform 0.1s;
    cursor: pointer;
}
/* When form is filled out, button turns blue via JS */
.cipl-edit-save-btn.active {
    background: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.cipl-edit-save-btn.active:active { transform: scale(0.96); }


/* =========================================================
   CIPL AVATAR SELECTION MODAL
   ========================================================= */
.cipl-avatar-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, #ffeef2 0%, #f3ecff 45%, #eef2ff 100%);
    z-index: 1050; /* Above header */
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cipl-avatar-modal.show {
    transform: translateY(0);
}

/* Avatar Grid */
.cipl-avatar-grid-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px 20px;
}

.cipl-avatar-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 15px;
    max-width: 400px;
    margin: 0 auto;
}

/* 3 columns on tablets */
@media (min-width: 600px) {
    .cipl-avatar-grid { grid-template-columns: repeat(3, 1fr); max-width: 600px; }
}

/* Radio Button Architecture */
.cipl-avatar-label {
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    display: flex;
    justify-content: center;
}

.cipl-avatar-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cipl-avatar-item {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #a5b4fc; /* Purple/Blue circle bg */
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s, border 0.15s;
}

.cipl-avatar-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cipl-avatar-label:active .cipl-avatar-item { transform: scale(0.95); }

/* Selected State */
.cipl-avatar-radio:checked + .cipl-avatar-item {
    border-color: #3b82f6; /* Blue ring */
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.cipl-avatar-check {
    position: absolute;
    top: 5px; right: 5px;
    width: 22px; height: 22px;
    background: #3b82f6;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: 2px solid #ffffff;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
}

.cipl-avatar-radio:checked ~ .cipl-avatar-check {
    opacity: 1;
    transform: scale(1);
}

/* Bottom Button Container */
.cipl-modal-bottom {
    background: #ffffff;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)) 16px;
    border-top: 1px solid #f1f5f9;
}


/* =========================================================
   CIPL ONBOARDING (Login, Language, Gender)
   ========================================================= */

@keyframes ciplZoomIn {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.cipl-onboard-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(30px + env(safe-area-inset-bottom, 0px)) 20px;
    max-width: 500px; /* Tablet centering */
    margin: 0 auto;
}

/* --- LOGIN SCREEN --- */
/* --- LOGIN SCREEN --- */
.cipl-login-brand {
    text-align: center;
    font-family: 'Pacifico', cursive, sans-serif;
    font-size: 32px;
    background: linear-gradient(90deg, #4f7cff 0%, #ec4899 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 20px;
    padding: 10px 15px; 
    line-height: 1.5; 
    overflow: visible;
    animation: ciplFadeUp 0.4s ease-out;
}

.cipl-login-ill {
    width: 100%;
    max-width: 260px;
    margin: 0 auto 20px auto;
    display: block;
    animation: ciplZoomIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Native Typography Refinement */
.cipl-login-title {
    font-size: 17px;
    font-weight: 700;
    color: #141414;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: -0.2px;
    animation: ciplFadeUp 0.4s ease-out 0.1s both;
}

/* Phone Input Group */
.cipl-phone-group {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    padding: 4px 16px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
    animation: ciplFadeUp 0.4s ease-out 0.2s both;
    
    /* FIX: Elevate this parent container above the button */
    position: relative;
    z-index: 50; 
}
.cipl-phone-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

.cipl-country-code {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 14px;
    border-right: 1.5px solid #e2e8f0;
    margin-right: 14px;
    cursor: pointer;
}

/* Specific Dropdown override for the country selector */
.cipl-phone-group .cipl-dropdown-menu {
    right: auto !important;
    left: 0 !important;
    top: 100% !important;
    margin-top: 8px !important;
    transform-origin: top left;
}

.cipl-phone-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    height: 44px;
    width: 100%;
}
.cipl-phone-input::placeholder { color: #94a3b8; font-weight: 500; }

.cipl-login-terms {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    text-align: center;
    margin-top: auto;
    line-height: 1.5;
    animation: ciplFadeUp 0.4s ease-out 0.3s both;
}
.cipl-login-terms a { color: #3b82f6; text-decoration: none; font-weight: 600; }

/* Dynamic Button */
.cipl-auth-btn {
    width: 100%;
    height: 52px;
    background: #cbd5e1;
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    font-size: 15.5px;
    font-weight: 700;
    transition: all 0.2s ease;
    animation: ciplFadeUp 0.4s ease-out 0.25s both;
    
    /* FIX: Keep button beneath the dropdown */
    position: relative;
    z-index: 10;
}
.cipl-auth-btn.active {
    background: linear-gradient(90deg, #4f7cff 0%, #3b66f5 100%);
    box-shadow: 0 4px 15px rgba(59, 102, 245, 0.3);
    cursor: pointer;
}
.cipl-auth-btn.active:active { transform: scale(0.96); }


/* --- GENDER SCREEN --- */
.cipl-gender-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    max-width: 300px;
    margin: 30px auto;
}
.cipl-gender-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
    animation: ciplFadeUp 0.4s ease-out both;
}
.cipl-gender-card:nth-child(2) { animation-delay: 0.1s; }

.cipl-gender-card:active { transform: scale(0.96); }

.cipl-gender-card.active {
    border-color: #3b82f6;
    background: #f8fafc;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}
.cipl-gender-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 16px auto;
    object-fit: cover;
    background: #e0e7ff;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}
.cipl-gender-card.active .cipl-gender-avatar { transform: scale(1.05); border-color: #dbeafe; }
.cipl-gender-card.female .cipl-gender-avatar { background: #fce7f3; }
.cipl-gender-card.female.active .cipl-gender-avatar { border-color: #fce7f3; }

.cipl-gender-name { font-size: 18px; font-weight: 800; color: #1e293b; }
.cipl-gender-note { font-size: 11.5px; font-weight: 600; color: #64748b; margin-top: 4px; }

.cipl-gender-warning {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-top: auto;
    margin-bottom: 16px;
    animation: ciplFadeUp 0.4s ease-out 0.2s both;
}

/* Radio button hidden logic */
.cipl-hidden-radio { position: absolute; opacity: 0; pointer-events: none; }




/* =========================================================
   CIPL CONTACT US PAGE (Native Support Screen)
   ========================================================= */

.cipl-contact-header {
    text-align: center;
    margin-bottom: 24px;
    animation: ciplFadeUp 0.4s ease-out both;
}
.cipl-contact-icon-wrap {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px auto;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}
.cipl-contact-title {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.cipl-contact-subtitle {
    font-size: 13.5px;
    font-weight: 500;
    color: #64748b;
    padding: 0 20px;
    line-height: 1.4;
}

/* Contact Methods Grid */
.cipl-contact-methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
/* 2 columns on tablets */
@media (min-width: 480px) {
    .cipl-contact-methods { grid-template-columns: 1fr 1fr; }
}

.cipl-contact-method-card {
    background: #ffffff;
    border: 1.5px solid #f1f5f9;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    animation: ciplFadeUp 0.4s ease-out both;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.cipl-contact-method-card:nth-child(1) { animation-delay: 0.1s; }
.cipl-contact-method-card:nth-child(2) { animation-delay: 0.15s; }

.cipl-contact-method-card:active {
    transform: scale(0.96);
    background: #f8fafc;
    border-color: #e2e8f0;
}

.cipl-contact-method-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
    flex-shrink: 0;
}
.cipl-icon-email { background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%); box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25); }
.cipl-icon-chat { background: linear-gradient(135deg, #10b981 0%, #059669 100%); box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25); }

.cipl-contact-method-info { flex: 1; min-width: 0; }
.cipl-contact-method-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 2px 0;
}
.cipl-contact-method-desc {
    font-size: 11.5px;
    font-weight: 500;
    color: #64748b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Contact Form Card */
.cipl-contact-form-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    animation: ciplFadeUp 0.4s ease-out 0.2s both;
}

.cipl-form-heading {
    font-size: 15.5px;
    font-weight: 800;
    color: #141414;
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

/* Form Input Groups */
.cipl-input-group {
    display: flex;
    align-items: flex-start;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 0 16px;
    margin-bottom: 14px;
    transition: all 0.2s ease;
}
.cipl-input-group:focus-within {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}
.cipl-input-group i {
    font-size: 15px;
    color: #94a3b8;
    margin-top: 15px;
    margin-right: 12px;
}
.cipl-input-field {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14.5px;
    font-weight: 500;
    color: #0f172a;
    padding: 14px 0;
    width: 100%;
}
.cipl-input-field::placeholder { color: #94a3b8; font-weight: 500; }
textarea.cipl-input-field {
    resize: none;
    min-height: 100px;
    line-height: 1.5;
}

/* Submit Button */
.cipl-contact-submit {
    width: 100%;
    height: 50px;
    background: linear-gradient(90deg, #4f7cff 0%, #3b66f5 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(59, 102, 245, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease;
}
.cipl-contact-submit:active { transform: scale(0.97); }

/* Company Footer */
.cipl-contact-company {
    text-align: center;
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1.5px dashed #e2e8f0;
    animation: ciplFadeUp 0.4s ease-out 0.3s both;
}
.cipl-contact-company-text {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.6;
}
.cipl-contact-company-text strong {
    color: #475569;
    font-weight: 700;
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
}



























/* =========================================================
   CIPL CALL SCREENS (Connecting & Active/Incoming)
   ========================================================= */

/* Common Full-Screen Overlay */
.cipl-call-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: none; /* Hidden by default, toggled via JS */
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: calc(40px + env(safe-area-inset-top, 0px)) 20px calc(40px + env(safe-area-inset-bottom, 0px)) 20px;
    animation: ciplFadeIn 0.3s ease-out both;
}
.cipl-call-overlay.active { display: flex; }

@keyframes ciplFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- 1. Connecting Screen (Deep Blue) --- */
.cipl-connecting-screen {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.cipl-call-brand {
    font-family: 'Pacifico', cursive, sans-serif;
    font-size: 32px;
    background: linear-gradient(90deg, #8b5cf6 0%, #ec4899 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.cipl-call-status-text {
    font-size: 15px;
    font-weight: 600;
    color: #22c55e;
}

/* Vertical Avatar Connection Layout */
.cipl-connection-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    justify-content: center;
}

.cipl-call-avatar-wrap {
    text-align: center;
}
.cipl-call-avatar {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}
/* Pulse animation for the person you are calling */
.cipl-call-avatar.pulse {
    animation: ciplCallPulse 1.5s infinite;
}
@keyframes ciplCallPulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
.cipl-call-name {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-top: 10px;
}

/* Pulsing animated chevrons */
.cipl-connection-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: -4px;
    color: #3b82f6;
    font-size: 24px;
    opacity: 0.5;
}
.cipl-connection-arrows i {
    animation: ciplArrowPulse 1.5s infinite;
}
.cipl-connection-arrows i:nth-child(1) { animation-delay: 0s; }
.cipl-connection-arrows i:nth-child(2) { animation-delay: 0.2s; }
.cipl-connection-arrows i:nth-child(3) { animation-delay: 0.4s; }
@keyframes ciplArrowPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.cipl-call-footer-note {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}


/* --- 2. Active / Incoming Call Screen (Dark Theme) --- */
.cipl-active-call-screen {
    background: #18181b; /* Near black */
    justify-content: flex-start;
    padding-top: calc(60px + env(safe-area-inset-top, 0px));
}

.cipl-active-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 2px solid rgba(255,255,255,0.1);
}
.cipl-active-name {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}
.cipl-active-status {
    font-size: 14px;
    font-weight: 500;
    color: #a1a1aa;
}
.cipl-active-timer {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-top: 6px;
}

/* Call Control Grid */
.cipl-call-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 20px;
    margin-top: auto;
    margin-bottom: 40px;
    width: 100%;
    max-width: 300px;
}

.cipl-control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
}
.cipl-control-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.2s, transform 0.1s;
}
.cipl-control-btn:active .cipl-control-icon {
    transform: scale(0.9);
    background: rgba(255,255,255,0.2);
}
.cipl-control-btn.active .cipl-control-icon {
    background: #ffffff;
    color: #18181b;
}
.cipl-control-label {
    color: #a1a1aa;
    font-size: 11px;
    font-weight: 500;
}

/* Big Red End Call Button */
.cipl-end-call-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 30px auto;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    cursor: pointer;
    border: none;
    transition: transform 0.1s;
}
.cipl-end-call-btn:active { transform: scale(0.9); }



/* Common Full-Screen Overlay */
.cipl-call-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: none; /* Hidden by default, toggled via JS */
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: calc(40px + env(safe-area-inset-top, 0px)) 20px calc(40px + env(safe-area-inset-bottom, 0px)) 20px;
    
    /* Native Slide-Up Animation */
    animation: ciplCallSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.cipl-call-overlay.active { display: flex; }

@keyframes ciplCallSlideUp { 
    0% { transform: translateY(100%); opacity: 0; } 
    100% { transform: translateY(0); opacity: 1; } 
}

/* Incoming Call Accept/Reject Buttons */
.cipl-incoming-actions {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 40px;
    width: 100%;
}

.cipl-decline-btn, .cipl-accept-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.15s;
}
.cipl-decline-btn { background: #ef4444; }
.cipl-accept-btn { 
    background: #22c55e; 
    animation: ciplPulseGreen 2s infinite; /* Uses the existing green pulse */
}

.cipl-decline-btn:active, .cipl-accept-btn:active {
    transform: scale(0.9);
}

.cipl-action-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.cipl-action-label {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}