/* Glassmorphism Chat Widget Styles */

.dtv-chat-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.chat-toggle-btn {
    pointer-events: auto;
    background: #ff7b00;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0 10px 25px rgba(255, 123, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    background: #e66e00;
    box-shadow: 0 14px 28px rgba(255, 123, 0, 0.5), 0 5px 15px rgba(0, 0, 0, 0.3);
}

.glass-chat-box {
    width: 350px;
    height: 600px;
    max-width: calc(100vw - 4rem);
    max-height: calc(100vh - 4rem);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 1rem;
    padding-bottom: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 10000;
}

.glass-chat-box.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.chat-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header .close-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
}

.chat-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    -webkit-overflow-scrolling: touch;
}

.chat-message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.bot-message,
.manager-message {
    background: rgba(255, 255, 255, 0.15);
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.client-message {
    background: var(--tropical-indigo);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.chat-input-area {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.chat-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 0.8rem 1rem;
    border-radius: 2rem;
    outline: none;
    transition: background 0.3s ease;
}

.chat-input-area input:focus {
    background: rgba(255, 255, 255, 0.2);
}

.chat-input-area button {
    background: var(--tropical-indigo);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.chat-input-area button:hover {
    background: #7c6bd6;
    box-shadow: 0 0 14px rgba(108, 93, 211, 0.6);
    transform: scale(1.08);
}

/* Registration Form styles */
.chat-registration-panel {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    color: var(--text-color);
    overflow-y: auto;
    height: 100%;
}

.chat-reg-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.chat-reg-header p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.chat-reg-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.9;
}

.form-group input[type="text"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    outline: none;
    transition: background 0.3s ease;
    font-size: 0.95rem;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--tropical-indigo);
}

.chat-reg-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 0.8rem 1rem;
    border-radius: 0.5rem;
    outline: none;
    transition: background 0.3s ease;
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}

.chat-reg-select option {
    background: #1a1a1a;
    color: white;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.contact-methods label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: normal;
}

.contact-methods label input[type="radio"] {
    accent-color: var(--tropical-indigo);
    width: 1.1rem;
    height: 1.1rem;
}

.submit-btn {
    background: var(--tropical-indigo);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.1s;
    margin-top: 0.1rem;
}

.submit-btn:hover {
    background: #7c6bd6;
    box-shadow: 0 0 16px rgba(108, 93, 211, 0.55);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Quick Reply Styles */
.quick-reply-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 0.5rem;
    max-width: 100%;
}

.quick-reply-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

/* Custom Scrollbar for Quick Reply Options */
.quick-reply-options::-webkit-scrollbar {
    width: 4px;
}
.quick-reply-options::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.quick-reply-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.qr-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    word-break: break-word;
    font-size: 0.9rem;
}

.qr-option:hover {
    background: rgba(255, 255, 255, 0.2);
}

.qr-option input[type="checkbox"] {
    accent-color: var(--tropical-indigo);
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
}

.qr-submit-btn {
    background: var(--tropical-indigo);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    align-self: flex-start;
}

.qr-submit-btn:hover {
    background: #7c6bd6;
    box-shadow: 0 0 14px rgba(108, 93, 211, 0.55);
}

/* Typing Indicator */
.typing-indicator-bubble {
    padding: 0.6rem 0.8rem !important;
    display: inline-flex !important;
    align-items: center;
    min-width: 45px;
    margin-bottom: 0.5rem;
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: typing-bounce 1s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
}

/* Status message style (internal) */
.status-msg {
    font-size: 0.85rem;
    opacity: 0.7;
    text-align: center;
    margin: 0.5rem 0;
    width: 100%;
}
#dtv-chat-overlay,
#europe-chat-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 998;
}

#dtv-chat-overlay.active,
#europe-chat-overlay.active {
  display: block;
}

#dtv-chat-container,
#europe-chat-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  pointer-events: none;
}

.dtv-chat-wrapper {
  position: relative;
  z-index: 999;
}
