/**
 * UI Builder Custom Styles
 * 
 * Module độc lập, không sử dụng style của CMS chính
 * Sử dụng Tailwind CSS từ CDN
 */

@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom Fonts */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Custom Utilities */
.font-mono {
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Preview Frame Styles */
#preview-wrapper {
    transition: width 0.3s ease-in-out, max-width 0.3s ease-in-out;
}

/* Code blocks */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

pre code {
    display: block;
}

/* Form improvements */
input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Table hover effect */
tbody tr {
    transition: background-color 0.15s ease-in-out;
}

/* Button effects */
button,
a.button {
    transition: all 0.15s ease-in-out;
}

button:active,
a.button:active {
    transform: scale(0.98);
}

/* Flash messages animation */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-enter {
    animation: slideIn 0.3s ease-out;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Responsive preview container */
.preview-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 400px;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Card hover effect */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Custom pagination styles */
nav[role="navigation"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Syntax highlighting for code */
.code-json {
    color: #d73a49;
}

.code-string {
    color: #032f62;
}

.code-number {
    color: #005cc5;
}

.code-boolean {
    color: #d73a49;
}

.code-null {
    color: #6f42c1;
}

