<?php
/**
 * HKIG About, Agent, and shared components.
 */

/* Shared buttons */
.hkig-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.hkig-btn-primary {
    background: #007cba;
    color: #fff !important;
}

.hkig-btn-primary:hover {
    background: #005f8f;
    color: #fff !important;
}

.hkig-btn-accent {
    background: linear-gradient(135deg, #6366f1 0%, #007cba 55%, #06b6d4 100%);
    color: #fff !important;
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.45);
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: 999px;
}

.hkig-btn-accent:hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.55);
}

.hkig-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
    color: #007cba !important;
    border: 2px solid #007cba;
    box-shadow: 0 2px 10px rgba(0, 124, 186, 0.12);
}

.hkig-btn-secondary:hover {
    background: #007cba;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 124, 186, 0.28);
}

/* About page */
.hkig-about-wrap,
.hkig-agent-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.hkig-about-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.hkig-about-photo img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.hkig-about-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    color: #666;
    margin: 0 0 0.5rem;
}

.hkig-about-role {
    font-size: 1.15rem;
    color: #007cba;
    margin: 0.5rem 0 0;
}

.hkig-about-alt-name {
    font-weight: 400;
    color: #555;
    font-size: 0.85em;
}

.hkig-about-body p {
    line-height: 1.7;
    color: #444;
}

.hkig-about-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin: 2rem 0;
}

@media (min-width: 640px) {
    .hkig-about-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.hkig-about-card {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
}

.hkig-about-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.hkig-about-card p {
    margin: 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.hkig-about-link a {
    color: #007cba;
    font-weight: 600;
}

.hkig-about-disclaimer {
    font-size: 0.9rem;
    color: #777;
    border-left: 3px solid #ddd;
    padding-left: 1rem;
    margin: 2rem 0 1.5rem;
}

.hkig-about-cta {
    margin-top: 1.5rem;
    text-align: center;
}

@media (min-width: 640px) {
    .hkig-about-cta {
        text-align: left;
    }
}

/* HKIG Agent page */
.hkig-agent-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.hkig-agent-status-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f59e0b;
    color: #fff;
}

.hkig-agent-status-text {
    flex: 1;
}

.hkig-agent-status-text strong {
    display: block;
    font-size: 1.05rem;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.hkig-agent-status-text p {
    margin: 0;
    color: #78350f;
    line-height: 1.55;
    font-size: 0.95rem;
}

.hkig-agent-ui--preview {
    position: relative;
}

.hkig-agent-ui--preview .hkig-agent-starters,
.hkig-agent-ui--preview .hkig-agent-form {
    opacity: 0.55;
    pointer-events: none;
}

.hkig-agent-preview-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
    border-radius: 12px;
    pointer-events: none;
}

.hkig-agent-preview-overlay span {
    background: #1e293b;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.2);
    letter-spacing: 0.02em;
}

.hkig-agent-subtitle {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.hkig-agent-features {
    margin: 1.5rem 0 2rem;
    padding-left: 1.25rem;
    color: #444;
    line-height: 1.7;
}

.hkig-agent-ui {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.hkig-agent-messages {
    min-height: 200px;
    max-height: 420px;
    overflow-y: auto;
    padding: 1.25rem;
    background: #fafbfc;
}

.hkig-agent-msg {
    margin-bottom: 1rem;
    max-width: 85%;
}

.hkig-agent-msg p {
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    line-height: 1.5;
}

.hkig-agent-msg-bot p {
    background: #fff;
    border: 1px solid #e8e8e8;
    color: #333;
}

.hkig-agent-msg-user {
    margin-left: auto;
}

.hkig-agent-msg-user p {
    background: #007cba;
    color: #fff;
}

.hkig-agent-starters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0 1.25rem 1rem;
    background: #fafbfc;
}

.hkig-agent-starter {
    background: #fff;
    border: 1px solid #cce4f0;
    color: #007cba;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.hkig-agent-starter:hover {
    background: #e8f4fa;
}

.hkig-agent-form {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #e8e8e8;
    background: #fff;
}

.hkig-agent-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.hkig-agent-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.15);
}

