diff --git a/src/main/resources/static/resources/css/petclinic.css b/src/main/resources/static/resources/css/petclinic.css index 73c562e9d..240e43311 100644 --- a/src/main/resources/static/resources/css/petclinic.css +++ b/src/main/resources/static/resources/css/petclinic.css @@ -9387,65 +9387,98 @@ table td.action-column { hr { border-top: 1px dotted #34302D; } +/* Chatbox container */ .chatbox { - width: 300px; - border: 1px solid #ddd; - background-color: #f4f4f9; - border-radius: 10px; - box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); position: fixed; bottom: 10px; right: 10px; - font-family: Arial, sans-serif; + width: 300px; + background-color: #f1f1f1; + border-radius: 10px; + box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); + display: flex; + flex-direction: column; } + .chatbox.minimized .chatbox-content { + height: 40px; + /* Height when minimized (header only) */ } + .chatbox.minimized .chatbox-messages, + .chatbox.minimized .chatbox-footer { + display: none; } + +/* Header styling */ +.chatbox-header { + background-color: #075E54; + color: white; + padding: 10px; + text-align: center; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + cursor: pointer; } + +/* Chatbox content styling */ +.chatbox-content { + display: flex; + flex-direction: column; + height: 400px; + /* Adjust to desired height */ + overflow: hidden; + /* Hide overflow to make it scrollable */ } + +.chatbox-messages { + flex-grow: 1; + overflow-y: auto; + /* Allows vertical scrolling */ + padding: 10px; } + +/* Chat bubbles styling */ +.chat-bubble { + max-width: 80%; + padding: 10px; + border-radius: 20px; + margin-bottom: 10px; + position: relative; + word-wrap: break-word; font-size: 14px; } - .chatbox-header { - background-color: #0084ff; - color: white; - padding: 10px; - border-radius: 10px 10px 0 0; - font-weight: bold; - cursor: pointer; } - .chatbox-content { - max-height: 400px; - overflow-y: auto; - padding: 10px; - background-color: white; - border-bottom: 1px solid #ddd; - display: flex; - flex-direction: column; } - .chatbox-footer { - padding: 10px; - border-top: 1px solid #ddd; - display: flex; - align-items: center; - justify-content: space-between; } - .chatbox-footer input[type="text"] { - flex: 1; - padding: 5px; - border: 1px solid #ddd; - border-radius: 5px; } - .chatbox-footer button { - padding: 5px 10px; - background-color: #0084ff; - color: white; - border: none; - border-radius: 5px; - cursor: pointer; } - .chatbox-messages .chat-bubble { - max-width: 80%; - margin-bottom: 10px; - padding: 8px; - border-radius: 15px; - position: relative; - word-wrap: break-word; } - .chatbox-messages .chat-bubble.user { - background-color: #0084ff; - color: white; - align-self: flex-end; } - .chatbox-messages .chat-bubble.bot { - background-color: #f1f1f1; - color: #333; - align-self: flex-start; } + .chat-bubble strong { + font-weight: bold; } + .chat-bubble em { + font-style: italic; } + .chat-bubble.user { + background-color: #dcf8c6; + /* WhatsApp-style light green */ + margin-left: auto; + text-align: right; + border-bottom-right-radius: 0; } + .chat-bubble.bot { + background-color: #ffffff; + margin-right: auto; + text-align: left; + border-bottom-left-radius: 0; + border: 1px solid #e1e1e1; } + +/* Input field and button */ +.chatbox-footer { + padding: 10px; + background-color: #f9f9f9; + display: flex; } + +.chatbox-footer input { + flex-grow: 1; + padding: 10px; + border-radius: 20px; + border: 1px solid #ccc; + margin-right: 10px; + outline: none; } + +.chatbox-footer button { + background-color: #075E54; + color: white; + border: none; + padding: 10px; + border-radius: 50%; + cursor: pointer; } + .chatbox-footer button:hover { + background-color: #128C7E; } @font-face { font-family: 'varela_roundregular'; diff --git a/src/main/scss/petclinic.scss b/src/main/scss/petclinic.scss index fd1eebb94..9136fbd6e 100644 --- a/src/main/scss/petclinic.scss +++ b/src/main/scss/petclinic.scss @@ -21,16 +21,19 @@ $spring-brown: #34302D; $spring-grey: #838789; $spring-light-grey: #f1f1f1; -$chatbox-bg-color: #f4f4f9; -$chatbox-border-color: #ddd; -$chatbox-header-color: #555; -$chatbox-user-bubble-color: #0084ff; -$chatbox-bot-bubble-color: #f1f1f1; -$chatbox-user-text-color: white; -$chatbox-bot-text-color: #333; +$chatbox-bg-color: #f1f1f1; +$chatbox-header-bg-color: #075E54; +$chatbox-header-text-color: white; +$chatbox-height: 400px; $chatbox-border-radius: 10px; $chatbox-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); - +$chatbox-bubble-user-bg-color: #dcf8c6; +$chatbox-bubble-bot-bg-color: #ffffff; +$chatbox-bubble-border-color: #e1e1e1; +$chatbox-footer-bg-color: #f9f9f9; +$chatbox-input-border-color: #ccc; +$chatbox-button-bg-color: #075E54; +$chatbox-button-hover-bg-color: #128C7E; $body-bg: $spring-light-grey; $text-color: $spring-brown; @@ -220,87 +223,116 @@ hr { border-top: 1px dotted $spring-brown; } -// Chatbox container styling +/* Chatbox container */ .chatbox { - width: 300px; - border: 1px solid $chatbox-border-color; - background-color: $chatbox-bg-color; - border-radius: $chatbox-border-radius; - box-shadow: $chatbox-box-shadow; position: fixed; bottom: 10px; right: 10px; - font-family: Arial, sans-serif; - font-size: 14px; - - &-header { - background-color: $chatbox-user-bubble-color; - color: $chatbox-user-text-color; - padding: 10px; - border-radius: $chatbox-border-radius $chatbox-border-radius 0 0; - font-weight: bold; - cursor: pointer; - } - - &-content { - max-height: 400px; - overflow-y: auto; - padding: 10px; - background-color: white; - border-bottom: 1px solid $chatbox-border-color; - display: flex; - flex-direction: column; - } - - &-footer { - padding: 10px; - border-top: 1px solid $chatbox-border-color; - display: flex; - align-items: center; - justify-content: space-between; - - input[type="text"] { - flex: 1; - padding: 5px; - border: 1px solid $chatbox-border-color; - border-radius: 5px; + width: 300px; + background-color: $chatbox-bg-color; + border-radius: $chatbox-border-radius; + box-shadow: $chatbox-box-shadow; + display: flex; + flex-direction: column; + + &.minimized { + .chatbox-content { + height: 40px; /* Height when minimized (header only) */ } - - button { - padding: 5px 10px; - background-color: $chatbox-user-bubble-color; - color: $chatbox-user-text-color; - border: none; - border-radius: 5px; - cursor: pointer; - } - } - - &-messages { - .chat-bubble { - max-width: 80%; - margin-bottom: 10px; - padding: 8px; - border-radius: 15px; - position: relative; - word-wrap: break-word; - - &.user { - background-color: $chatbox-user-bubble-color; - color: $chatbox-user-text-color; - align-self: flex-end; - } - - &.bot { - background-color: $chatbox-bot-bubble-color; - color: $chatbox-bot-text-color; - align-self: flex-start; - } + .chatbox-messages, + .chatbox-footer { + display: none; } } } +/* Header styling */ +.chatbox-header { + background-color: $chatbox-header-bg-color; + color: $chatbox-header-text-color; + padding: 10px; + text-align: center; + border-top-left-radius: $chatbox-border-radius; + border-top-right-radius: $chatbox-border-radius; + cursor: pointer; +} +/* Chatbox content styling */ +.chatbox-content { + display: flex; + flex-direction: column; + height: $chatbox-height; /* Adjust to desired height */ + overflow: hidden; /* Hide overflow to make it scrollable */ +} + +.chatbox-messages { + flex-grow: 1; + overflow-y: auto; /* Allows vertical scrolling */ + padding: 10px; +} + +/* Chat bubbles styling */ +.chat-bubble { + max-width: 80%; + padding: 10px; + border-radius: 20px; + margin-bottom: 10px; + position: relative; + word-wrap: break-word; + font-size: 14px; + + strong { + font-weight: bold; + } + + em { + font-style: italic; + } + + &.user { + background-color: $chatbox-bubble-user-bg-color; /* WhatsApp-style light green */ + margin-left: auto; + text-align: right; + border-bottom-right-radius: 0; + } + + &.bot { + background-color: $chatbox-bubble-bot-bg-color; + margin-right: auto; + text-align: left; + border-bottom-left-radius: 0; + border: 1px solid $chatbox-bubble-border-color; + } +} + +/* Input field and button */ +.chatbox-footer { + padding: 10px; + background-color: $chatbox-footer-bg-color; + display: flex; +} + +.chatbox-footer input { + flex-grow: 1; + padding: 10px; + border-radius: 20px; + border: 1px solid $chatbox-input-border-color; + margin-right: 10px; + outline: none; +} + +.chatbox-footer button { + background-color: $chatbox-button-bg-color; + color: white; + border: none; + padding: 10px; + border-radius: 50%; + cursor: pointer; + + &:hover { + background-color: $chatbox-button-hover-bg-color; + } +} @import "typography.scss"; @import "header.scss";