/**
 * Interactive Chat Styles
 * Styles for multi-choice buttons and interactive elements
 */

/* Multi-choice container */
.sfpe-multichoice {
    margin: 1rem 0;
    animation: fadeInUp 0.3s ease;
}

.sfpe-choice-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

/* Choice buttons */
.sfpe-choice-btn {
    background: linear-gradient(135deg, #1b5059 0%, #2a6a73 100%);
    color: #FFFFFF;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sfpe-choice-btn:hover {
    background: linear-gradient(135deg, #6CFFC4 0%, #4ACC9F 100%);
    color: #0D353E;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 255, 196, 0.3);
}

.sfpe-choice-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sfpe-choice-btn.sfpe-choice-selected {
    background: linear-gradient(135deg, #6CFFC4 0%, #4ACC9F 100%);
    color: #0D353E;
    border-color: #6CFFC4;
    box-shadow: 0 0 0 3px rgba(108, 255, 196, 0.2);
}

/* Choice button animation */
.sfpe-choice-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.sfpe-choice-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Pulse animation for selection */
.sfpe-choice-pulse {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Continue button */
.sfpe-continue-container {
    margin: 1rem 0;
}

.sfpe-continue-btn {
    background: linear-gradient(135deg, #6CFFC4 0%, #4ACC9F 100%);
    color: #0D353E;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(108, 255, 196, 0.3);
}

.sfpe-continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 255, 196, 0.4);
}

.sfpe-continue-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.sfpe-continue-btn.sfpe-loading {
    position: relative;
    color: transparent;
}

.sfpe-continue-btn.sfpe-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #0D353E;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s ease infinite;
}

/* Arrow icon */
.sfpe-arrow-icon {
    transition: transform 0.3s ease;
}

.sfpe-continue-btn:hover .sfpe-arrow-icon {
    transform: translateX(3px);
}

/* Text input container */
.sfpe-text-input-container {
    margin: 1rem 0;
}

.sfpe-interactive-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.sfpe-interactive-input {
    flex: 1;
    background: rgba(27, 80, 89, 0.3);
    border: 2px solid #1b5059;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: #FFFFFF;
    transition: all 0.3s ease;
}

.sfpe-interactive-input:focus {
    outline: none;
    border-color: #6CFFC4;
    background: rgba(27, 80, 89, 0.5);
    box-shadow: 0 0 0 3px rgba(108, 255, 196, 0.1);
}

.sfpe-interactive-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.sfpe-submit-btn {
    background: linear-gradient(135deg, #6CFFC4 0%, #4ACC9F 100%);
    color: #0D353E;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sfpe-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 255, 196, 0.3);
}

/* Typing indicator for interactive responses */
.sfpe-typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 0;
}

.sfpe-typing-indicator span {
    width: 8px;
    height: 8px;
    background: #6CFFC4;
    border-radius: 50%;
    animation: typing-bounce 1.4s ease-in-out infinite;
}

.sfpe-typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.sfpe-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.sfpe-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive design */
@media (max-width: 768px) {
    .sfpe-choice-container {
        max-width: 100%;
    }
    
    .sfpe-choice-btn {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .sfpe-interactive-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sfpe-submit-btn {
        width: 100%;
    }
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .sfpe-choice-btn {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .sfpe-interactive-input {
        background: rgba(13, 53, 62, 0.5);
        border-color: #164147;
    }
}

/* Integration with existing chat styles */
.sfpe-message .sfpe-multichoice {
    margin-top: 1rem;
}

.sfpe-message .sfpe-continue-container {
    margin-top: 0.75rem;
}

.sfpe-message .sfpe-text-input-container {
    margin-top: 0.75rem;
}