/* ============================================
   Support Chatbot Widget Styles
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Technotackle Color Palette - Verified */
    /* Primary: Bright Orange */
    /* --primary: #ff6b00; */
    /* --primary-dark: #e65100;
    --primary-light: #fff0e6; */

    --primary: #00C4A7;
    --primary-dark:#00C4A7;
    --primary-light: #00C4A7;

    /* Secondary: Dark Blue/Purple */
    --secondary: #23114d;

    /* Neutrals */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #23114d;

    --surface: #ffffff;
    --surface-hover: #f1f5f9;

    /* Typography Colors */
    --text-primary: #212529;
    /* Body text (Dark Gray) */
    --text-heading: #23114d;
    /* Headings (Brand Dark Blue) */
    --text-secondary: #555555;
    --text-muted: #888888;
    --text-inverse: #ffffff;

    --border: #e2e8f0;
    /* --border-focus: #ff6b00; */
    --border-focus:  #00C4A7;

    /* Shadows */
    /* --shadow-sm: 0 2px 4px rgba(35, 17, 77, 0.05);
    --shadow-md: 0 4px 12px rgba(35, 17, 77, 0.1);
    --shadow-lg: 0 8px 24px rgba(35, 17, 77, 0.15);
    --shadow-glow: 0 0 20px rgba(255, 107, 0, 0.25); */

    /* --shadow-sm: 0 2px 4px  #00C4A7;
    --shadow-md: 0 4px 12px  #00C4A7;
    --shadow-lg: 0 8px 24px  #00C4A7;
    --shadow-glow: 0 0 20px  #00C4A7; */

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 50px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ============================================
   Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   Demo Page Styles
   ============================================ */

.demo-page {
    min-height: 100vh;
    background: var(--bg-primary);
}

.demo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-2xl);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-heading);
    letter-spacing: -0.5px;
}

.logo span.highlight {
    color: var(--primary);
}

.demo-header nav {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.demo-header nav a {
    color: var(--text-heading);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.demo-header nav a:hover {
    color: var(--primary);
}

.btn-header {
    background: var(--primary);
    color: white !important;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: background var(--transition-normal);
}

.btn-header:hover {
    background: var(--primary-dark);
}

.demo-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-2xl);
}

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
    padding: var(--space-2xl) 0;
    text-align: left;
    min-height: 600px;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    line-height: 1.2;
    color: var(--text-heading);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}

.gradient-text {
    color: var(--primary);
    background: none;
    -webkit-text-fill-color: initial;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--text-heading);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Chat Widget Styles
   ============================================ */

.chat-widget {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

/* Floating Toggle Button */
.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    /* box-shadow: var(--shadow-lg), 0 0 20px rgba(255, 107, 0, 0.4); */
    transition: all var(--transition-normal);
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
    /* box-shadow: var(--shadow-lg), 0 0 25px rgba(255, 107, 0, 0.5); */
}

.chat-toggle .close-icon {
    display: none;
}

.chat-toggle.active .chat-icon {
    display: none;
}

.chat-toggle .chat-icon-arrow {
    display: none;
}

.chat-toggle.active .chat-icon-arrow {
    display: block;
}

.chat-toggle.active .close-icon {
    display: block;
}

.hidden {
    display: none !important;
}

/* Chat Window */
.chat-window {
    /*position: absolute;*/
    bottom: 80px;
    right: 0;
    /* width: 380px; */
    /*width: 330px;
    max-width: calc(100vw - var(--space-xl) * 2);
    height: 550px;
    max-height: calc(100vh - 120px);*/
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* padding: var(--space-md) var(--space-lg); */
    padding: 10px;
    background: var(--primary);
    color: white;
    padding-left:20px;
}

.header-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    /* display: flex; */
    align-items: center;
    justify-content: center;
    display:none;
}

