/* KOCI Global Styles — Centralized UI & Performance Optimizations */

:root {
    --koci-nav-bg: rgba(18, 28, 36, 0.78);
    --koci-nav-border: rgba(255, 255, 255, 0.12);
    --koci-accent: #ff3b30;
    --koci-glass-bg: rgba(255, 255, 255, 0.08);
    --koci-glass-border: rgba(255, 255, 255, 0.1);
}

/* Floating Bottom Navbar (shared across all toolbar-* components) */
.floating-navbar {
    position: fixed !important;
    bottom: max(14px, calc(env(safe-area-inset-bottom, 0px) - 16px)) !important;
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    height: 66px;
    border-radius: 50px;
    background: var(--koci-nav-bg) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--koci-nav-border);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    z-index: 9999;
    transform: translateZ(0);
    will-change: transform;
}

.floating-navbar .toolbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    border-radius: 50px;
    overflow: hidden;
}

.floating-navbar .link {
    display: flex;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.68);
    transition: color 0.2s ease, transform 0.2s ease;
}

.floating-navbar .tab-link-active {
    color: var(--koci-accent) !important;
    position: relative;
}

.floating-navbar .tab-link-active::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 68px;
    height: 54px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.12);
    z-index: -1;
}

.floating-navbar .tab-link-active i {
    transform: translateY(-2px);
}

.floating-navbar i {
    font-size: 24px;
    transition: transform 0.2s ease;
}

.floating-navbar .tabbar-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
}

/* Lightweight Glass Card Utility */
.koci-glass-card {
    background: var(--koci-glass-bg) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--koci-glass-border);
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Smooth scrolling & layout stability */
.page-content {
    -webkit-overflow-scrolling: touch;
}

/* Modern Dark-Glass Popups (iOS safe-area aware) */
.koci-popup .page,
.koci-popup .page-content {
    background: #001119 !important;
    color: #ffffff;
}

.koci-popup .koci-popup-content {
    padding: max(24px, calc(env(safe-area-inset-top, 0px) + 18px)) 18px max(24px, calc(env(safe-area-inset-bottom, 0px) + 18px)) !important;
    min-height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.koci-popup-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.koci-popup-topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.koci-popup-close-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.koci-popup-hero {
    text-align: center;
    margin-bottom: 20px;
}

.koci-popup-icon-badge {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    border-radius: 18px;
    background: rgba(255, 59, 48, 0.14);
    border: 1px solid rgba(255, 59, 48, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff453a;
    font-size: 26px;
}

.koci-popup-hero h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.koci-popup-hero p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
}

.koci-form-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 18px 16px;
}

.koci-input-group {
    margin-bottom: 14px;
    text-align: left;
}

.koci-input-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.koci-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.koci-input {
    width: 100%;
    height: 46px !important;
    padding: 0 44px 0 14px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    color: #ffffff !important;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.koci-input:focus {
    border-color: #ff3b30 !important;
    background: rgba(255, 255, 255, 0.09) !important;
    outline: none;
}

.koci-eye-btn {
    position: absolute;
    right: 6px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.koci-eye-btn i {
    font-size: 18px;
}

.koci-btn-primary {
    width: 100%;
    height: 46px !important;
    line-height: 46px !important;
    border-radius: 12px !important;
    border: none !important;
    background: linear-gradient(135deg, #ff3b30 0%, #d9261c 100%) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-align: center;
    box-shadow: 0 6px 18px rgba(255, 59, 48, 0.3);
    cursor: pointer;
    margin-top: 4px;
}

.koci-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 12px;
}

