/*
 * Copyright (c) 2026 PayNnet. All rights reserved.
 * Unauthorized copying, modification, or distribution of this file is strictly prohibited.
 * This software is proprietary and confidential.
 */

/* Header - Premium Redesign */
.paynnet-header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: transparent; /* Initial: Transparent */
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 1000;
    z-index: 1000;
    padding: 25px 0; /* Increased from 20px per user request */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.paynnet-header.scrolled {
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.paynnet-header .container { 
    display: flex; justify-content: space-between; align-items: center; position: relative; 
}

/* Logo Swapping Logic */
.paynnet-logo .logo-default { display: none; }
.paynnet-logo .logo-white { display: block; }
.paynnet-logo img { transition: opacity 0.3s ease; }

.paynnet-header.scrolled .paynnet-logo .logo-default { display: block; opacity: 1; }
.paynnet-header.scrolled .paynnet-logo .logo-white { display: none; }

/* Header Stream Animation Container */
.header-stream {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    overflow: hidden;
    pointer-events: none;
}

.beam {
    position: absolute;
    top: 0;
    left: -100%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    animation: stream-run 4s infinite linear;
    opacity: 0.6;
}

.beam.delay-1 { animation-duration: 7s; animation-delay: 1s; opacity: 0.4; }
.beam.delay-2 { animation-duration: 5s; animation-delay: 2.5s; opacity: 0.5; width: 20%; }

@keyframes stream-run {
    0% { left: -100%; }
    100% { left: 200%; }
}

.logo h1 { 
    font-family: 'Krona One', sans-serif; 
    font-size: 24px; 
    color: #fff; /* White at top */
    margin: 0; 
    letter-spacing: -0.5px; 
    transition: color 0.4s;
}

.paynnet-header.scrolled .logo h1 {
    color: var(--primary-color); /* Primary Blue on scroll */
}

/* PC Navigation - Magnetic Glow */
.paynnet-nav ul { display: flex; gap: 8px; align-items: center; }
.paynnet-nav a { 
    font-weight: 600; 
    font-size: 15px; 
    color: rgba(255,255,255,0.9); /* White at top */
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.paynnet-header.scrolled .paynnet-nav a {
    color: #333; /* Dark on scroll */
}

/* Hover Effect: Soft Glow Pill */
.paynnet-nav a::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-radius: 30px;
    opacity: 0; transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: -1;
}

.paynnet-header.scrolled .paynnet-nav a::before {
    background: linear-gradient(135deg, rgba(0, 70, 184, 0.1), rgba(0, 212, 255, 0.1));
}

.paynnet-nav a:hover::before { opacity: 1; transform: scale(1); }
.paynnet-nav a:hover { 
    color: #fff; 
    transform: translateY(-2px); 
}

/* -- New Review Section CTA (Liquid Glass) -- */
.review-actions { position: relative; z-index: 10; padding-top: 20px; }

.cta-flex-group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.btn-review-cta {
    display: inline-flex; align-items: center; gap: 20px;
    padding: 12px 12px 12px 30px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 100px;
    color: #1a237e;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.2, 1, 0.2, 1);
    animation: cta-float 3s ease-in-out infinite;
    position: relative;
    overflow: visible;
}

.cta-content { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.cta-tag { font-size: 10px; letter-spacing: 2px; opacity: 0.6; margin-bottom: 2px; }
.cta-text { font-size: 18px; letter-spacing: -0.5px; }

.cta-icon {
    width: 46px; height: 46px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    transition: all 0.5s cubic-bezier(0.2, 1, 0.2, 1);
}

.btn-review-cta:hover {
    background: #fff;
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 70, 184, 0.15);
}

.btn-review-cta:hover .cta-icon {
    transform: rotate(360deg) scale(1.1);
    background: var(--accent-color);
}

/* Internal Glow */
.cta-glow {
    position: absolute; inset: -2px;
    border-radius: 100px;
    background: linear-gradient(90deg, #1a237e, #00d4ff, #1a237e);
    background-size: 200% auto;
    z-index: -1;
    opacity: 0.1;
    transition: opacity 0.5s;
    animation: flow-glow 4s linear infinite;
}

.btn-review-cta:hover .cta-glow { opacity: 0.4; }

/* Kakao Variation for CTA Button */
.btn-review-cta.btn-kakao-cta {
    background: rgba(254, 229, 0, 0.6);
    color: #3C1E1E;
    border-color: rgba(254, 229, 0, 0.4);
    animation-delay: 0.2s; /* Slight offset in float */
}
.btn-kakao-cta .cta-icon {
    background: #3C1E1E;
    color: #FEE500;
}
.btn-kakao-cta .cta-glow {
    background: linear-gradient(90deg, #FEE500, #fff, #FEE500);
}
.btn-kakao-cta:hover {
    background: #FEE500;
    box-shadow: 0 20px 50px rgba(254, 229, 0, 0.3);
}

@keyframes cta-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes flow-glow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.paynnet-header.scrolled .paynnet-nav a:hover {
    color: var(--primary-color);
}

/* Fixed Admin Link for Admins */
.fixed-admin-link {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 2000;
    width: 40px;
    height: 40px;
    background: rgba(0, 70, 184, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    transition: all 0.3s ease;
}

.fixed-admin-link:hover {
    background: var(--primary-color);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 20px rgba(0, 70, 184, 0.5);
}

@media (max-width: 991px) {
    /* Move below header (Header is ~70-80px tall) */
    .fixed-admin-link { 
        top: 120px !important; 
        left: 15px !important; 
        width: 35px; height: 35px; font-size: 18px; 
        background: rgba(255, 255, 255, 0.9); /* Higher contrast against content */
        color: var(--primary-color);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
}

/* Contact Button (Holographic) */
.paynnet-nav a.trigger-chat {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(0, 70, 184, 0.3);
}
.paynnet-nav a.trigger-chat::before { display: none; } /* No pill for this */
.paynnet-nav a.trigger-chat:hover {
    box-shadow: 0 8px 25px rgba(0, 70, 184, 0.5);
    transform: translateY(-3px);
}

/* Admin Button */
.paynnet-nav a.admin-btn { border: 1px solid #e74c3c; color: #e74c3c; padding: 8px 15px; }
.paynnet-nav a.admin-btn:hover { background: #e74c3c; color: #fff; }

/* Mobile Menu - Dynamic Capsule (Floating Dock) */
.mobile-capsule-menu { display: none; }

@media (max-width: 991px) {
    /* Hide PC Nav */
    .paynnet-nav ul { display: none; }
    
    /* 1. Resize Header Logo on Mobile */
    .paynnet-logo .text-logo { font-size: 22px !important; color: #fff !important; }
    .paynnet-header.scrolled .paynnet-logo .text-logo { color: var(--primary-color) !important; }
    .paynnet-logo img { height: 40px !important; width: auto; }
    .paynnet-header { padding: 24px 0; } /* Significantly larger height */

    /* 2. Show Capsule - Top Right next to Logo */
    .mobile-capsule-menu {
        display: flex; align-items: center; justify-content: flex-end;
        position: fixed; 
        top: 16px; /* Centered with 24px padding */
        right: 15px; 
        width: auto;
        z-index: 9999;
    }
    .paynnet-header.scrolled ~ .mobile-capsule-menu {
        top: 10px; /* Centered on scrolled state */
    }

    /* Capsule Content (Morphing Container) */
    .capsule-content {
        background: rgba(255, 255, 255, 0.95); /* Slightly more opaque for text readability */
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        box-shadow: 0 5px 20px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.05);
        border-radius: 30px; 
        padding: 4px 12px;
        display: flex; align-items: center; justify-content: flex-end;
        transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        height: 42px;
        overflow: hidden;
        width: 85px;
    }

    /* Active State (Expanded) */
    .mobile-capsule-menu.active .capsule-content {
        width: 340px; /* Wider to fit text labels */
        height: 60px; /* Taller for Icon + Text */
        padding: 0 10px;
        background: rgba(255, 255, 255, 0.98);
        justify-content: center;
        border-radius: 20px; /* Slightly squarisher when open */
    }
    
    /* Active State (Admin) */
    .mobile-capsule-menu.active.has-admin .capsule-content { width: 380px; }

    /* Idle Label */
    .capsule-label {
        display: flex; align-items: center; gap: 6px;
        font-weight: 700; font-size: 13px; color: #333;
        white-space: nowrap; transition: 0.3s;
    }
    .capsule-label i { font-size: 16px; }
    
    .mobile-capsule-menu.active .capsule-label {
        opacity: 0; width: 0; padding: 0; margin: 0; pointer-events: none; display: none;
    }

    /* Icons used in Active State */
    .capsule-icons {
        display: flex; gap: 5px; list-style: none; padding: 0; margin: 0;
        opacity: 0; visibility: hidden; width: 0;
        transition: 0.3s;
    }
    
    .mobile-capsule-menu.active .capsule-icons {
        opacity: 1; visibility: visible; width: 100%;
        justify-content: space-evenly; flex: 1;
    }

    .capsule-icons li { flex: 1; display: flex; justify-content: center; }
    .capsule-icons a {
        display: flex; flex-direction: column; /* Stack Icon + Text */
        align-items: center; justify-content: center;
        width: 50px; height: 50px; border-radius: 12px; /* Square-ish hit area */
        color: #555; background: transparent; text-decoration: none;
        transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        gap: 2px;
    }
    .capsule-icons a i { font-size: 20px; line-height: 1; margin-bottom: 2px; }
    .capsule-icons .cap-text { 
        font-size: 10px; font-weight: 600; letter-spacing: -0.5px; 
        color: #777; line-height: 1; 
    }

    .capsule-icons a:hover, .capsule-icons a.active-link {
        color: var(--primary-color); 
        background: rgba(0, 70, 184, 0.05);
    }
    .capsule-icons a:hover i, .capsule-icons a.active-link i { color: var(--primary-color); }
    .capsule-icons a:hover .cap-text, .capsule-icons a.active-link .cap-text { color: var(--primary-color); }

    /* Close Button (X) */
    .capsule-close {
        position: absolute; right: -40px; top: 50%; transform: translateY(-50%);
        width: 30px; height: 30px; background: #fff; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        color: #333; font-size: 16px; opacity: 0;
        transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        pointer-events: none;
    }
    
    .mobile-capsule-menu.active .capsule-close {
        right: 5px; top: 85px; /* Move below capsule, slightly inset */
        opacity: 1; pointer-events: auto;
    }
}

/* KSMS Renewal Logo Box */
.ksms-sidebar .ksms-logo-box {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); /* Soft Shadow matching Login Widget */
    margin: 0 auto 20px; /* Center align & bottom margin */
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box; /* Padding included in width */
}
/* Ensure image responsiveness inside the box */
.ksms-sidebar .ksms-logo-box img {
    display: block;
}

/* KSMS Renewal Logo Box - Enhanced Visibility */
.ksms-sidebar .ksms-logo-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 57, 127, 0.08);
    box-shadow: 0 10px 30px rgba(0, 57, 127, 0.08);
    margin: 20px auto 15px; /* Top 20px, Bottom 15px */
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    min-height: 95px; /* Reduced from 100px to 95px */
    width: 100% !important; /* Force full width to match Login Widget */
}


.ksms-sidebar .ksms-logo-box img {
    display: block;
    max-width: 100%;
    height: auto;
    filter: none; /* Remove drop-shadow to avoid double border effect */
}

/* Mobile Optimization for Logo Box */
@media (max-width: 991px) {
    .ksms-sidebar .ksms-logo-box {
        background: none; /* Transparent on mobile? Or stick to white? */
        border: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0 !important;
        width: auto !important;
        min-height: auto;
        justify-content: flex-start;
        margin-bottom: 0;
    }
    .ksms-sidebar .ksms-logo-box img {
        width: 150px !important; /* Smaller text logo on mobile */
    }
}
