@import "tailwindcss";

@plugin '@tailwindcss/forms' {
    strategy: class;
}

@plugin '@tailwindcss/typography';

@custom-variant dark (&:where(.dark, .dark *));

@source "../views";
@source "../../../extensions/**/*.blade.php";
@source "../../../extensions/Servers/Proxmox";
@source "../../../extensions/Others/Pages";

@theme {
    /* Font Family (loaded from Google Fonts in layouts/app.blade.php) */
    --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
    --font-display: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;

    --animate-wiggle: wiggle 1s ease-in-out infinite;
    @keyframes wiggle {
        0%,
        100% {
            transform: rotate(-20deg);
        }
        50% {
            transform: rotate(20deg);
        }
    }

    --animate-float: float 6s ease-in-out infinite;
    @keyframes float {
        0%,
        100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-10px);
        }
    }

    --animate-pulse-ring: pulse-ring 2s ease-out infinite;
    @keyframes pulse-ring {
        0% {
            box-shadow: 0 0 0 0 hsl(var(--color-success) / 0.6);
        }
        100% {
            box-shadow: 0 0 0 8px hsl(var(--color-success) / 0);
        }
    }
}

@theme inline {
    /* Branding Colors */
    --color-primary: hsl(var(--color-primary));
    --color-secondary: hsl(var(--color-secondary));

    /* Neutral Colors */
    --color-neutral: hsl(var(--color-neutral));

    /* Text Colors */
    --color-base: hsl(var(--color-base));
    --color-muted: hsl(var(--color-muted));
    --color-inverted: hsl(var(--color-inverted));

    /* State Colors */
    --color-success: hsl(var(--color-success));
    --color-error: hsl(var(--color-error));
    --color-warning: hsl(var(--color-warning));
    --color-inactive: hsl(var(--color-inactive));
    --color-info: hsl(var(--color-info));

    /* Background Colors */
    --color-background: hsl(var(--color-background));
    --color-background-secondary: hsl(var(--color-background-secondary));
}

/*
The default border color has changed to `currentColor` in Tailwind CSS v4,
so we've added these compatibility styles to make sure everything still
looks the same as it did with Tailwind CSS v3.
*/
@layer base {
    *,
    ::after,
    ::before,
    ::backdrop,
    ::file-selector-button {
        border-color: hsl(var(--color-neutral));
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    }

    h1,
    h2,
    h3,
    h4 {
        font-family: var(--font-display);
        letter-spacing: -0.02em;
    }

    ::selection {
        background: hsl(var(--color-primary) / 0.35);
        color: hsl(var(--color-base));
    }
}

/* ---------------------------------------------------------------------------
   Utilities
--------------------------------------------------------------------------- */

@utility card {
    @apply bg-background-secondary rounded-2xl border border-neutral text-base;
}

@utility container {
    @apply max-w-[1280px] mx-auto px-4 sm:px-6 lg:px-8;
}

@utility text-nowrap {
    text-wrap: nowrap;
}

@utility text-wrap {
    text-wrap: wrap;
}

/* Violet -> magenta gradient text */
@utility text-gradient {
    background-image: linear-gradient(
        100deg,
        hsl(var(--color-primary)) 0%,
        hsl(var(--color-secondary)) 55%,
        hsl(var(--color-primary)) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@utility bg-gradient-brand {
    background-image: linear-gradient(
        135deg,
        hsl(var(--color-primary)) 0%,
        hsl(var(--color-secondary)) 100%
    );
}

/* Card with a subtle top highlight and hover lift */
@utility card-glow {
    @apply relative rounded-2xl border border-neutral bg-background-secondary transition duration-300;
    background-image: linear-gradient(
        180deg,
        hsl(var(--color-primary) / 0.06) 0%,
        transparent 40%
    );

    &:hover {
        border-color: hsl(var(--color-primary) / 0.45);
        box-shadow:
            0 0 0 1px hsl(var(--color-primary) / 0.15),
            0 20px 50px -20px hsl(var(--color-primary) / 0.45);
        transform: translateY(-2px);
    }
}

/* Translucent blurred surface (nav, floating panels) */
@utility glass {
    background-color: hsl(var(--color-background) / 0.72);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
}

/* Faint grid pattern used behind heros */
@utility bg-grid {
    background-image:
        linear-gradient(hsl(var(--color-neutral) / 0.55) 1px, transparent 1px),
        linear-gradient(90deg, hsl(var(--color-neutral) / 0.55) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* Blurred color orb for hero backgrounds */
@utility orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(90px);
    pointer-events: none;
}

@utility eyebrow {
    @apply inline-flex items-center gap-2 rounded-full border px-3 py-1 text-xs font-semibold uppercase tracking-wider;
    border-color: hsl(var(--color-primary) / 0.35);
    background-color: hsl(var(--color-primary) / 0.1);
    color: hsl(var(--color-primary));
}

@utility status-dot {
    @apply inline-block size-2 rounded-full bg-success animate-pulse-ring;
}

/* ---------------------------------------------------------------------------
   Product descriptions: turn plain <ul> lists into check-mark spec lists
--------------------------------------------------------------------------- */

@utility spec-list {
    & ul {
        list-style: none;
        padding-left: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 0.6rem;
    }

    & li {
        position: relative;
        padding-left: 1.75rem;
        margin: 0;
        color: hsl(var(--color-base) / 0.85);
    }

    & li::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0.2em;
        width: 1.1rem;
        height: 1.1rem;
        border-radius: 9999px;
        background-color: hsl(var(--color-primary) / 0.15);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a78bfa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
        background-size: 0.7rem;
        background-position: center;
        background-repeat: no-repeat;
    }

    & li::marker {
        content: none;
    }

    & p {
        margin: 0 0 0.75rem;
        color: hsl(var(--color-muted));
    }

    & strong {
        color: hsl(var(--color-base));
    }
}

/* Prose tuned to the palette */
.prose {
    --tw-prose-links: hsl(var(--color-primary));
    --tw-prose-invert-links: hsl(var(--color-primary));
    --tw-prose-bullets: hsl(var(--color-primary));
    --tw-prose-invert-bullets: hsl(var(--color-primary));
}

@import "./easymde.css";

/* ---------------------------------------------------------------------------
   Scrollbar
--------------------------------------------------------------------------- */

::-webkit-scrollbar {
    background: transparent;
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-thumb {
    border: solid 0 rgb(0 0 0 / 0%);
    border-right-width: 4px;
    border-left-width: 4px;
    -webkit-border-radius: 9px 4px;
    -webkit-box-shadow:
        inset 0 0 0 1px hsl(var(--color-primary) / 0.7),
        inset 0 0 0 4px hsl(var(--color-primary) / 0.7);
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-track-piece {
    background: transparent;
    margin: 4px 0;
}

::-webkit-scrollbar-thumb:horizontal {
    border-right-width: 0;
    border-left-width: 0;
    border-top-width: 4px;
    border-bottom-width: 4px;
    -webkit-border-radius: 4px 9px;
}

::-webkit-scrollbar-corner {
    background: transparent;
}
