/* OKO Connector - shadcn/ui Inspired Styles */

/* CSS Variables for consistent theming */
:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 221.2 83.2% 53.3%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96%;
    --accent-foreground: 222.2 84% 4.9%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221.2 83.2% 53.3%;
    --radius: 0.375rem;
}

body {
    margin: 0;
}


/* Crisp sidebar compatibility */
.crisp-sidebar {
    /* min-height: 100vh; */
    background: hsl(var(--background));
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-feature-settings: "rlig" 1, "calt" 1;
}

.crisp-1mwrtf {
    position: relative;
}

.crisp-1bvfn1j {
    background: hsl(var(--background));
    border-radius: var(--radius);
}

/* Loading spinner */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid hsl(var(--muted));
    border-top: 2px solid hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

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

/* Skeleton loading animation */
.skeleton {
    background: linear-gradient(90deg, hsl(var(--muted)) 25%, hsl(var(--border)) 50%, hsl(var(--muted)) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Button styles - shadcn/ui inspired */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: colors 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
    outline: none;
    padding: 0.5rem 0.75rem;
    height: 2.25rem;
    min-width: 2.25rem;
    text-decoration: none;
    user-select: none;
    box-sizing: border-box;
}

.btn:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Primary button (admin) */
.btn-admin {
    background-color: transparent;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
}

.btn-admin:hover {
    background-color: hsl(var(--muted) / 0.5);
}

/* Secondary button (website) */
.btn-website {
    background-color: transparent;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
}

.btn-website:hover {
    background-color: hsl(var(--muted) / 0.5);
}

/* Destructive button (map) */
.btn-map {
    background-color: transparent;
    color: hsl(var(--foreground));
    border: 1px solid hsl(var(--border));
}

.btn-map:hover {
    background-color: hsl(var(--muted) / 0.5);
}

/* Store section styling - compact card design */
.store-section {
    margin: 0.5rem;
    padding: 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--card));
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.store-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: hsl(var(--card-foreground));
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.store-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.store-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.2s;
    height: 2.25rem;
    box-sizing: border-box;
}

/* Icon spacing */
.lucide {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .crisp-sidebar {
        /* min-height: 300px; */
    }

    .crisp-1bvfn1j {
        padding: 0;
    }

    .store-section {
        padding: 0.5rem;
    }

    .btn {
        padding: 0.375rem 0.5rem;
        height: 2rem;
        font-size: 0.8125rem;
    }
}

/* Dark theme support */
[data-theme="dark"] {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
    --primary: 217.2 91.2% 59.8%;
    --primary-foreground: 222.2 84% 4.9%;
    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
}

.crisp-theme-dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --border: 217.2 32.6% 17.5%;
}

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

::-webkit-scrollbar-track {
    background: hsl(var(--muted));
    border-radius: 2px;
}

::-webkit-scrollbar-thumb {
    background: hsl(var(--muted-foreground) / 0.3);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--muted-foreground) / 0.5);
}

/* Utility classes to replace Tailwind */
.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.p-3 {
    padding: 0.75rem;
}

.mt-0\.5 {
    margin-top: 0.125rem;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.bg-red-50 {
    background-color: #fef2f2;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.border {
    border-width: 1px;
}

.border-blue-200 {
    border-color: #bfdbfe;
}

.border-red-200 {
    border-color: #fecaca;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.rounded-md {
    border-radius: 0.375rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.font-medium {
    font-weight: 500;
}

.text-blue-800 {
    color: #1e40af;
}

.text-blue-600 {
    color: #2563eb;
}

.text-red-800 {
    color: #991b1b;
}

.text-red-600 {
    color: #dc2626;
}

.text-red-500 {
    color: #ef4444;
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-600 {
    color: #4b5563;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-3 {
    width: 0.75rem;
}

.h-3 {
    height: 0.75rem;
}

.h-7 {
    height: 1.75rem;
}

.w-full {
    width: 100%;
}

.w-24 {
    width: 6rem;
}

.w-20 {
    width: 5rem;
}

.w-3\/4 {
    width: 75%;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.min-w-0 {
    min-width: 0px;
}

.hidden {
    display: none;
}

.space-y-3>*+* {
    margin-top: 0.75rem;
}

.space-y-2>*+* {
    margin-top: 0.5rem;
}

.space-y-1\.5>*+* {
    margin-top: 0.375rem;
}

/* Clipboard feedback styles */
.clipboard-feedback {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.clipboard-feedback.success {
    background-color: hsl(142 71% 45%);
    color: white;
}

.clipboard-feedback.error {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}