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

@layer base {
    html {
        scroll-behavior: smooth;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    body {
        @apply bg-gray-50 text-gray-900 font-sans;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        @apply font-display tracking-tight;
    }
}

@layer utilities {
    .custom-scrollbar::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    .custom-scrollbar::-webkit-scrollbar-track {
        @apply bg-gray-100;
    }

    .custom-scrollbar::-webkit-scrollbar-thumb {
        @apply bg-gray-300 rounded-full hover:bg-gray-400 transition-colors;
    }

    .parallax-bg {
        background-attachment: fixed;
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
    }

    .hero-parallax-bg {
        background-size: cover;
        background-position: center;
        transform: translateY(var(--parallax-offset, 0px));
        transition: transform 0.1s ease-out;
    }

    .glass-panel {
        @apply bg-white/80 backdrop-blur-md border border-white/20 shadow-xl;
    }

    .text-gradient {
        @apply bg-clip-text text-transparent bg-gradient-to-r from-trini-red to-trini-teal;
    }

    /* Animations */
    .animate-in {
        animation-duration: 0.3s;
        animation-fill-mode: both;
        animation-timing-function: ease-out;
    }

    .slide-in-from-right {
        animation-name: slideInFromRight;
    }

    .zoom-in {
        animation-name: zoomIn;
    }

    .fade-in {
        animation-name: fadeIn;
    }

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

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

    @keyframes zoomIn {
        from {
            transform: scale(0.95);
            opacity: 0;
        }

        to {
            transform: scale(1);
            opacity: 1;
        }
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}

/* Fitness App / Admin Dashboard Styles */
.admin-main {
    display: grid;
    grid-template-columns: 13% 87%;
    width: 100vw;
    height: 100vh;
    background: rgb(254, 254, 254);
    box-shadow: 0 0.5px 0 1px rgba(255, 255, 255, 0.23) inset,
        0 1px 0 0 rgba(255, 255, 255, 0.66) inset;
    z-index: 10;
}

.admin-menu {
    overflow: hidden;
    background: rgb(73, 57, 113);
    padding-top: 10px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.admin-menu h1 {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    margin: 20px 0 30px;
    color: #fff;
}

.admin-nav-item {
    position: relative;
    display: block;
}

.admin-nav-item a {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    padding: 15px 0;
    margin-left: 10px;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    cursor: pointer;
    text-decoration: none;
}

.admin-nav-item b:nth-child(1) {
    position: absolute;
    top: -15px;
    height: 15px;
    width: 100%;
    background: #fff;
    display: none;
}

.admin-nav-item b:nth-child(1)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-bottom-right-radius: 20px;
    background: rgb(73, 57, 113);
}

.admin-nav-item b:nth-child(2) {
    position: absolute;
    bottom: -15px;
    height: 15px;
    width: 100%;
    background: #fff;
    display: none;
}

.admin-nav-item b:nth-child(2)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-top-right-radius: 20px;
    background: rgb(73, 57, 113);
}

.admin-nav-item.active b:nth-child(1),
.admin-nav-item.active b:nth-child(2) {
    display: block;
}

.admin-nav-item.active a {
    text-decoration: none;
    color: #000;
    background: rgb(254, 254, 254);
}

.admin-content {
    display: grid;
    grid-template-columns: 75% 25%;
    height: 100%;
    overflow: hidden;
}

.admin-left-content {
    display: grid;
    grid-template-rows: 100%;
    /* Changed from 50% 50% to allow full height scrolling */
    background: #f6f7fb;
    margin: 15px;
    padding: 20px;
    border-radius: 15px;
    overflow-y: auto;
}

.admin-right-content {
    display: grid;
    grid-template-rows: 5% 20% 75%;
    background: #f6f7fb;
    margin: 15px 15px 15px 0;
    padding: 10px 0;
    border-radius: 15px;
}

.admin-card {
    background-color: #fff;
    margin: 0 10px;
    padding: 15px;
    border-radius: 15px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 3px;
}

.admin-btn {
    display: block;
    padding: 8px 24px;
    margin: 10px auto;
    font-size: 1.1rem;
    font-weight: 500;
    outline: none;
    text-decoration: none;
    color: #484b57;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    cursor: pointer;
}

.admin-btn:hover {
    transition-timing-function: cubic-bezier(0.6, 4, 0.3, 0.8);
    animation: gelatine 0.5s 1;
}

@keyframes gelatine {

    0%,
    100% {
        transform: scale(1, 1);
    }

    25% {
        transform: scale(0.9, 1.1);
    }

    50% {
        transform: scale(1.1, 0.9);
    }

    75% {
        transform: scale(0.95, 1.05);
    }
}

@media (max-width: 1500px) {
    .admin-main {
        grid-template-columns: 6% 94%;
    }

    .admin-menu h1 {
        display: none;
    }

    .admin-content {
        grid-template-columns: 70% 30%;
    }
}

@media (max-width: 1150px) {
    .admin-content {
        grid-template-columns: 60% 40%;
    }
}

@media (max-width: 910px) {
    .admin-main {
        grid-template-columns: 10% 90%;
    }

    .admin-content {
        grid-template-columns: 55% 45%;
    }
}

@media (max-width: 700px) {
    .admin-main {
        grid-template-columns: 15% 85%;
    }

    .admin-content {
        grid-template-columns: 100%;
        grid-template-rows: 45% 55%;
    }
}
/* Shimmer animation for skeleton loaders (used by AIProductListingDemo) */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
