/**
 * Made Host Assistant - Frontend Styles
 * Styled to work with most WordPress themes
 */

/* Main Container */
.d2l-made-host-assistant {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    margin: 20px 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Conversation Interface */
.d2l-made-conversation {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 400px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.d2l-made-conversation-header {
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.d2l-made-conversation-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.d2l-made-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: 400px;
}

.d2l-made-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

.d2l-made-message-user {
    flex-direction: row-reverse;
}

.d2l-made-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.d2l-made-message-assistant .d2l-made-message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.d2l-made-message-user .d2l-made-message-avatar {
    background: #e9ecef;
}

.d2l-made-message-system .d2l-made-message-avatar {
    background: #6c757d;
}

.d2l-made-message-content {
    flex: 1;
    max-width: 75%;
}

.d2l-made-message-assistant .d2l-made-message-content {
    background: #f8f9fa;
    padding: 10px 14px;
    border-radius: 12px;
    border-top-left-radius: 4px;
}

.d2l-made-message-user .d2l-made-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 14px;
    border-radius: 12px;
    border-top-right-radius: 4px;
}

.d2l-made-message-system .d2l-made-message-content {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px 14px;
    border-radius: 12px;
}

.d2l-made-message-content p {
    margin: 0;
    word-wrap: break-word;
}

/* Chat input (Made als eerste aanspreekpunt) */
.d2l-made-chat-input-wrap {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e0e0e0;
    background: #fff;
    flex-shrink: 0;
}
.d2l-made-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}
.d2l-made-chat-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}
.d2l-made-chat-send {
    padding: 10px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.d2l-made-chat-send:hover {
    opacity: 0.95;
}
.d2l-made-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Agent Options */
.d2l-made-agent-options {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.d2l-made-agent-options h5 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.d2l-made-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.d2l-made-option-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.d2l-made-option-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
}

.d2l-made-option-card:active {
    transform: translateY(-2px);
}

.d2l-made-option-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.d2l-made-option-content {
    width: 100%;
}

.d2l-made-option-content h6 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.d2l-made-option-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 500;
    color: #667eea;
}

.d2l-made-option-description {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .d2l-made-options-grid {
        grid-template-columns: 1fr;
    }
    
    .d2l-made-chat-messages {
        max-height: 300px;
    }
}

/* Accessibility */
.d2l-made-option-card:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}
