/* =======================================================
   MASTER STYLESHEET - Claro Music
   ======================================================= */

/* GLOBAL DEFAULTS */
* { box-sizing: border-box; }
body {
    font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
    background: #051C2C; /* Deep Midnight Blue */
    margin: 0;
    padding: 0;
    color: #000;
}

/* LAYOUT CONTAINER */
.container {
    width: 80%;
    max-width: 1260px;
    background: #FFF;
    margin: 0 auto;
    position: relative; 
}

/* HEADER */
.header { background: #051C2C; } 
.header img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 1260px;
    background: transparent !important; 
}

/* COLUMNS */
.sidebar1 {
    float: left;
    width: 20%;
    background: #B0C4DE; /* Light Steel Blue */
    padding-bottom: 10px;
}
.content {
    padding: 10px 0;
    width: 80%;
    float: left;
}

/* NAVIGATION */
ul.nav { 
    list-style: none; 
    border-top: none; /* Removed old grey border */
    margin-bottom: 15px; 
    padding: 0 5px; 
}
ul.nav li { 
    border-bottom: 1px solid #051C2C; /* Deep Blue border instead of grey */
}
ul.nav a {
    padding: 10px 15px;
    display: block;
    text-decoration: none;
    background: #1F4E79; /* Professional Blue */
    color: #FFF; 
    border-radius: 4px; /* Slight curve */
}
ul.nav a:hover { 
    background: #051C2C; 
    color: #FFF; 
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6, p { margin-top: 0; padding-right: 15px; padding-left: 15px; }
.content ul, .content ol { padding: 0 15px 15px 40px; }
a img { border: none; }
a:link { color:#414958; text-decoration: underline; }
a:visited { color: #051C2C; text-decoration: underline; }
a:hover { text-decoration: none; }

/* FOOTER */
.footer { 
    padding: 10px 0; 
    background: #051C2C; 
    clear: both; 
    position: relative;
    color: #FFF; 
}
.footer a { color: #B0C4DE; } 
.footer a:visited { color: #B0C4DE; }

.fltrt { float: right; margin-left: 8px; }
.fltlft { float: left; margin-right: 8px; }
.clearfloat { clear:both; height:0; font-size: 1px; line-height: 0px; }

/* --- CHATBOT STYLES --- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
#chatbot-container {
    max-width: 700px;
    margin: 0 auto;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 20px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
#chat-window {
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 15px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
}
.chat-message {
    padding: 8px 12px;
    border-radius: 18px;
    margin-bottom: 10px;
    max-width: 80%;
    line-height: 1.4;
}
.user-message {
    background-color: #dcf8c6;
    align-self: flex-end;
    text-align: right;
}
.assistant-message {
    background-color: #f1f0f0;
    align-self: flex-start;
    text-align: left;
}
.typing-indicator {
    font-style: italic;
    color: #999;
    align-self: flex-start;
}
#chat-form {
    display: flex;
}
#chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-right: 10px;
}
#chat-input:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
}
#chat-form button {
    padding: 10px 20px;
    border: none;
    background-color: #051C2C; 
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}
#chat-form button:hover {
    background-color: #1F4E79; 
}
#chat-form button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
#new-chat-button {
    display: none; 
    margin: 10px auto 0;
    padding: 10px 20px;
    border: none;
    background-color: #1F4E79;
    color: white;
    border-radius: 20px;
    cursor: pointer;
}

/* --- MOBILE OPTIMIZATIONS --- */
img { max-width: 100%; height: auto; }
table { width: 100% !important; max-width: 100%; }
td { word-wrap: break-word; }

#mobile-nav-trigger { display: none; }
#mobile-chat-toggle { display: none; }

/* Mobile View (Phones) */
@media screen and (max-width: 768px) {
    .container { width: 100%; }
    .sidebar1, .content { float: none; width: 100%; }
    
    .header {
        background-color: #051C2C; 
        text-align: center;
        position: relative;
    }
    .header h1 { margin: 0; padding: 0; }
    .header img {
        width: 60%;
        max-width: 250px;
        height: auto;
        margin: 0 auto;
        padding: 15px 0;
    }

    .sidebar1 { 
        padding: 0; 
        background: transparent;
    }

    #mobile-nav-trigger {
        display: flex;
        position: absolute;
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        background-color: rgba(0,0,0,0.2); 
        color: #fff;
        border: 1px solid rgba(255,255,255,0.5);
        border-radius: 5px;
        font-size: 24px;
        cursor: pointer;
        z-index: 100;
        line-height: 1;
        padding: 0;
        align-items: center;
        justify-content: center;
    }
    
    #mobile-nav-trigger:hover {
        background-color: rgba(0,0,0,0.4);
    }

    .sidebar1 ul.nav {
        display: none;
        margin: 0;
        background: #B0C4DE;
        width: 100%;
        text-align: center;
    }

    .sidebar1 ul.nav.show-menu {
        display: block;
        border-top: 1px solid #fff;
    }

    ul.nav a { 
        padding: 15px; 
        font-size: 1.2em; 
        text-align: center; 
    }
    
    td img { width: 80px; height: auto; }

    #mobile-chat-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        background-color: #051C2C;
        color: white;
        border-radius: 50%;
        border: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        z-index: 10000;
        font-size: 30px;
        cursor: pointer;
        transition: transform 0.2s;
    }

    #mobile-chat-toggle:active { transform: scale(0.9); }

    #chatbot-container {
        position: fixed;
        bottom: 90px;
        right: 20px;
        width: calc(100% - 40px);
        max-width: 400px;
        height: 500px;
        max-height: 70vh;
        background: #fff;
        z-index: 10000;
        box-shadow: 0 5px 20px rgba(0,0,0,0.2);
        display: none; 
        flex-direction: column;
    }

    #chatbot-container.is-open { display: flex; }
    #chat-window { flex-grow: 1; height: auto; }
}

/* =========================================
   CHAT-ONLY MODE OVERRIDES (?chatonly=true)
   ========================================= */

/* 1. Hide Standard Site Elements */
body.chat-only-mode {
    background: #fff !important; /* Reset background */
    overflow: hidden; /* Prevent scrolling the body */
}

/* Hide Header, Sidebar, Footer, Mobile Menu Buttons, and Toggle */
body.chat-only-mode .header,
body.chat-only-mode .sidebar1,
body.chat-only-mode .footer,
body.chat-only-mode #mobile-nav-trigger,
body.chat-only-mode #mobile-chat-toggle { 
    display: none !important; 
}

/* Reset Container and Content Layout */
body.chat-only-mode .container { 
    width: 100% !important; 
    max-width: none !important; 
    background: transparent !important; 
    margin: 0 !important;
}

body.chat-only-mode .content { 
    width: 100% !important; 
    float: none !important; 
    padding: 0 !important;
}

/* 2. Hide all content within .content EXCEPT the chat wrappers */
/* Note: Main site uses #contactform, Sydney site uses #contact */
body.chat-only-mode .content > *:not(#contactform):not(#contact) { 
    display: none !important; 
}

/* 3. Force the Chat Wrappers to be visible and structure the container */
body.chat-only-mode .content #contactform,
body.chat-only-mode .content #contact {
    display: block !important;
    width: 100%;
    height: 100%;
}

/* 4. Full Screen Chatbot Container Override */
body.chat-only-mode #chatbot-container {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    bottom: auto !important;
    right: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    z-index: 99999 !important;
    padding: 10px !important;
}

/* 5. Ensure internal window stretches */
body.chat-only-mode #chat-window {
    flex-grow: 1 !important;
    height: auto !important;
}