* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    background: #efe7dd;
}

/* WhatsApp Header - GREEN BAR */
.whatsapp-header {
    background: #075e54;
    color: white;
    height: 60px;
    width: 100%;
    flex-shrink: 0;
    z-index: 100;
}

.header-content {
    height: 100%;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-content i {
    font-size: 24px;
    color: white;
    cursor: pointer;
}

.header-content i:first-child {
    margin-right: 8px;
}

.header-content i:last-child,
.header-content i:nth-last-child(2),
.header-content i:nth-last-child(3) {
    margin-left: auto;
}

.header-content i:nth-last-child(2),
.header-content i:nth-last-child(3) {
    margin-left: 0;
    margin-right: 20px;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-name {
    font-size: 16px;
    font-weight: 500;
    color: white;
}

.contact-status {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

/* Messages Area */
.messages-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    background: #e5ddd5 url("https://cloud.githubusercontent.com/assets/398893/15136779/4e765036-1639-11e6-9201-67e728e86f39.jpg");
}

#messages {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 20px;
}

/* Typing Indicator */
.typing-indicator {
    background: white;
    padding: 12px 16px;
    border-radius: 7.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    margin: 2px 0;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #90949c;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Message Bubbles */
.message {
    max-width: 75%;
    padding: 6px 7px 8px 9px;
    border-radius: 7.5px;
    font-size: 14px;
    line-height: 19px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
    margin: 2px 0;
    direction: ltr;
    text-align: left;
}

.message.rtl {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

.message.received {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.message.sent {
    background: #dcf8c6;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.message-time {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.45);
    margin-left: 8px;
    float: right;
}

/* Input Area */
.input-area {
    background: #f0f0f0;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 60px;
    flex-shrink: 0;
}

.input-area i {
    font-size: 24px;
    color: #54656f;
    cursor: pointer;
}

.input-area input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    outline: none;
    background: white;
}

/* Scrollbar */
.messages-area::-webkit-scrollbar {
    width: 6px;
}

.messages-area::-webkit-scrollbar-track {
    background: transparent;
}

.messages-area::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}
