/* shared styles for text and video chat pages */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: white;
    overflow: hidden;
}

header {
    background-color: white;
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 2px solid #ccc;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.logo-icon {
    width: 44px;
    height: 44px;
    margin-right: -2px;
    margin-bottom: -15px;
}

.logo-text {
    font-size: 38px;
    font-weight: bold;
    color: #ff8c00;
    letter-spacing: -2px;
    text-decoration: none;
}

.tagline {
    font-size: 22px;
    font-weight: bold;
    margin-left: 20px;
    margin-top: 10px;
}

.header-right {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.online-count {
    font-size: 22px;
    color: #555;
    white-space: nowrap;
    margin-right: 5px;
}

.online-count strong {
    color: #333;
}

.monitored-banner {
    background: linear-gradient(to bottom, #d2e4fd, #abcbf6);
    border-bottom: 1px solid #99bef0;
    padding: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

.main-layout {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.chat-area {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: white;
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    font-size: 15px;
    line-height: 1.4;
}

.controls {
    display: flex;
    height: 70px;
    border-top: 1px solid #ccc;
    background: #fff;
}

.chat-btn {
    width: 80px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #444;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#btn-stop {
    border-right: 1px solid #ccc;
}

.send-col {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #ccc;
}

.send-col #btn-send {
    flex: 1;
    border-left: none;
}

.auto-reconnect-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    color: #666;
    cursor: pointer;
    padding: 2px 0;
    white-space: nowrap;
    border-top: 1px solid #ccc;
    user-select: none;
}

.auto-reconnect-label input {
    margin: 0;
    cursor: pointer;
}

.chat-btn:hover {
    background: #eee;
}

.chat-btn .shortcut {
    font-size: 11px;
    font-weight: normal;
    color: #88a;
    margin-top: 2px;
}

.input-container {
    flex: 1;
    padding: 8px;
    background: white;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

#chat-input {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: none;
    resize: none;
    outline: none;
    font-size: 15px;
    padding: 5px;
    font-family: inherit;
}

.msg-stranger {
    color: #fe0000;
    font-weight: bold;
}

.msg-you {
    color: #0000fe;
    font-weight: bold;
}

.msg-text {
    color: black;
    font-weight: normal;
}

.msg-status {
    color: #666;
    font-weight: bold;
    margin-bottom: 5px;
}

#typing-indicator {
    color: #999;
    font-style: italic;
    padding: 0 16px 4px;
    font-size: 13px;
    min-height: 20px;
}
