@import "green-audio.css";
@import "apple.css";

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

* {
    font-family: "Manrope", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;

    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

.pt-safe {
    padding-top: calc(env(safe-area-inset-top) + 1rem);
}

.pb-safe {
    padding-bottom: calc(env(safe-area-inset-bottom) + 1rem);
}

@layer components {
    .button {
        @apply w-full bg-white text-center rounded-xl py-3 font-semibold text-2xl inline-block;
    }

    .button-white {
        @apply w-full border border-black text-center rounded-xl py-3 font-semibold text-xl inline-block;
    }
}

.apple-icon {
    position: relative;
}

.apple-icon:before {
    content: '';
    background: url("/images/apple.svg");
    display: inline-block;
    width: 22px;
    height: 22px;
    left: 1rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

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

@keyframes fade-out {
    to {
        opacity: 0;
    }
}

@keyframes slide-from-right {
    from {
        transform: translateX(60px);
    }
}

@keyframes slide-up {
    from {
        transform: translateY(130px);
    }
}

@keyframes slide-to-left {
    to {
        transform: translateX(-30px);
    }
}

/* Global but more fancy */
html[data-turbo-visit-direction="forward"]::view-transition-old(*) {
    animation: 90ms cubic-bezier(0.4, 0, 1, 1) both fade-out,
    300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-to-left;
}

html[data-turbo-visit-direction="forward"]::view-transition-new(*) {
    animation: 210ms cubic-bezier(0, 0, 0.2, 1) 90ms both fade-in,
    300ms cubic-bezier(0.4, 0, 0.2, 1) both slide-from-right;
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.loading {
    opacity: 0.5;
    animation: blink 1s infinite linear;
}

@keyframes blink {
    0% {
        @apply opacity-80;
    }

    50% {
        @apply opacity-60;
    }

    100% {
        @apply opacity-80;
    }
}

@keyframes smooth-appear {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
.show {
    animation: smooth-appear 0.5s ease forwards;
}

*:not(input):not(textarea) {
    -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */
}

.voice-type:checked + label {
    @apply bg-c-purple text-white;
}

.voice-type + label {
    @apply border-c-purple border text-c-purple ;
}
