/* WhatsApp Chat Container - Pure CSS */
.whatsapp-chat-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Segoe UI Emoji', sans-serif;
    line-height: 1.5;
    box-sizing: border-box;
}

.whatsapp-chat-container *,
.whatsapp-chat-container *::before,
.whatsapp-chat-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.whatsapp-chat-container a {
    text-decoration: none;
    color: inherit;
}

.whatsapp-chat-container button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

.whatsapp-chat-container input,
.whatsapp-chat-container textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    border: none;
    outline: none;
    resize: none;
}

/* Modal Overlay */
.whatsapp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.whatsapp-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(12, 19, 23, 0.9);
    backdrop-filter: blur(4px);
}

.whatsapp-modal-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 90vh;
    max-height: 700px;
}

.whatsapp-modal-container {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 128, 105, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.whatsapp-header {
    background: linear-gradient(135deg, #008069 0%, #00a884 100%);
    color: white;
    position: relative;
    flex-shrink: 0;
    z-index: 10;
}

.whatsapp-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.whatsapp-header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
}

.whatsapp-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-back-btn {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    transition: background-color 0.2s;
}

.whatsapp-back-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.whatsapp-avatar-container {
    position: relative;
    width: 48px;
    height: 48px;
}

.whatsapp-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
}

.whatsapp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.whatsapp-status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background-color: #22c55e;
    border: 2px solid #008069;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-status-dot {
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-user-info {
    display: flex;
    flex-direction: column;
}

.whatsapp-user-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.whatsapp-user-status {
    font-size: 13px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.whatsapp-user-status .whatsapp-status-dot {
    width: 8px;
    height: 8px;
    background-color: #4ade80;
}

.whatsapp-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.whatsapp-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.whatsapp-header-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
}

.whatsapp-close-btn:hover {
    background-color: rgba(239, 68, 68, 0.8) !important;
}

