/* ChatT.FAM Chatbot Styles */

#myResponsiveMenu ul{padding-left: unset !important;}

/* Hide the menu toggle by default (for desktop) */
.my-responsive-menu-wrapper .menu-toggle {
    display: none;
    cursor: pointer;
    padding: 10px; /* Adjust padding as needed */
    position: relative; /* Or absolute/fixed depending on your header layout */
    width: 100%; /* Make the image take full width if desired */
    box-sizing: border-box;
    text-align: center; /* Center the image if it's smaller than width */
}

.my-responsive-menu-wrapper .menu-toggle img {
    max-width: 100%; /* Ensure image fits */
    height: auto;
    display: block; /* Remove extra space below image */
}

/* Styling for the collapsed menu - targets the top-level div created by our Walker */
.my-responsive-menu-wrapper .primary-menu-div {
    display: none; /* Hidden by default */
    background-color: #f00; /* Red background */
    width: 100%;
    position: relative;
    z-index: 99;
    overflow-y: auto; /* Enable scrolling for long menus */
    box-sizing: border-box;
    padding:unset !important; /* Add some padding at the bottom */
    margin-top: unset !important;
    margin-bottom: unset !important;
}

/* Basic styling for individual menu item divs */
.my-responsive-menu-wrapper .primary-menu-div .menu-item-div { /* Each menu item is now a div */
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
}

.my-responsive-menu-wrapper .primary-menu-div .menu-item-div:last-child {
    border-bottom: none;
}

.my-responsive-menu-wrapper .primary-menu-div .menu-item-div .menu-link { /* Link inside the div */
    color: #000;
    text-decoration: none;
    font-size: 24px; /* Adjust font size as needed */
    padding: 15px 20px; /* Increase padding for better touch targets */
    display: block;
    text-align: center; /* Center the text */
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.my-responsive-menu-wrapper .primary-menu-div .menu-item-div .menu-link:hover,
.my-responsive-menu-wrapper .primary-menu-div .menu-item-div.current-menu-item .menu-link {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Styling for sub-menus (nested divs) */
.my-responsive-menu-wrapper .primary-menu-div .sub-menu-div {
    display: none; /* Hidden by default */
    background-color: rgba(0, 0, 0, 0.2); /* Darker background for sub-menus */
    padding-top: 5px;
    padding-bottom: 5px;
}

.my-responsive-menu-wrapper .primary-menu-div .sub-menu-div .menu-item-div .menu-link {
    font-size: 20px; /* Smaller font for sub-items */
    padding: 10px 30px; /* Indent sub-items */
}

/* Indicator for parent items with children */
.my-responsive-menu-wrapper .primary-menu-div .menu-item-div.has-children > .menu-link {
    position: relative;
}

.my-responsive-menu-wrapper .primary-menu-div .menu-item-div.has-children > .menu-link::after {
    content: '+'; /* Or any other indicator */
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 20px;
}
.my-responsive-menu-wrapper .primary-menu-div .menu-item-div.has-children.active > .menu-link::after {
    content: '-';
}


/* --- Media Queries for responsiveness --- */

/* For screens smaller than 1180px */
@media (max-width: 1180px) {
    /* Show the toggle button */
    .my-responsive-menu-wrapper .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #121212;
    }

    /* Important: You need to hide your existing desktop menu here */
    /* Replace '.your-desktop-menu-class' with the actual class/ID of your desktop menu */
    #site-navigation,
    .main-menu,
    .desktop-navigation { /* Add more selectors if needed for your theme */
        display: none !important; /* Use !important to override theme styles */
    }
}

/* For screens larger than 1180px */
@media (min-width: 1181px) {
    /* Ensure the responsive menu itself is hidden on desktop */
    .my-responsive-menu-wrapper {
        display: none !important;
    }
}

.text-title{font-size:30px; line-height: 30px; font-weight: 700;}
.text-info{font-size:20px; line-height: 30px;  font-weight: 700;}
.text-text{font-size:16px; line-height: 30px;  font-weight: 500;}
.text-navi{font-size:16px; line-height: 20px; font-weight: 500;}

@media (max-width: 1399px) {
    .text-title{font-size:22px; line-height: 22px;}
    .text-info{font-size:20px; line-height: 30px;}
    .text-text{font-size:16px; line-height: 24px;}
    .text-navi{font-size:14px; line-height: 18px;}
}

@media (min-width: 1180px) {
    #colophon>div, #menu-primary{width: 1140px; justify-content: space-between;}
}


@media (min-width: 1400px) {
    .header-wrap.page-container:not(.-full-w){max-width: 1350px !important; --clb-container-width:1350px !important;}
    .elementor-section.elementor-section-boxed > .elementor-container{max-width: 1400px !important; --clb-container-width:1400px !important;}
    #colophon>div, #menu-primary{width: 1350px; justify-content: space-between;}
}



.p-x{width: 66%;}

.tfam-chatbot-container {
    margin: 0 auto;
    background: #000000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.tfam-chatbot-header {
    background: #000;
    padding: 20px 24px;
}

.tfam-chatbot-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

/* Messages Area */
.tfam-chatbot-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #555;
    scroll-behavior: smooth;
}

.tfam-message-container {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.tfam-bot-message-container {
    align-items: flex-start;
}

.tfam-user-message-container {
    align-items: flex-end;
}

.tfam-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
    font-size: 14px;
}

.tfam-bot-message {
    background: #f1f3f4;
    color: #202124;
    border-bottom-left-radius: 6px;
}

.tfam-user-message {
    background: #000;
    color: #ffffff;
    border-bottom-right-radius: 6px;
}

