/* Chat screen specific styles */
.chat-container {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: url('../images/chat-bg.jpg') center/cover no-repeat; /* Optional subtle pattern */
    background-color: var(--bg-color);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 10;
}

.chat-header .back-btn-dark {
    color: var(--text-dark);
    text-decoration: none;
    margin-right: 15px;
}
.chat-header .back-btn-dark svg { width: 20px; height: 20px; fill: currentColor; }

.chat-header .top-bar-icons {
    display: flex;
    gap: 20px;
}
.chat-header .top-bar-icons svg { width: 22px; height: 22px; fill: var(--text-dark); }
.chat-header .top-bar-icons a { text-decoration: none; color: inherit; display: flex; align-items: center;}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.chat-messages::-webkit-scrollbar { display: none; }

.msg-bubble {
    max-width: 82%;
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    word-break: break-word;
    overflow-wrap: anywhere;
}

@media (max-width: 480px) {
    .chat-header {
        padding: 12px 14px;
    }
    .chat-messages {
        padding: 14px;
        gap: 12px;
    }
    .chat-input-area {
        padding: 10px 14px max(12px, env(safe-area-inset-bottom));
    }
}
.msg-time {
    font-size: 10px;
    margin-top: 5px;
    text-align: right;
    display: block;
}

.msg-received {
    align-self: flex-start;
    background: var(--white);
    color: var(--text-dark);
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.msg-received .msg-time { color: var(--text-light); }

.msg-sent {
    align-self: flex-end;
    background: rgba(227, 116, 130, 0.1);
    color: var(--text-dark);
    border-bottom-right-radius: 5px;
}
.msg-sent .msg-time { color: #8C7B76; }

.audio-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
}
.play-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #E37482;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}
.play-btn svg { width: 12px; height: 12px; fill: white; margin-left: 2px;}
.waveform {
    height: 20px;
    flex: 1;
    background: repeating-linear-gradient(90deg, #E37482, #E37482 2px, transparent 2px, transparent 4px);
    opacity: 0.5;
}

.system-msg {
    align-self: center;
    background: rgba(255,255,255,0.8);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-light);
    margin: 10px 0;
    backdrop-filter: blur(5px);
}

.chat-input-area {
    padding: 15px 20px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-box {
    flex: 1;
    background: var(--white);
    border-radius: 30px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.input-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-dark);
    background: transparent;
}
.input-box svg { width: 20px; height: 20px; fill: var(--text-light); }

.send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--btn-gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    box-shadow: 0 4px 10px rgba(227, 116, 130, 0.3);
    border: none;
    cursor: pointer;
}
.send-btn svg { width: 18px; height: 18px; fill: white; margin-left: -2px;}
