/* ==========================================================
   Virtual Tour Creator - Stili comuni
   ========================================================== */

:root {
    /* Colori primari */
    --vt-primary: #2563eb;
    --vt-primary-hover: #1d4ed8;
    --vt-primary-light: #dbeafe;

    /* Colori secondari */
    --vt-secondary: #64748b;
    --vt-secondary-hover: #475569;

    /* Colori stato */
    --vt-success: #16a34a;
    --vt-warning: #d97706;
    --vt-danger: #dc2626;
    --vt-danger-hover: #b91c1c;
    --vt-info: #0891b2;

    /* Grigi */
    --vt-bg: #f8fafc;
    --vt-bg-card: #ffffff;
    --vt-border: #e2e8f0;
    --vt-border-hover: #cbd5e1;
    --vt-text: #1e293b;
    --vt-text-secondary: #64748b;
    --vt-text-muted: #94a3b8;

    /* Dark overlay */
    --vt-overlay: rgba(0, 0, 0, 0.5);
    --vt-overlay-light: rgba(0, 0, 0, 0.3);

    /* Dimensioni */
    --vt-radius: 8px;
    --vt-radius-sm: 4px;
    --vt-radius-lg: 12px;
    --vt-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --vt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Font */
    --vt-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --vt-font-mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;

    /* Transizioni */
    --vt-transition: 150ms ease;
}

/* Reset base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--vt-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--vt-text);
    background: var(--vt-bg);
    -webkit-font-smoothing: antialiased;
}

/* Utility */
.vt-hidden { display: none !important; }
.vt-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Bottoni */
.vt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--vt-font);
    line-height: 1.4;
    border: 1px solid transparent;
    border-radius: var(--vt-radius);
    cursor: pointer;
    transition: all var(--vt-transition);
    text-decoration: none;
    white-space: nowrap;
}

.vt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vt-btn-primary {
    background: var(--vt-primary);
    color: white;
}
.vt-btn-primary:hover:not(:disabled) {
    background: var(--vt-primary-hover);
}

.vt-btn-secondary {
    background: white;
    color: var(--vt-text);
    border-color: var(--vt-border);
}
.vt-btn-secondary:hover:not(:disabled) {
    border-color: var(--vt-border-hover);
    background: var(--vt-bg);
}

.vt-btn-danger {
    background: var(--vt-danger);
    color: white;
}
.vt-btn-danger:hover:not(:disabled) {
    background: var(--vt-danger-hover);
}

.vt-btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.vt-btn-icon {
    padding: 6px;
    width: 32px;
    height: 32px;
    justify-content: center;
}

/* Input */
.vt-input,
.vt-select,
.vt-textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    font-family: var(--vt-font);
    line-height: 1.4;
    color: var(--vt-text);
    background: white;
    border: 1px solid var(--vt-border);
    border-radius: var(--vt-radius);
    transition: border-color var(--vt-transition);
}

.vt-input:focus,
.vt-select:focus,
.vt-textarea:focus {
    outline: none;
    border-color: var(--vt-primary);
    box-shadow: 0 0 0 3px var(--vt-primary-light);
}

.vt-textarea {
    resize: vertical;
    min-height: 80px;
}

.vt-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--vt-text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vt-form-group {
    margin-bottom: 16px;
}

/* Badge */
.vt-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vt-badge-draft { background: #fef3c7; color: #92400e; }
.vt-badge-published { background: #d1fae5; color: #065f46; }
.vt-badge-archived { background: #e2e8f0; color: #475569; }

/* Toast notifiche */
.vt-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vt-toast {
    padding: 12px 20px;
    background: var(--vt-text);
    color: white;
    border-radius: var(--vt-radius);
    box-shadow: var(--vt-shadow-lg);
    font-size: 13px;
    animation: vt-toast-in 300ms ease;
    max-width: 400px;
}

.vt-toast-success { background: var(--vt-success); }
.vt-toast-error { background: var(--vt-danger); }
.vt-toast-warning { background: var(--vt-warning); }

@keyframes vt-toast-in {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Modal */
.vt-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--vt-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    animation: vt-fade-in 200ms ease;
}

.vt-modal {
    background: white;
    border-radius: var(--vt-radius-lg);
    box-shadow: var(--vt-shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: auto;
}

.vt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--vt-border);
}

.vt-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.vt-modal-body {
    padding: 20px;
}

.vt-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--vt-border);
}

@keyframes vt-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Spinner */
.vt-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--vt-border);
    border-top-color: var(--vt-primary);
    border-radius: 50%;
    animation: vt-spin 600ms linear infinite;
}

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

/* Scrollbar custom */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--vt-border-hover);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--vt-secondary);
}
