/* ===== RENTENOVA CHATBOT ACTIONS STYLES ===== */
/* Visuelle Effekte für Bot-gesteuerte UI-Interaktionen */

/* ===== BOT FEEDBACK CONTAINER ===== */

.bot-action-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.bot-feedback {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateX(450px);
    opacity: 0;
    transition: all 0.3s ease;
}

.bot-feedback.show {
    transform: translateX(0);
    opacity: 1;
}

.bot-feedback-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.bot-feedback-text {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

/* Feedback Types */
.bot-feedback-info {
    border-left: 4px solid #667eea;
}

.bot-feedback-success {
    border-left: 4px solid #10b981;
}

.bot-feedback-error {
    border-left: 4px solid #ef4444;
}

.bot-feedback-warning {
    border-left: 4px solid #f59e0b;
}

/* ===== FIELD HIGHLIGHTING ===== */

/* Wenn Bot ein Feld ausfüllt */
.bot-filling {
    animation: botFillPulse 0.8s ease-in-out;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.4) !important;
    border-color: #667eea !important;
}

@keyframes botFillPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.2);
    }
}

/* Typing Effect */
.bot-filling::after {
    content: '🤖';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    animation: botTyping 0.6s ease-in-out infinite;
}

@keyframes botTyping {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50%) scale(1.2);
    }
}

/* ===== BUTTON CLICKING ===== */

/* Wenn Bot einen Button klickt */
.bot-clicking {
    animation: botClickEffect 0.3s ease;
    transform-origin: center;
}

@keyframes botClickEffect {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(0.95);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Bot-Cursor Effect */
.bot-clicking::before {
    content: '👆';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    animation: botPointDown 0.3s ease;
}

@keyframes botPointDown {
    0% {
        opacity: 0;
        top: -40px;
    }
    50% {
        opacity: 1;
        top: -30px;
    }
    100% {
        opacity: 0;
        top: -20px;
    }
}

/* ===== CONFIRMATION MODAL ===== */

.bot-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.bot-confirmation-modal.show {
    opacity: 1;
    pointer-events: all;
}

.bot-confirmation-content {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95), 
        rgba(255, 255, 255, 0.9)
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: confirmSlideUp 0.3s ease;
}

@keyframes confirmSlideUp {
    from {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.bot-confirmation-content h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bot-confirmation-content p {
    color: #666;
    margin: 10px 0;
    font-size: 16px;
}

.bot-confirmation-details {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
}

.bot-confirmation-details strong {
    color: #667eea;
    font-size: 16px;
    display: block;
    margin-bottom: 10px;
}

.bot-confirmation-details pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    color: #333;
    overflow-x: auto;
    margin: 10px 0 0 0;
}

.bot-confirmation-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.bot-confirmation-buttons button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-confirm-yes {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-confirm-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-confirm-no {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.btn-confirm-no:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* ===== SYSTEM MESSAGE STYLING ===== */

.message-system {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.2), 
        rgba(118, 75, 162, 0.2)
    );
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    text-align: center;
    padding: 10px 15px;
    border-radius: 20px;
    margin: 10px auto;
    max-width: 80%;
    font-size: 14px;
    font-weight: 500;
}

/* ===== BOT ACTION INDICATOR ===== */

/* Zeigt an, dass Bot gerade eine Aktion ausführt */
.bot-action-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    animation: actionIndicatorPulse 1.5s ease-in-out infinite;
}

@keyframes actionIndicatorPulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 10px 40px rgba(102, 126, 234, 0.6);
    }
}

.bot-action-indicator .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ===== FIELD HINTS ===== */

/* Zeigt an, welche Felder der Bot als nächstes ausfüllen wird */
.bot-field-hint {
    position: absolute;
    top: -30px;
    left: 0;
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1000;
    animation: hintBounce 0.5s ease;
}

@keyframes hintBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.bot-field-hint::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #667eea;
}

/* ===== MOBILE RESPONSIVE ===== */

@media (max-width: 768px) {
    .bot-action-feedback {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .bot-confirmation-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .bot-confirmation-buttons {
        flex-direction: column;
    }
    
    .bot-confirmation-buttons button {
        width: 100%;
    }
}

/* ===== ACCESSIBILITY ===== */

.bot-confirmation-buttons button:focus {
    outline: 3px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .bot-filling,
    .bot-clicking,
    .bot-feedback,
    .bot-confirmation-content,
    .bot-action-indicator {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== DARK MODE ===== */

@media (prefers-color-scheme: dark) {
    .bot-feedback {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .bot-feedback-text {
        color: rgba(255, 255, 255, 0.9);
    }
    
    .bot-confirmation-content {
        background: linear-gradient(135deg, 
            rgba(30, 30, 30, 0.95), 
            rgba(20, 20, 20, 0.9)
        );
    }
    
    .bot-confirmation-content h3 {
        color: white;
    }
    
    .bot-confirmation-content p {
        color: rgba(255, 255, 255, 0.7);
    }
    
    .bot-confirmation-details pre {
        background: rgba(255, 255, 255, 0.05);
        color: rgba(255, 255, 255, 0.9);
    }
}
