@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@200;300;400;500;600;700&display=swap');

@font-face {
   font-family: 'Gresham';
   src: url('../fonts/Gresham.ttf') format('truetype');
   font-weight: normal;
   font-style: normal;
}

/* Remove blue focus outlines */
*:focus {
    outline: none;
}

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: none;
    box-shadow: none;
}

/* Chat Button */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: transparent;
    border: 2px solid #5c4033;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #5c4033;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.chat-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Chat Box Container */
.chat-box {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background-image: url('../images/backgrounds/Warm.jpeg');
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    display: none;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
    font-family: 'Gresham', 'Oswald', sans-serif;
    text-transform: none;
}

.chat-box.active {
    display: flex;
}

/* Chat Header */
.chat-header {
    background: transparent;
    color: #5c4033;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(92, 64, 51, 0.3);
}

.chat-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 300;
}

.chat-close {
    background: none;
    border: none;
    color: #5c4033;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.chat-close:hover {
    transform: rotate(90deg);
}

/* Chat Body */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.4;
}

.chat-message.bot {
    background: rgba(92, 64, 51, 0.1);
    color: #5c4033;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

/* Chat Links */
.chat-link {
    color: #8B5A2B;
    text-decoration: underline;
    word-break: break-all;
    transition: color 0.2s ease;
}

.chat-link:hover {
    color: #5c4033;
    text-decoration: underline;
}

/* Chat Form */
.chat-form {
    padding: 20px;
    border-top: 1px solid rgba(92, 64, 51, 0.3);
    background: transparent;
}

.chat-input-group {
    margin-bottom: 15px;
}

.chat-input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(92, 64, 51, 0.4);
    border-radius: 8px;
    background: transparent;
    color: #5c4033;
    font-family: 'Gresham', 'Oswald', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chat-input:focus {
    outline: none;
    border-color: rgba(92, 64, 51, 0.6);
    background: rgba(92, 64, 51, 0.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.chat-input::placeholder {
    color: rgba(92, 64, 51, 0.6);
}

textarea.chat-input {
    resize: vertical;
    min-height: 80px;
}

.chat-submit {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #5c4033;
    border: 2px solid #5c4033;
    border-radius: 8px;
    font-family: 'Gresham', 'Oswald', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-transform: none;
}

.chat-submit:hover {
    background: rgba(92, 64, 51, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .chat-box {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 90px;
        height: 450px;
    }

    .chat-button {
        right: 20px;
        bottom: 20px;
    }
}

@media screen and (max-width: 480px) {
    .chat-box {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
        bottom: 80px;
        height: 70vh;
        max-height: 450px;
    }

    .chat-button {
        right: 15px;
        bottom: 15px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .chat-header {
        padding: 15px;
    }

    .chat-header h3 {
        font-size: 1.1rem;
    }

    .chat-body {
        padding: 15px;
    }

    .chat-form {
        padding: 15px;
    }

    .chat-input {
        padding: 10px;
        font-size: 0.9rem;
    }

    textarea.chat-input {
        min-height: 60px;
    }

    .chat-submit {
        padding: 10px;
        font-size: 0.9rem;
    }
}
