/* Universal ZapVix AI - Frontend Styles */

.uzai-shortcode-container {
    --uzai-primary: #0073aa;
    --uzai-primary-hover: #005a87;
    --uzai-success: #46b450;
    --uzai-error: #dc3232;
    --uzai-warning: #ffb900;
    --uzai-info: #00a0d2;
    --uzai-border: #ddd;
    --uzai-background: #f9f9f9;
    --uzai-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --uzai-radius: 8px;
    --uzai-transition: all 0.3s ease;
    
    max-width: 600px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Header */
.uzai-shortcode-header {
    text-align: center;
    margin-bottom: 30px;
}

.uzai-shortcode-header h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.uzai-agent-info {
    background: var(--uzai-background);
    padding: 10px 15px;
    border-radius: var(--uzai-radius);
    display: inline-block;
}

.uzai-agent-name {
    font-size: 14px;
    color: #666;
}

.uzai-agent-name strong {
    color: #333;
}

/* Form */
.uzai-shortcode-form {
    background: white;
    border-radius: var(--uzai-radius);
    box-shadow: var(--uzai-shadow);
    padding: 30px;
    border: 1px solid var(--uzai-border);
}

/* Upload Area */
.uzai-upload-area {
    margin-bottom: 25px;
}

.uzai-upload-dropzone {
    border: 2px dashed #ccc;
    border-radius: var(--uzai-radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--uzai-transition);
    background: #fafafa;
}

.uzai-upload-dropzone:hover,
.uzai-upload-dropzone.uzai-dragover {
    border-color: var(--uzai-primary);
    background: rgba(0, 115, 170, 0.05);
    transform: translateY(-2px);
}

.uzai-upload-icon {
    margin-bottom: 15px;
    color: #999;
}

.uzai-upload-icon svg {
    width: 48px;
    height: 48px;
}

.uzai-upload-dropzone h4 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 500;
    color: #333;
}

.uzai-upload-dropzone p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Selected File */
.uzai-file-selected {
    border: 1px solid var(--uzai-border);
    border-radius: var(--uzai-radius);
    padding: 20px;
    background: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.uzai-file-icon {
    color: var(--uzai-primary);
    flex-shrink: 0;
}

.uzai-file-icon svg {
    width: 32px;
    height: 32px;
}

.uzai-file-details {
    flex: 1;
}

.uzai-file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    word-break: break-word;
}

.uzai-file-size {
    font-size: 12px;
    color: #666;
}

.uzai-remove-file {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--uzai-transition);
    flex-shrink: 0;
}

.uzai-remove-file:hover {
    background: #f0f0f0;
    color: var(--uzai-error);
}

.uzai-remove-file svg {
    width: 16px;
    height: 16px;
}

/* Upload Info */
.uzai-upload-info {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--uzai-background);
    border-radius: var(--uzai-radius);
    flex-wrap: wrap;
}

.uzai-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.uzai-info-item svg {
    width: 14px;
    height: 14px;
    color: #999;
}

/* Progress */
.uzai-progress-container {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--uzai-background);
    border-radius: var(--uzai-radius);
}

.uzai-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.uzai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--uzai-success), #5cbf60);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.uzai-progress-text {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

/* Form Actions */
.uzai-form-actions {
    text-align: center;
    margin-bottom: 20px;
}

.uzai-upload-btn {
    background: var(--uzai-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--uzai-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--uzai-transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
    justify-content: center;
}

.uzai-upload-btn:hover:not(:disabled) {
    background: var(--uzai-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.uzai-upload-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.uzai-upload-btn svg {
    width: 16px;
    height: 16px;
}

/* Messages */
.uzai-messages {
    margin-top: 20px;
}

.uzai-message {
    padding: 12px 16px;
    border-radius: var(--uzai-radius);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: uzai-fade-in 0.3s ease;
}

.uzai-message-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.uzai-message-content svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.uzai-message-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0;
    margin-left: 10px;
}

.uzai-message-close:hover {
    opacity: 1;
}

.uzai-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.uzai-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.uzai-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .uzai-shortcode-container {
        margin: 15px;
        max-width: none;
    }
    
    .uzai-shortcode-form {
        padding: 20px;
    }
    
    .uzai-upload-dropzone {
        padding: 30px 15px;
    }
    
    .uzai-upload-dropzone h4 {
        font-size: 16px;
    }
    
    .uzai-upload-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .uzai-file-selected {
        padding: 15px;
        gap: 10px;
    }
    
    .uzai-file-name {
        font-size: 14px;
    }
    
    .uzai-upload-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .uzai-message {
        padding: 10px 12px;
    }
    
    .uzai-message-content {
        gap: 8px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .uzai-shortcode-header h3 {
        font-size: 20px;
    }
    
    .uzai-upload-dropzone {
        padding: 25px 10px;
    }
    
    .uzai-upload-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .uzai-file-selected {
        flex-direction: column;
        text-align: center;
    }
    
    .uzai-file-details {
        order: 1;
    }
    
    .uzai-file-icon {
        order: 2;
    }
    
    .uzai-remove-file {
        order: 3;
        align-self: center;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .uzai-upload-dropzone {
        border-color: #000;
        background: #fff;
    }
    
    .uzai-upload-dropzone:hover,
    .uzai-upload-dropzone.uzai-dragover {
        border-color: var(--uzai-primary);
        background: #f0f8ff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .uzai-upload-dropzone:hover {
        transform: none;
    }
    
    .uzai-upload-btn:hover:not(:disabled) {
        transform: none;
    }
}

/* Print styles */
@media print {
    .uzai-shortcode-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .uzai-upload-btn,
    .uzai-progress-container,
    .uzai-remove-file {
        display: none;
    }
}

/* Focus styles for accessibility */
.uzai-upload-dropzone:focus,
.uzai-upload-btn:focus,
.uzai-remove-file:focus,
.uzai-message-close:focus {
    outline: 2px solid var(--uzai-primary);
    outline-offset: 2px;
}

/* Custom scrollbar for messages */
.uzai-messages::-webkit-scrollbar {
    width: 4px;
}

.uzai-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.uzai-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.uzai-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}
