/**
  * Global styles used by Django templates
 */

a.dotted {
    text-decoration: none;
    border-bottom: 1px #106ba3 dotted;
    color: #106ba3;
}

.fake-link {
    color: #106ba3;
    border-bottom: 1px #106ba3;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed !important;
}

@-webkit-keyframes scrollSmall {
    0% {
        transform: rotate(-13deg) translateY(0);
    }

    to {
        transform: rotate(-13deg) translateY(-639px);
    }
}

@keyframes scrollSmall {
    0% {
        transform: rotate(-13deg) translateY(0);
    }

    to {
        transform: rotate(-13deg) translateY(-639px);
    }
}

@-webkit-keyframes scrollLarge {
    0% {
        transform: rotate(-13deg) translateY(0);
    }

    to {
        transform: rotate(-13deg) translateY(-1278px);
    }
}

@keyframes scrollLarge {
    0% {
        transform: rotate(-13deg) translateY(0);
    }

    to {
        transform: rotate(-13deg) translateY(-1278px);
    }
}

.scroll-bg {
    -webkit-animation-name: scrollSmall;
    animation-name: scrollSmall;
    -webkit-animation-duration: 15s;
    animation-duration: 15s;
    -webkit-animation-timing-function: linear;
    animation-timing-function: linear;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
}

@media (min-width: 1024px) {
    .scroll-bg {
        -webkit-animation-name: scrollLarge;
        animation-name: scrollLarge;
        -webkit-animation-duration: 35s;
        animation-duration: 35s;
        -webkit-animation-timing-function: linear;
        animation-timing-function: linear;
        -webkit-animation-iteration-count: infinite;
        animation-iteration-count: infinite;
    }
}

.max-w-prose {
    max-width: 65ch;
}

/* Disable prose list margin inside of pres */

pre {
    ol,
    li {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
}

/* iframe fix for blogposts */

.prose {
    iframe {
        max-width: 100%;
    }
}

/* Disable default select arrow in favour of Tailwind's */

select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    text-indent: 1px !important;
    text-overflow: "" !important;
}

.h-extension-public {
    /*
     * 100vh : page height
     * 4rem : navbar height
     * 5.6rem : header height
     */
    height: calc(100vh - 9.6rem);
}

.h-extension-org {
    /*
     * 100vh : page height
     * 5.6rem : header height
     */
    height: calc(100vh - 5.6rem);
}

.crispy-form {
    /* django-crispy form overrides */
    label {
        @apply block text-sm font-medium text-gray-700 mb-2;
    }

    input[type="checkbox"] {
        @apply focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300 rounded;
    }

    div.pointer-events-none {
        /* Hide extra select arrow created by crispy */
        svg {
            display: none;
        }
    }
}

tr.htmx-swapping {
    opacity: 0;
    transition: opacity 1s ease-out;
}
