/* ================================================== */
/* GLOBAL STYLES & IMPORTS                           */
/* ================================================== */

/* Universal box-sizing for predictable element sizing */
* {
    box-sizing: border-box;
}

/* Import Gothic Font */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&display=swap');


/* ================================================== */
/* CHATBOT CONTAINER & GENERAL LAYOUT               */
/* ================================================== */

/* Chatbot container */
#chatbot {
    position: fixed;
    bottom: 20px;
    right: 35px;
    width: 400px;
    /* Removed fixed height; use max-height for flexibility */
    max-height: 80vh;
    padding: 20px;
    background-color: rgba(20, 20, 20, 0.95);
    border: 2px solid #8b0000;
    border-radius: 12px;
    font-family: 'Cinzel', serif;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    overflow-y: auto;
    pointer-events: none;
    z-index: -1;
}


/* ================================================== */
/* HEADER & TEXT STYLES                             */
/* ================================================== */

#chatbot h2 {
    text-align: center;
    color: #d4af37; /* Gold text for a regal feel */
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

#chatbot p {
    text-align: center;
    color: #c0c0c0; /* Lighter grey text for readability */
    margin-bottom: 10px;
}


/* ================================================== */
/* RESPONSE SECTION                                 */
/* ================================================== */

#response {
    flex-grow: 1;
    border: 2px solid #8b0000;
    border-radius: 8px;
    padding: 15px;
    line-height: 1.3;
    background-color: #121212;
    overflow-y: auto;
    color: #c0c0c0;
    font-size: 1rem;
    margin-bottom: 10px;
    text-align: center;
}

#response ul {
    list-style: none; /* Remove default bullets */
    padding-left: 0;  /* Remove default padding */
}

#response ul li {
    position: relative;
    padding-left: 10px; /* Tighter look */
    font-size: 1rem;
    color: #c0c0c0;
    line-height: 1.4;
}

#response ul li::before {
    content: "❖";
    color: #7b0202; /* Dark red to match theme */
    font-size: 1.2em;
    margin-right: 8px;
}


/* ================================================== */
/* OPTIONS & INPUT SECTION                          */
/* ================================================== */

#options {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 15px;
    margin-top: 10px;
}

#options button {
    flex: 1 1 calc(50% - 10px);
    padding: 12px;
    border: 1px solid #8b0000;
    border-radius: 8px;
    background-color: #9c2222;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: 'Cinzel', serif;
}

#options button:hover {
    background-color: #a30000;
    border-color: #ffc400;
}

#input-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

#user-input {
    flex-grow: 1;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #8b0000;
    border-radius: 8px;
    background-color: #1a1a1a;
    color: #c0c0c0;
}

#submit-button {
    padding: 12px 20px;
    font-size: 1rem;
    border: 1px solid #d4af37;
    border-radius: 8px;
    background-color: #8b0000;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

#submit-button:hover {
    background-color: #a00000;
    border-color: #ffd700;
}


/* ================================================== */
/* CHATBOT OPEN & CLOSE BUTTONS                     */
/* ================================================== */

#open-chatbot {
    position: fixed;
    bottom: 20px;
    right: 35px;
    background: linear-gradient(45deg, #5b0000, #8b0000);
    color: white;
    padding: 12px 24px;
    border: 1px solid #d4af37;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Cinzel Decorative', serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    z-index: 10000;
}

#open-chatbot:hover {
    background: linear-gradient(45deg, #6a0c0c, #a00000);
    border-color: #ffd700;
}

#minimize-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

#minimize-button:hover {
    color: #d4af37;
}


/* ================================================== */
/* EMAIL FORM STYLING                               */
/* ================================================== */

#email-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 10px auto;
    width: 100%;
}

#email-form input,
#email-form textarea {
    width: 90%;
    max-width: 300px;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #8b0000;
    border-radius: 5px;
    background-color: #1a1a1a;
    color: #c0c0c0;
}

#email-form textarea {
    height: 100px;
    resize: none;
}

#email-form button {
    width: 90%;
    max-width: 300px;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #d4af37;
    border-radius: 5px;
    background: linear-gradient(45deg, #5b0000, #8b0000);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

#email-form button:hover {
    background: linear-gradient(45deg, #6a0c0c, #a00000);
    border-color: #ffd700;
}

#response p {
    text-align: center;
    font-size: 1rem;
    color: #c0c0c0;
    margin-bottom: 10px;
}

.custom-link {
    color: #FF6347; /* Change to your preferred color */
    text-decoration: none;
    /* Add any additional styling as needed */
}

.custom-link:hover {
    text-decoration: underline;
}



/* ================================================== */
/* MOBILE RESPONSIVENESS                            */
/* ================================================== */

/* For screens below 768px width */
@media only screen and (max-width: 767px) {
    #chatbot {
        width: 90%;
        /* Use max-height so content won't get cut off */
        max-height: 80vh;
        bottom: 10px;
        right: 5%;
    }

    #open-chatbot {
        bottom: 15px;
        right: 15px;
        width: 60px;
        height: 60px;
        font-size: 0.9rem;
        padding: 8px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #options {
        flex-direction: column;
        gap: 5px;
    }

    #options button {
        flex: 1 1 100%;
        padding: 8px;
        font-size: 0.9rem;
    }

    #input-container {
        flex-direction: column;
        gap: 5px;
    }

    #user-input {
        width: 100%;
        font-size: 0.9rem;
    }

    #submit-button {
        width: 100%;
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* For screens 480px wide and below */
@media only screen and (max-width: 480px) {
    #chatbot {
        width: 100%;
        /* Increase max-height slightly for very small screens */
        max-height: 90vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    #open-chatbot {
        bottom: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 0.7rem;
        padding: 6px;
    }

    #options button {
        font-size: 0.8rem;
        padding: 6px;
    }
}

@media only screen and (max-width: 767px) {
    #open-chatbot {
        bottom: 15px;
        right: 15px;
        width: 60px;
        height: 60px;
        font-size: 0; /* Hide the current text */
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        position: fixed;
    }

    #open-chatbot::after {
        content: "Chat"; /* Shortened text for mobile */
        font-size: 0.8rem;
        color: white;
        font-family: 'Cinzel Decorative', serif;
    }
}

@media only screen and (max-width: 480px) {
    #open-chatbot {
        bottom: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
    }

    #open-chatbot::after {
        font-size: 0.7rem; /* Further reduce font-size for very small screens */
    }
}