/* Input Area */
.tfam-chatbot-input-area {
    padding: 20px 24px 16px;
    background: #B0B0B0;
}

.tfam-input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.tfam-input-field {
    flex: 1;
    min-height: 40px;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    resize: none;
    outline: none;
    transition: border-color 0.2s ease;
    font-family: inherit;
    background: #f8f9fa;
}

.tfam-input-field:focus {
    border-color: #1a73e8;
    background: #ffffff;
}

.tfam-input-field::placeholder {
    color: #9aa0a6;
}

.tfam-send-button {
    min-width: 60px;
    height: 40px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    padding: 0 16px;
}

.tfam-send-button:hover:not(:disabled) {
    background: #1557b0;
}

.tfam-send-button:disabled {
    background: #000 !important;
    cursor: not-allowed;
}

/* Disclaimer */
.tfam-chatbot-disclaimer {
    padding: 16px 24px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.tfam-chatbot-disclaimer p {
    margin: 0;
    font-size: 12px;
    color: #5f6368;
    line-height: 1.4;
}

/* Loading Animation */
.tfam-loading {
    position: absolute;
    bottom: 80px;
    left: 20px;
    padding: 12px 16px;
    background: #f1f3f4;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
}

.tfam-loading-dots {
    display: flex;
    gap: 4px;
}

.tfam-loading-dots span {
    width: 6px;
    height: 6px;
    background: #9aa0a6;
    border-radius: 50%;
    animation: tfam-loading-bounce 1.4s infinite ease-in-out both;
}

.tfam-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.tfam-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes tfam-loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Links in messages */
.tfam-message a {
    color: #1a73e8;
    text-decoration: underline;
}

.tfam-bot-message a {
    color: #1a73e8;
}

.tfam-user-message a {
    color: #e8f0fe;
}

/* Scrollbar */
.tfam-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.tfam-chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.tfam-chatbot-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.tfam-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tfam-chatbot-container {
        margin: 0;
        border-radius: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .tfam-chatbot-messages {
        flex: 1;
        height: auto;
    }
    
    .tfam-chatbot-header {
        padding: 16px 20px;
    }
    
    .tfam-chatbot-title {
        font-size: 16px;
    }
    
    .tfam-input-container {
        gap: 8px;
    }
    
    .tfam-input-field {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Smooth animations */
.tfam-message-container {
    animation: tfam-message-appear 0.3s ease-out;
}

@keyframes tfam-message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* tfam-marquee.css */
@font-face {
    font-family: "advik";
    src: url("https://tfam-netopen.xyz/wp-content/uploads/2025/07/ADVIK-Sharp.otf");
    font-display: swap;
}

.advik {
    font-family: advik !important;
    font-style: italic;
    letter-spacing:2px;
}

.netopen-landing{
    background-color: #666666;
}

.netopen-landing-middle{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    background-color: #666666;
    height: 50vh;
}
.netopen-landing-middle-text{
    font-size: 15rem;
}
.tfam-marquee-container {
    position: relative;
    width: 100%;
    /* 原本的 height: 120px; 被短代碼的 height:100vh; 覆蓋，建議統一 */
    /* height: 120px; */ /* 這個在您的短代碼中被行內樣式覆蓋，如果需要，請調整短代碼中的 height */
    background-color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tfam-marquee-top,
.tfam-marquee-middle,
.tfam-marquee-bottom {
    position: relative;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-family: Arial, sans-serif;
    font-weight: bold;
    color: #000000;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.tfam-marquee-top{font-size: calc(100vh / 3.1) !important;}
.tfam-marquee-middle{font-size: calc(100vh / 3.4) !important;}
.tfam-marquee-bottom{font-size: calc(100vh / 4) !important;}

.outline-g{color: #B0B0B0; -webkit-text-fill-color: transparent;  -webkit-text-stroke: 1.5px #B0B0B0;}
.outline{color: #000; -webkit-text-fill-color: transparent;  -webkit-text-stroke: 1.5px #000;}

.tfam-marquee-top {
    animation-name: scroll-right; /* 只指定動畫名稱 */
    height: 35vh;
    color: #B0B0B0;
    line-height: normal;
}

.tfam-marquee-middle {
    animation-name: scroll-left; /* 只指定動畫名稱 */
    height: 35vh;
    line-height: normal;
}

.tfam-marquee-bottom {
    animation-name: scroll-right; /* 只指定動畫名稱 */
    height: 30vh;
    line-height: normal;
    color: #B0B0B0;
}

.marquee-text {
    padding-right: 100px;
    display: inline-block;
    /* 移除這裡的 background-color，移到父元素 */
}

.marquee-text-sub{
    font-size: calc(100vh / 13) !important;
    -webkit-writing-mode: vertical-lr;
    writing-mode: vertical-lr;
    transform: rotate(195deg);
    margin-right: -3rem;
}

.marquee-text-title{
    margin-left: -3rem;
}

/* 上方跑馬燈 - 從左到右 */
@keyframes scroll-right {
    0% {
        transform: translateX(-80%);
    }
    100% {
        transform: translateX(0%);
    }
}

/* 下方跑馬燈 - 從右到左 */
@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .tfam-marquee-top,
    .tfam-marquee-middle {
        font-size: 18px;
    }

    .tfam-marquee-container {
        height: 100px;
    }
}

@media (max-width: 480px) {
    .tfam-marquee-top,
    .tfam-marquee-middle {
        font-size: 16px;
    }

    .tfam-marquee-container {
        height: 80px;
    }
}

/* 自定義TFAM字樣的直立效果 */
.tfam-marquee-top .marquee-text {
    letter-spacing: 2px;
}

.tfam-marquee-middle .marquee-text {
    letter-spacing: 1px;
}