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

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

@font-face {
    font-family: 'Museo';
    src: url("/fonts/museo-500.woff") format('woff');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'Museo';
    src: url("/fonts/museo-300.woff") format('woff');
    font-weight: 400;
    font-display: swap;
}

* {
    font-family: "Museo", 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-40;
    }

    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-pink text-white;*/
/*}*/

/*.voice-type-wrapper {*/
/*    @apply border-c-pink border text-c-pink ;*/
/*}*/

.pig-spinner {
    perspective: 500px;
}

.pig-spinner img {
    transform-origin: center;
    animation: rotateYAnim 3s linear infinite;
}

@keyframes rotateYAnim {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

input[type=checkbox] + label.paywall-check:before {
    position: absolute;
}

.round {
    position: relative;
}

.round label:before {
    @apply bg-c-pink;
    border: 1px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    height: 28px;
    left: 10px;
    position: absolute;
    content: "";
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    z-index: 1;
}

.round label:after {
    border: 2px solid white;
    border-top: none;
    border-right: none;
    content: "";
    height: 6px;
    left: 20px;
    opacity: 0;
    position: absolute;
    top: calc(50% - 3px);
    transform: rotate(-45deg) translateY(-50%);
    width: 12px;
    z-index: 1;
}

.round input[type="radio"] {
    visibility: hidden;
}

.round input[type="radio"]:checked + label:before {
    @apply bg-c-pink border-white;
}

.round input[type="radio"]:checked + label:after {
    opacity: 1;
}

@keyframes pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

.pop-text {
    animation: pop 0.6s ease-out forwards;
}
