/**
 * GENESIS v12.7 — CONSTITUTIONAL CONVERSATION ENGINE STYLES
 */

.cce-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
    max-height: 80vh;
    background: linear-gradient(135deg, #0a0a0f 0%, #12121a 100%);
    border-radius: 16px;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.cce-header {
    padding: 24px 32px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cce-genesis-mark {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cce-logo {
    font-size: 28px;
    color: #00d4aa;
    text-shadow: 0 0 20px rgba(0, 212, 170, 0.4);
}

.cce-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.5px;
}

.cce-subtitle {
    margin-top: 4px;
    margin-left: 40px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.cce-conversation {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cce-message {
    max-width: 85%;
    animation: cce-fade-in 0.3s ease-out;
}

@keyframes cce-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cce-message-genesis { align-self: flex-start; }
.cce-message-participant { align-self: flex-end; }

.cce-message-content {
    padding: 16px 20px;
    border-radius: 16px;
    line-height: 1.6;
    font-size: 15px;
}

.cce-message-genesis .cce-message-content {
    background: rgba(0, 212, 170, 0.08);
    border: 1px solid rgba(0, 212, 170, 0.15);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.cce-message-participant .cce-message-content {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.cce-message-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cce-message-genesis .cce-message-label {
    color: rgba(0, 212, 170, 0.7);
}

.cce-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.cce-typing-dot {
    width: 8px;
    height: 8px;
    background: rgba(0, 212, 170, 0.6);
    border-radius: 50%;
    animation: cce-typing 1.4s infinite;
}

.cce-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.cce-typing-dot:nth-child(3) { animation-delay: 0.4s; }

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

.cce-journey-preview {
    display: none;
    padding: 20px 32px;
    background: rgba(0, 212, 170, 0.03);
    border-top: 1px solid rgba(0, 212, 170, 0.1);
}

.cce-journey-title {
    font-size: 14px;
    font-weight: 600;
    color: #00d4aa;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cce-journey-elements {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cce-journey-element {
    padding: 6px 12px;
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    animation: cce-element-appear 0.4s ease-out;
}

@keyframes cce-element-appear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.cce-input-area {
    padding: 20px 32px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cce-input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.cce-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    min-height: 48px;
    max-height: 120px;
    transition: border-color 0.2s, background 0.2s;
}

.cce-input:focus {
    outline: none;
    border-color: rgba(0, 212, 170, 0.4);
    background: rgba(255, 255, 255, 0.07);
}

.cce-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.cce-send-btn {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    border: none;
    border-radius: 12px;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cce-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.3);
}

.cce-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cce-hint {
    margin-top: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

.cce-conversation::-webkit-scrollbar { width: 6px; }
.cce-conversation::-webkit-scrollbar-track { background: transparent; }
.cce-conversation::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
.cce-conversation::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* Full-page conversation experience */
.cce-fullpage {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #0a0a0f;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cce-fullpage .cce-container {
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 100%;
}

/* Embedded conversation widget */
.cce-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 420px;
    height: 600px;
    z-index: 9998;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    overflow: hidden;
}

.cce-widget .cce-container {
    height: 100%;
    max-height: 100%;
}

/* Conversation trigger button */
.cce-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 212, 170, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 9997;
}

.cce-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 212, 170, 0.5);
}

.cce-trigger-icon {
    font-size: 28px;
    color: #000;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cce-widget {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .cce-header { padding: 16px 20px; }
    .cce-conversation { padding: 16px 20px; }
    .cce-input-area { padding: 16px 20px 20px; }
    .cce-journey-preview { padding: 16px 20px; }
}