.hkig-agent-form .hkig-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Home — agent highlight section (inline HTML blocks) */
.hkig-home-agent-section {
    background: linear-gradient(135deg, #f0f7fb 0%, #fff 100%);
    padding: 80px 20px;
}

.hkig-home-agent-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 900px) {
    .hkig-home-agent-inner {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.hkig-home-agent-points {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.hkig-home-agent-points li {
    padding: 0.4rem 0 0.4rem 1.5rem;
    position: relative;
    color: #444;
    line-height: 1.6;
}

.hkig-home-agent-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #007cba;
    font-weight: bold;
}

.hkig-home-agent-card {
    background: #fff;
    border: 1px solid #e0e8ef;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 124, 186, 0.08);
}

.hkig-home-agent-card h3 {
    margin-top: 0;
    color: #2c3e50;
}

/* Meet HKIG Agent — paired CTAs (override Kadence entry-content link styles) */
.hkig-home-agent-cta-row,
.hkig-home-agent-inner > div > p {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 1.5rem;
}

.hkig-home-agent-section a.hkig-btn,
.hkig-home-cta-section a.hkig-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 14px 28px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    line-height: 1.3;
    margin-left: 0 !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hkig-home-agent-section a.hkig-btn-primary {
    background: #007cba !important;
    color: #fff !important;
    border: 2px solid #007cba !important;
    box-shadow: 0 4px 14px rgba(0, 124, 186, 0.32);
}

.hkig-home-agent-section a.hkig-btn-primary:hover {
    background: #005f8f !important;
    border-color: #005f8f !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 124, 186, 0.38);
}

.hkig-home-agent-section a.hkig-btn-secondary {
    background: #fff !important;
    color: #007cba !important;
    border: 2px solid #007cba !important;
    box-shadow: 0 2px 10px rgba(0, 124, 186, 0.12);
}

.hkig-home-agent-section a.hkig-btn-secondary:hover {
    background: #007cba !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 124, 186, 0.28);
}

.hkig-home-cta-section {
    background: #2c3e50;
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}

.hkig-home-cta-inner {
    max-width: 800px;
    margin: 0 auto;
}

.hkig-home-cta-section h2 {
    color: #fff;
    font-size: 2.2em;
    margin-bottom: 1rem;
}

.hkig-home-cta-section p {
    font-size: 1.15em;
    opacity: 0.92;
    margin-bottom: 2rem;
}

.hkig-home-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.hkig-home-cta-section a.hkig-btn-primary {
    background: #fff !important;
    color: #2c3e50 !important;
    border: 2px solid #fff !important;
    min-width: 240px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hkig-home-cta-section a.hkig-btn-primary:hover {
    background: #f0f4f8 !important;
    color: #2c3e50 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.hkig-home-cta-section a.hkig-btn-secondary {
    background: transparent !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    min-width: 240px;
}

.hkig-home-cta-section a.hkig-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .hkig-home-cta-row {
        flex-direction: column;
    }

    .hkig-home-cta-section a.hkig-btn-primary,
    .hkig-home-cta-section a.hkig-btn-secondary {
        width: 100%;
        max-width: 320px;
    }
}

/* Floating agent launcher — chat bubble FAB */
.hkig-agent-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #2563eb 100%);
    color: #fff !important;
    padding: 0;
    min-width: 58px;
    height: 58px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5), 0 2px 8px rgba(37, 99, 235, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease, width 0.25s ease;
    overflow: visible;
}

.hkig-agent-fab-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 999px;
    border: 2px solid rgba(99, 102, 241, 0.45);
    animation: hkig-fab-pulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes hkig-fab-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.18);
        opacity: 0;
    }
    100% {
        transform: scale(1.18);
        opacity: 0;
    }
}

.hkig-agent-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    color: #fff;
}

.hkig-agent-fab-label {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    padding-right: 0;
    transition: max-width 0.3s ease, opacity 0.25s ease, padding 0.3s ease;
}

.hkig-agent-fab:hover,
.hkig-agent-fab:focus-visible {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 32px rgba(99, 102, 241, 0.55), 0 4px 12px rgba(37, 99, 235, 0.4);
    color: #fff !important;
    padding-right: 18px;
}

.hkig-agent-fab:hover .hkig-agent-fab-label,
.hkig-agent-fab:focus-visible .hkig-agent-fab-label {
    max-width: 200px;
    opacity: 1;
    padding-right: 4px;
}

@media (max-width: 767px) {
    .hkig-agent-fab {
        bottom: 16px;
        right: 16px;
        min-width: 54px;
        height: 54px;
    }

    .hkig-agent-fab-icon {
        width: 54px;
        height: 54px;
    }

    .hkig-agent-fab:hover,
    .hkig-agent-fab:focus-visible {
        padding-right: 0;
    }

    .hkig-agent-fab:hover .hkig-agent-fab-label,
    .hkig-agent-fab:focus-visible .hkig-agent-fab-label {
        max-width: 0;
        opacity: 0;
    }
}