.header-text h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.header-text .status {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-text .status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background var(--transition-fast);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    scroll-behavior: smooth;
    background-color: var(--bg-primary);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.message {
    display: flex;
    /* max-width: 85%; */
    max-width: 90%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.assistant {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.message-content {
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    line-height: 1.5;
}

.message.assistant .message-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-bottom-left-radius: var(--radius-sm);
    color: var(--text-primary);
}

.message.user .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: var(--radius-sm);
}

.message-content p {
    margin-bottom: var(--space-sm);
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin: var(--space-sm) 0;
    padding-left: var(--space-lg);
}

.message-content li {
    margin-bottom: var(--space-xs);
}

.message-content a {
    color: var(--primary);
    text-decoration: underline;
}

.message-sources {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.source-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    margin-right: var(--space-xs);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: var(--space-md) var(--space-lg);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

/* Chat Input */
.chat-input-container {
    /* padding: var(--space-md) var(--space-lg); */
    padding: 10px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

#chat-form {
    display: flex;
    gap: var(--space-sm);
}

/* #chat-input {
    flex: 1;
    padding: var(--space-md);
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition-fast);
} */

#chat-input {
    flex: 1;
    resize: none;              /* 🚫 remove resizer */
    border: 1px solid #ddd;
    /* border-radius: 999px; */
    padding: 9px 16px;
    font-size: 14px;
    line-height: 1.4;
    max-height: 150px;
    overflow-y: auto;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
}

#chat-input::-webkit-scrollbar {
    display: none;
}
#chat-input {
    scrollbar-width: none;
}


#chat-input:focus {
    outline: none;
    border-color: var(--primary);
    /* box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2); */
    /* box-shadow: 0 0 0 3px #00C4A7; */
}

#chat-input::placeholder {
    color: var(--text-muted);
}

#send-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition-fast);
}

#send-btn:hover {
    transform: scale(1.1);
}

#send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 768px) {
    .demo-header {
        padding: var(--space-md);
        flex-direction: column;
        gap: var(--space-md);
    }

    .demo-header nav {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
        /* Stack columns on mobile */
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .cta-buttons {
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .demo-content {
        padding: 0 var(--space-lg);
    }

    .chat-widget {
        bottom: var(--space-md);
        right: var(--space-md);
    }

    .chat-window {
        /*width: calc(100vw - var(--space-md) * 2);
        height: calc(100vh - 120px);*/
        bottom: 70px;
        border-radius: var(--radius-lg);
    }
}







.chat-card {
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid #e5e7eb;
}

.chat-card input,
.chat-card textarea,
.chat-card select {
  width: 100%;
  padding: 8px;
  margin: 6px 0;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.chat-card .iti__search-input 
{
    margin:0;
    border-radius:2px;

}

.chat-card textarea {
  resize: none;
}

.chat-card button:not(.iti__country-container button) {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
}




/* default (no red border initially) */
.lead-form input,lead-form input:focus-visible,
.lead-form textarea,.lead-form textarea:focus-visible,
.lead-form select,.lead-form select:focus-visible {
    border: 1px solid #d1d5db;
    outline:none;
}

/* show error only AFTER submit */
.lead-form.submitted input:invalid,
.lead-form.submitted textarea:invalid,
.lead-form.submitted select:invalid {
    border: 1.5px solid #dc2626;
}

/* nice focus effect */
.lead-form.submitted input:focus:invalid,
.lead-form.submitted textarea:focus:invalid,
.lead-form.submitted select:focus:invalid {
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}


.message-content p {
    white-space: normal;
    overflow-wrap: anywhere;   /* ✅ key fix */
    word-break: break-word;
}

.iti--allow-dropdown 
{
    width: 100% !important;
}
/*.iti__country-list 
{
    max-width:250px !important;
}*/




/* Attention pulse for chat button */
.chat-toggle.attention {
    animation: chatPulse 1.8s infinite;
    /* box-shadow: 0 0 0 rgba(99, 102, 241, 0.7); */
    box-shadow: 0 0 0 0#03a84e69

}

@keyframes chatPulse {
    0% {
        /* box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.6); */
        box-shadow: 0 0 0 0#03a84e69;
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 22px rgba(99, 102, 241, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
        transform: scale(1);
    }
}




.iti__search-icon
{
    display: none!important;
}

.iti__country-list
{
    font-size: 12px!important;
}


.chat-window {
    max-height:100%!important;
    max-width:100%!important;
}
.chat-widget {
    position: fixed !important;
    inset: 0 !important;
    background: transparent !important;
}