/* CBC Chatbot Frontend Styles */
.cbc-chatbot-container {
    max-width: 900px;
    margin: 40px auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cbc-chatbot-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 3px solid #4F46E5;
}

.cbc-bot-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

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

.cbc-bot-info h3 {
    margin: 0;
    font-size: 24px;
    color: #1e293b;
    font-weight: 700;
}

.cbc-bot-status {
    color: #10b981;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.cbc-bot-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.cbc-chatbot-messages {
    background: white;
    padding: 30px;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
}

.cbc-message {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    animation: slideIn 0.4s ease-out;
}

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

.cbc-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.cbc-message-content {
    flex: 1;
    background: #f8fafc;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cbc-message-content p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: #334155;
}

.cbc-message-content p:last-child {
    margin-bottom: 0;
}

.cbc-file-preview {
    margin-top: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.cbc-file-preview img {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cbc-file-details {
    display: grid;
    gap: 10px;
    margin: 15px 0;
}

.cbc-file-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-size: 14px;
}

.cbc-file-detail strong {
    color: #1e293b;
}

.cbc-price-tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 20px;
    font-weight: 700;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.cbc-chatbot-input-area {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-top: 3px solid #4F46E5;
}

.cbc-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.cbc-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.cbc-input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    color: #334155;
    transition: all 0.3s ease;
}

.cbc-input-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.cbc-search-button {
    width: 100%;
    padding: 16px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cbc-search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.cbc-search-button:active {
    transform: translateY(0);
}

.cbc-spinner {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.cbc-spinner .path {
    stroke: white;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.cbc-pay-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.cbc-pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Modal Styles */
.cbc-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cbc-modal-content {
    background: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    position: relative;
    animation: slideDown 0.4s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cbc-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.3s ease;
}

.cbc-modal-close:hover {
    color: #64748b;
}

.cbc-success-content {
    text-align: center;
}

.cbc-success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.cbc-success-content h2 {
    color: #10b981;
    margin-bottom: 10px;
}

.cbc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    margin: 20px 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cbc-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.cbc-modal-close-btn {
    background: #64748b;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.cbc-modal-close-btn:hover {
    background: #475569;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cbc-chatbot-container {
        margin: 20px;
        border-radius: 15px;
    }
    
    .cbc-input-grid {
        grid-template-columns: 1fr;
    }
    
    .cbc-chatbot-header {
        padding: 20px;
    }
    
    .cbc-bot-info h3 {
        font-size: 20px;
    }
    
    .cbc-chatbot-messages {
        padding: 20px;
    }
    
    .cbc-modal-content {
        margin: 10% 20px;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .cbc-chatbot-header {
        flex-direction: column;
        text-align: center;
    }
    
    .cbc-message {
        flex-direction: column;
    }
    
    .cbc-search-button {
        font-size: 16px;
        padding: 14px 20px;
    }
}