.whatsapp-product-info {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.whatsapp-product-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-product-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.whatsapp-product-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.whatsapp-product-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.whatsapp-product-category {
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.whatsapp-product-price {
    font-size: 14px;
    font-weight: 600;
}

/* Chat Body */
.whatsapp-chat-body {
    flex: 1;
    background: linear-gradient(180deg, #efeae2 0%, #e0ddd8 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.whatsapp-chat-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40L40 0H20L0 20m40 20V20L20 40' fill='%23008069' opacity='.03'/%3E%3C/svg%3E");
    opacity: 0.1;
    pointer-events: none;
}

.whatsapp-messages-container {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.whatsapp-messages-content {
    padding: 24px 16px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar */
.whatsapp-messages-container::-webkit-scrollbar {
    width: 6px;
}

.whatsapp-messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.whatsapp-messages-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.whatsapp-messages-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Welcome Message */
.whatsapp-welcome-container {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.whatsapp-welcome-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    max-width: 400px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.whatsapp-welcome-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.whatsapp-welcome-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a884 0%, #008069 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
    font-size: 18px;
}

.whatsapp-welcome-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.whatsapp-welcome-subtitle {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.whatsapp-welcome-subtitle i {
    color: #f59e0b;
}

.whatsapp-welcome-message {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    margin-bottom: 16px;
}

.whatsapp-welcome-user {
    font-weight: 600;
}

.whatsapp-quick-questions-section {
    margin-bottom: 16px;
}

.whatsapp-quick-questions-title {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
}

.whatsapp-quick-questions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.whatsapp-quick-question-btn {
    text-align: left;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.whatsapp-quick-question-btn:hover:not(:disabled) {
    border-color: rgba(0, 128, 105, 0.3);
    background: linear-gradient(to right, rgba(0, 128, 105, 0.05), rgba(0, 168, 132, 0.05));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.whatsapp-quick-question-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.whatsapp-quick-question-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.whatsapp-quick-question-text {
    font-size: 14px;
    color: #374151;
    flex: 1;
    text-align: left;
}

.whatsapp-quick-question-btn:hover .whatsapp-quick-question-text {
    color: #008069;
}

.whatsapp-quick-question-arrow {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #6b7280;
    margin-left: 8px;
    transition: all 0.2s;
}

.whatsapp-quick-question-btn:hover .whatsapp-quick-question-arrow {
    background: #008069;
    color: white;
}

.whatsapp-security-notice {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-security-notice i {
    color: #008069;
}

/* Date Separator */
.whatsapp-date-separator {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.whatsapp-date-badge {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

/* Messages */
.whatsapp-message-group {
    margin-bottom: 4px;
}

.whatsapp-message {
    display: flex;
    margin-bottom: 16px;
}

.whatsapp-message-sent {
    justify-content: flex-end;
}

.whatsapp-message-received {
    justify-content: flex-start;
}

.whatsapp-message-content {
    max-width: 85%;
}

.whatsapp-message-inner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.whatsapp-message-inner.received {
    flex-direction: row;
}

.whatsapp-message-inner.sent {
    flex-direction: row-reverse;
}

.whatsapp-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a884 0%, #008069 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.whatsapp-message-bubble {
    position: relative;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    max-width: 100%;
}

.whatsapp-message-bubble-received {
    background: white;
    border-radius: 0 18px 18px 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    color: #1f2937;
}

.whatsapp-message-bubble-received::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(-45deg);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    border-left: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.whatsapp-message-bubble-sent {
    background: linear-gradient(135deg, #d9fdd3 0%, #b9f5b9 100%);
    border-radius: 18px 0 18px 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    color: #1f2937;
}

.whatsapp-message-bubble-sent::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    width: 16px;
    height: 16px;
    background: #d9fdd3;
    transform: rotate(45deg);
    clip-path: polygon(0 0, 100% 100%, 100% 0);
}

.whatsapp-message-text {
    margin: 0;
}

.whatsapp-message-time {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.whatsapp-message-inner.received .whatsapp-message-time {
    justify-content: flex-start;
    margin-left: 40px;
}

.whatsapp-message-inner.sent .whatsapp-message-time {
    justify-content: flex-end;
    margin-right: 4px;
}

.whatsapp-message-status {
    display: flex;
    align-items: center;
    gap: 2px;
}

.whatsapp-message-status i {
    font-size: 10px;
}

.whatsapp-status-delivered {
    color: #6b7280;
}

.whatsapp-status-read {
    color: #53bdeb;
}

/* Typing Indicator */
.whatsapp-typing-indicator {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
}

.whatsapp-typing-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00a884 0%, #008069 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.whatsapp-typing-bubble {
    background: white;
    border-radius: 0 18px 18px 18px;
    padding: 12px 16px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.whatsapp-typing-dots {
    display: flex;
    gap: 4px;
}

.whatsapp-typing-dots span {
    width: 8px;
    height: 8px;
    background: #6b7280;
    border-radius: 50%;
    animation: whatsapp-typing-bounce 1.4s infinite ease-in-out;
}

.whatsapp-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.whatsapp-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Sending Indicator */
.whatsapp-sending-indicator {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.whatsapp-sending-bubble {
    background: linear-gradient(135deg, #d9fdd3 0%, #b9f5b9 100%);
    border-radius: 18px 0 18px 18px;
    padding: 12px 16px;
    opacity: 0.8;
}

.whatsapp-sending-dots {
    display: flex;
    gap: 6px;
}

.whatsapp-sending-dots span {
    width: 8px;
    height: 8px;
    background: #4b5563;
    border-radius: 50%;
    animation: whatsapp-pulse 1.5s infinite ease-in-out;
}

.whatsapp-sending-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.whatsapp-sending-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Input Area */
.whatsapp-input-area {
    background: linear-gradient(to bottom, #f0f2f5, #e6e8eb);
    border-top: 1px solid #e1e1e1;
    padding: 12px;
    position: relative;
    flex-shrink: 0;
}

/* Attachment Menu */
.whatsapp-attachment-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0;
    padding: 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.whatsapp-emoji-picker {
    margin-bottom: 16px;
}

.whatsapp-emoji-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.whatsapp-emoji-tab {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.whatsapp-emoji-tab-active {
    background: linear-gradient(135deg, #008069 0%, #00a884 100%);
    color: white;
}

.whatsapp-emoji-tab:hover:not(.whatsapp-emoji-tab-active) {
    background: #e5e7eb;
}

.whatsapp-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
}

.whatsapp-emoji-btn {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.whatsapp-emoji-btn:hover {
    background-color: #f3f4f6;
}

.whatsapp-attachment-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.whatsapp-attachment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.whatsapp-attachment-option:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.whatsapp-attachment-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.whatsapp-attachment-photos {
    background: #dbeafe;
    color: #1d4ed8;
}

.whatsapp-attachment-documents {
    background: #dcfce7;
    color: #16a34a;
}

.whatsapp-attachment-camera {
    background: #f3e8ff;
    color: #7c3aed;
}

.whatsapp-attachment-audio {
    background: #fef3c7;
    color: #d97706;
}

.whatsapp-attachment-label {
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
}

/* Input Container */
.whatsapp-input-container {
    position: relative;
}

.whatsapp-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.whatsapp-attachment-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 20px;
    transition: all 0.2s;
    flex-shrink: 0;
    border: none;
    cursor: pointer;
}

.whatsapp-attachment-btn:hover {
    color: #008069;
    background: #f3f4f6;
}

.whatsapp-attachment-btn-active {
    color: #008069;
    background: #f3f4f6;
}

.whatsapp-input-field-wrapper {
    flex: 1;
    position: relative;
}

.whatsapp-message-input {
    width: 100%;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 16px;
    padding-right: 80px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 24px;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    transition: all 0.2s;
}

.whatsapp-message-input:focus {
    border-color: #008069;
    box-shadow: 0 0 0 3px rgba(0, 128, 105, 0.1);
}

.whatsapp-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.whatsapp-message-input::placeholder {
    color: #9ca3af;
}

.whatsapp-input-controls {
    position: absolute;
    right: 16px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-char-counter {
    font-size: 12px;
    color: #9ca3af;
    transition: color 0.2s;
    white-space: nowrap;
}

.whatsapp-char-counter-warning {
    color: #f59e0b;
}

.whatsapp-char-counter-error {
    color: #ef4444;
}

.whatsapp-microphone-btn {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-microphone-btn:hover {
    color: #008069;
}

.whatsapp-send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #008069 0%, #00a884 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 128, 105, 0.3);
}

.whatsapp-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 128, 105, 0.4);
}

.whatsapp-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.whatsapp-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.whatsapp-send-btn .fa-spin {
    animation: whatsapp-spin 1s linear infinite;
}

/* Status Bar */
.whatsapp-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
}

.whatsapp-status-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.whatsapp-status-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.whatsapp-status-item i {
    font-size: 11px;
}

.whatsapp-status-item .fa-lock {
    color: #22c55e;
}

.whatsapp-status-item .fa-history {
    color: #008069;
}

.whatsapp-status-text {
    display: none;
}

.whatsapp-status-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.whatsapp-status-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
}

.whatsapp-status-btn:hover {
    color: #1f2937;
}

.whatsapp-clear-btn:hover {
    color: #ef4444;
}

.whatsapp-status-divider {
    color: #d1d5db;
}

/* Animations */
@keyframes whatsapp-modal-enter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.whatsapp-modal-enter-start {
    opacity: 0;
    transform: translateY(16px);
}

.whatsapp-modal-enter-end {
    opacity: 1;
    transform: translateY(0);
}

@keyframes whatsapp-modal-leave {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.whatsapp-modal-leave-start {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-modal-leave-end {
    opacity: 0;
    transform: translateY(16px);
}

@keyframes whatsapp-attachment-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whatsapp-attachment-enter-start {
    opacity: 0;
    transform: translateY(8px);
}

.whatsapp-attachment-enter-end {
    opacity: 1;
    transform: translateY(0);
}

@keyframes whatsapp-attachment-leave {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(8px);
    }
}

.whatsapp-attachment-leave-start {
    opacity: 1;
    transform: translateY(0);
}

.whatsapp-attachment-leave-end {
    opacity: 0;
    transform: translateY(8px);
}

@keyframes whatsapp-message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes whatsapp-typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}

@keyframes whatsapp-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes whatsapp-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .whatsapp-modal-wrapper {
        height: 100vh;
        max-height: 100vh;
    }
    
    .whatsapp-modal-container {
        border-radius: 0;
    }
    
    .whatsapp-back-btn {
        display: flex;
    }
    
    .whatsapp-status-text {
        display: inline;
    }
    
    .whatsapp-status-item .whatsapp-status-text {
        display: none;
    }
    
    .whatsapp-attachment-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .whatsapp-status-right .whatsapp-status-divider,
    .whatsapp-status-right .whatsapp-clear-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .whatsapp-header-content {
        padding: 12px 16px;
    }
    
    .whatsapp-messages-content {
        padding: 16px 12px;
    }
    
    .whatsapp-input-area {
        padding: 8px;
    }
    
    .whatsapp-message-input {
        font-size: 16px;
    }
    
    .whatsapp-emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .whatsapp-chat-body {
        background: linear-gradient(180deg, #0c1317 0%, #1a2328 100%);
    }
    
    .whatsapp-chat-background {
        background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40L40 0H20L0 20m40 20V20L20 40' fill='%23ffffff' opacity='.05'/%3E%3C/svg%3E");
    }
    
    .whatsapp-input-area {
        background: linear-gradient(to bottom, #1f2c33, #1a2328);
        border-top-color: #2a3942;
    }
    
    .whatsapp-message-bubble-received {
        background: #2a3942;
        border-color: #374151;
        color: #e5e7eb;
    }
    
    .whatsapp-message-bubble-received::before {
        background: #2a3942;
        border-color: #374151;
    }
    
    .whatsapp-typing-bubble {
        background: #2a3942;
        border-color: #374151;
    }
    
    .whatsapp-welcome-card {
        background: #1f2937;
        border-color: #374151;
        color: #e5e7eb;
    }
    
    .whatsapp-welcome-info h4 {
        color: #f9fafb;
    }
    
    .whatsapp-welcome-message {
        color: #d1d5db;
    }
    
    .whatsapp-quick-question-btn {
        background: #1f2937;
        border-color: #374151;
        color: #d1d5db;
    }
    
    .whatsapp-quick-question-btn:hover:not(:disabled) {
        background: #2a3942;
    }
    
    .whatsapp-attachment-menu {
        background: #1f2937;
        border-color: #374151;
    }
    
    .whatsapp-emoji-tab {
        background: #2a3942;
        color: #d1d5db;
    }
    
    .whatsapp-emoji-tab:hover:not(.whatsapp-emoji-tab-active) {
        background: #374151;
    }
    
    .whatsapp-emoji-btn:hover {
        background: #374151;
    }
    
    .whatsapp-attachment-option {
        background: #2a3942;
    }
    
    .whatsapp-attachment-option:hover {
        background: #374151;
    }
    
    .whatsapp-attachment-label {
        color: #d1d5db;
    }
    
    .whatsapp-message-input {
        background: #2a3942;
        border-color: #374151;
        color: #e5e7eb;
    }
    
    .whatsapp-message-input::placeholder {
        color: #9ca3af;
    }
    
    .whatsapp-attachment-btn {
        background: #2a3942;
        color: #d1d5db;
    }
    
    .whatsapp-date-badge {
        background: rgba(255, 255, 255, 0.1);
        color: #9ca3af;
    }
    
    .whatsapp-messages-container::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .whatsapp-messages-container::-webkit-scrollbar-thumb:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }
}

/* Print Styles */
@media print {
    .whatsapp-chat-container {
        color: black !important;
        background: white !important;
    }
    
    .whatsapp-header {
        background: #008069 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .whatsapp-message-bubble-sent {
        background: #f0f0f0 !important;
        border: 1px solid #ccc !important;
    }
    
    .whatsapp-send-btn,
    .whatsapp-attachment-menu,
    .whatsapp-input-area {
        display: none !important;
    }
}