:root {
    --goson-blue: #4A90E2;
    --goson-dark: #0A1626;
    --goson-white: #E0E0E0;
    --goson-gray: #33C5FF;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--goson-dark);
    color: var(--goson-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--goson-blue);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 20px;
}

.content {
    width: 100%;
    max-width: 800px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    margin-top: 400px; /* Space for the chat and button */
}

.back-button {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    background-color: var(--goson-blue);
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
    margin-top: 20px;
    width: fit-content;
    position: fixed;
    bottom: 300px; /* Position higher from bottom of page */
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

.back-button:hover {
    background-color: #3A80D2;
    box-shadow: 0 6px 15px rgba(74, 144, 226, 0.4);
}

.footer {
    position: fixed;
    bottom: 250px; /* Position just above the button (button is at 300px) */
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.8;
    width: 100%;
    max-width: 800px;
}

/* Fallback message styles */
#no-agents-message {
    display: none;
    text-align: center;
    padding: 20px;
    background-color: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 8px;
    margin-top: 20px;
    width: 100%;
    max-width: 800px;
    position: fixed;
    top: 150px; /* Position higher on the page */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
}

/* Make sure Zammad chat is visible and properly positioned */
#zammad-chat {
    position: fixed !important;
    bottom: auto !important;
    right: auto !important;
    left: 50% !important;
    top: 120px !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 700px !important; /* Reduced width to prevent overflow */
    z-index: 9999 !important;
    overflow: hidden !important; /* Prevent content from sticking out */
}

.zammad-chat-is-shown {
    position: fixed !important;
    margin: 0 !important;
    top: 120px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 700px !important; /* Match width with container */
    overflow: hidden !important;
}

.zammad-chat-modal {
    position: fixed !important;
    margin: 0 !important;
    top: 120px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 700px !important; /* Match width with container */
    overflow: hidden !important;
}

/* Ensure all chat elements have consistent width */
.zammad-chat-modal-text,
.zammad-chat-modal-body,
.zammad-chat-body,
.zammad-chat-header,
.zammad-chat-welcome {
    max-width: 700px !important;
    width: 100% !important;
    overflow: hidden !important;
}

/* Fix text alignment and prevent overflow on the right */
.zammad-chat-message {
    padding-right: 0px !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

.zammad-chat-message-text {
    padding-right: 0 !important;
    margin-right: 0 !important;
    max-width: 85% !important;
    word-wrap: break-word !important;
}

/* Align sender's messages with the right side of the send button */
.zammad-chat-message--customer {
    padding-right: 25px !important; /* Increased padding to move text slightly to the left */
    padding-left: 0 !important;
    text-align: right !important;
}

.zammad-chat-message--customer .zammad-chat-message-text {
    margin-left: auto !important;
    margin-right: 0 !important;
    text-align: right !important;
    position: relative !important;
    right: 0 !important;
}

/* Force center alignment for all Zammad elements */
.zammad-chat-modal-text {
    text-align: center !important;
}

.zammad-chat-agent {
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.zammad-chat-header {
    text-align: center !important;
}



/* Position agent elements */
.zammad-chat-agent {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: 100% !important;
    text-align: left !important;
    height: 40px !important; /* Set a fixed height */
    line-height: 40px !important; /* Match line height to height */
}

/* Position avatar on the right */
.zammad-chat-agent-avatar {
    position: absolute !important;
    right: 20px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important; /* Center vertically */
}

/* Position name on the left */
.zammad-chat-agent-name {
    position: absolute !important;
    left: 20px !important;
    right: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important; /* Center vertically */
    text-align: left !important;
    width: auto !important;
    white-space: nowrap !important;
    overflow: visible !important;
    line-height: normal !important;
}

/* Position status on the right */
.zammad-chat-agent-status {
    position: absolute !important;
    right: 60px !important;
    left: auto !important;
    top: 44% !important; /* Fine-tuned position */
    transform: translateY(-50%) !important; /* Center vertically */
    text-align: right !important;
    width: auto !important;
    white-space: nowrap !important;
    overflow: visible !important;
    line-height: normal !important;
}
