/* Dark mode theme colors */
:root {
    --eodms-bg-color: #121212;
    --eodms-text-color: #ffffff;
    --eodms-accent-pink: #DF678C;
    --eodms-accent-purple: #3D155F;
    --eodms-message-bg: #1E1E1E;
    --eodms-message-self-bg: #2D2D2D;
    --eodms-border-color: #333333;
    --eodms-input-bg: #1E1E1E;
    --eodms-hover-color: #2A2A2A;
    --eodms-shadow-color: rgba(0, 0, 0, 0.2);
}

/* Container styles */
.eodms-container {
    display: flex;
    flex-direction: column;
    height: 600px;
    background-color: var(--eodms-bg-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px var(--eodms-shadow-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Messages container */
.eodms-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    background: linear-gradient(to bottom, 
        rgba(61, 21, 95, 0.05) 0%,
        rgba(223, 103, 140, 0.05) 100%
    );
}

/* Loading spinner */
.eodms-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: rgba(18, 18, 18, 0.9);
    padding: 20px;
    border-radius: 12px;
    z-index: 1000;
    box-shadow: 0 4px 12px var(--eodms-shadow-color);
}

.eodms-loading-text {
    color: var(--eodms-text-color);
    margin-top: 12px;
    font-size: 14px;
    font-weight: 500;
}

.eodms-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--eodms-message-bg);
    border-top-color: var(--eodms-accent-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Message styles */
.eodms-message {
    display: flex;
    margin-bottom: 20px;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    transition: transform 0.2s ease;
}

.eodms-message-other {
    justify-content: flex-start;
}

.eodms-message-self {
    justify-content: flex-end;
}

.eodms-message:hover {
    transform: translateY(-1px);
}

.eodms-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    background-color: var(--eodms-message-bg);
    box-shadow: 0 2px 8px var(--eodms-shadow-color);
    transition: box-shadow 0.2s ease;
}

.eodms-message-content:hover {
    box-shadow: 0 4px 12px var(--eodms-shadow-color);
}

.eodms-message-self .eodms-message-content {
    background-color: var(--eodms-message-self-bg);
    color: var(--eodms-text-color);
}

.eodms-message-text {
    color: var(--eodms-text-color);
    line-height: 1.5;
    margin-bottom: 8px;
    word-wrap: break-word;
}

/* Message meta information */
.eodms-message-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.7);
}

.eodms-message-other .eodms-message-meta {
    align-items: flex-start;
}

.eodms-message-sender {
    font-weight: 600;
    color: var(--eodms-text-color);
    margin-bottom: 2px;
}

.eodms-message-time {
    font-size: 0.9em;
    opacity: 0.8;
}

/* Message types with colored accents */
.eodms-type-customer .eodms-message-content {
    border-left: 3px solid var(--eodms-accent-pink);
}

.eodms-type-creator .eodms-message-content {
    border-left: 3px solid var(--eodms-accent-purple);
}

.eodms-type-manager .eodms-message-content {
    border-left: 3px solid #4CAF50;
}

/* Type-specific sender colors */
.eodms-type-customer .eodms-message-sender {
    color: var(--eodms-accent-pink);
}

.eodms-type-creator .eodms-message-sender {
    color: var(--eodms-accent-purple);
}

.eodms-type-manager .eodms-message-sender {
    color: #4CAF50;
}

/* Message form */
.eodms-message-form {
    display: flex;
    padding: 20px;
    background-color: var(--eodms-bg-color);
    border-top: 1px solid var(--eodms-border-color);
}

#eodms-message-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 16px;
    margin-right: 12px;
    background-color: var(--eodms-input-bg);
    border: 2px solid var(--eodms-border-color);
    border-radius: 12px;
    color: var(--eodms-text-color);
    resize: vertical;
    transition: all 0.2s ease;
    font-size: 14px;
}

#eodms-message-input:focus {
    outline: none;
    border-color: var(--eodms-accent-pink);
    box-shadow: 0 0 0 2px rgba(223, 103, 140, 0.2);
}

#eodms-send-message {
    padding: 0 24px;
    background-color: var(--eodms-accent-pink);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 100px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#eodms-send-message:hover {
    background-color: #c85577;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(223, 103, 140, 0.3);
}

#eodms-send-message:active {
    transform: translateY(0);
}

#eodms-send-message:disabled {
    background-color: var(--eodms-border-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Custom scrollbar */
.eodms-messages {
    scrollbar-width: thin;
    scrollbar-color: var(--eodms-accent-pink) var(--eodms-bg-color);
}

.eodms-messages::-webkit-scrollbar {
    width: 8px;
}

.eodms-messages::-webkit-scrollbar-track {
    background: var(--eodms-bg-color);
    border-radius: 4px;
}

.eodms-messages::-webkit-scrollbar-thumb {
    background-color: var(--eodms-accent-pink);
    border-radius: 4px;
    border: 2px solid var(--eodms-bg-color);
}

.eodms-messages::-webkit-scrollbar-thumb:hover {
    background-color: #c85577;
}

/* Perfect Scrollbar customization */
.ps__rail-y {
    background-color: transparent !important;
    width: 8px !important;
}

.ps__thumb-y {
    background-color: var(--eodms-accent-pink) !important;
    width: 8px !important;
    border-radius: 4px !important;
    opacity: 0.8 !important;
}

.ps__thumb-y:hover {
    background-color: #c85577 !important;
    opacity: 1 !important;
}

/* Error states */
.eodms-error {
    color: #ff4444;
    padding: 16px;
    text-align: center;
    background-color: rgba(255, 68, 68, 0.1);
    border-radius: 12px;
    margin: 20px;
    border: 1px solid rgba(255, 68, 68, 0.2);
}

/* No messages state */
.eodms-no-messages {
    text-align: center;
    padding: 40px 20px;
    color: var(--eodms-text-color);
    font-style: italic;
    opacity: 0.7;
    background-color: var(--eodms-message-bg);
    border-radius: 12px;
    margin: 20px;
    border: 1px dashed var(--eodms-border-color);
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .eodms-container {
        height: calc(100vh - 60px);
        border-radius: 0;
    }

    .eodms-message-content {
        max-width: 85%;
    }

    #eodms-message-input {
        font-size: 16px; /* Better for mobile typing */
    }
} 