/*
 * Additions to build/css/style.css, whose sources are lost (see the README).
 * Loaded after it from app/templates/base.tpl.
 */

/* A select looks like the text inputs of the form, with an arrow of its own */
.course-subscribe-form .form-inputs select {
    font-family: Open Sans, sans-serif;
    display: block;
    width: 100%;
    padding: .5rem 2.5rem .5rem 1rem;
    border: 2px solid #fff;
    border-radius: 0;
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.7;
    text-align: left;
    color: rgba(14, 50, 58, .6);
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: .75rem auto;
    cursor: pointer;
    transition: color .3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.course-subscribe-form .form-inputs select:focus {
    color: #0e323a;
}

/* The total above the submit button: subtotal, gift card and total */
.course-subscribe-total {
    margin: 1.5rem 0 1rem;
    font-family: Open Sans, sans-serif;
    font-weight: 700;
}

.course-subscribe-total-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    padding: .25rem 0;
}

.course-subscribe-total-line[hidden] {
    display: none;
}

.course-subscribe-total-label {
    font-size: .8rem;
    text-transform: uppercase;
}

.course-subscribe-total-amount {
    font-size: .9rem;
}

.course-subscribe-total-remaining {
    width: 100%;
    font-family: Libre Baskerville, serif;
    font-size: .8rem;
    font-weight: 400;
    font-style: italic;
}

.course-subscribe-total-sum {
    margin-top: .25rem;
    padding-top: .5rem;
    border-top: 2px solid #fff;
}

.course-subscribe-total-vat {
    font-weight: 400;
    text-transform: none;
}

.course-subscribe-total-sum .course-subscribe-total-amount {
    font-size: 1.25rem;
}

/* What the gift card code lookup found wrong, as the form's own errors */
.course-subscribe-gift-card-check {
    margin: -.33333rem 0 1rem;
    font-family: Open Sans, sans-serif;
    font-size: .7rem;
    text-transform: uppercase;
}

/* Gift card page: the amounts that fill in the amount field */
.giftcard-reference {
    margin: 0 0 1.5rem;
}

.course-subscribe-form .giftcard-reference .course-prices {
    margin-top: 0;
}

.giftcard-reference-title {
    display: block;
    margin-bottom: .33333rem;
    font-family: Open Sans, sans-serif;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.course-subscribe-form .giftcard-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.course-subscribe-form .giftcard-amounts legend {
    width: 100%;
    margin-bottom: .33333rem;
    font-family: Open Sans, sans-serif;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.course-subscribe-form .giftcard-amount {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.course-subscribe-form .giftcard-amounts label {
    display: inline-block;
    margin: 0;
    padding: .5rem 1rem;
    border: 2px solid #fff;
    font-size: .8rem;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}

.course-subscribe-form .giftcard-amount:checked + label {
    color: #7a9a92;
    background-color: #fff;
}

.course-subscribe-form .giftcard-amount:focus-visible + label {
    outline: 2px solid #0e323a;
    outline-offset: 2px;
}

/* The footer's copyright line stays on the right without the maker's credit */
#copyright {
    justify-content: flex-end;
}

/* A notification at the bottom right that slides up and out again, as on
   A Two Dogs Company (public/assets/js/subscribe-form.js) */
.notifications {
    position: fixed;
    z-index: 999999;
    right: 1.5rem;
    bottom: 1.5rem;
    left: 1.5rem;
    display: flex;
    flex-direction: column-reverse;
    gap: .75rem;
    pointer-events: none;
}

@media screen and (min-width: 750px) {
    .notifications {
        left: auto;
        width: 26rem;
    }
}

.notification-toast {
    padding: 1rem 1.25rem;
    font-family: Open Sans, sans-serif;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    background-color: #0e323a;
    box-shadow: 0 .5rem 1.5rem rgba(14, 50, 58, .25);
    animation: notification-in .4s cubic-bezier(.2, .8, .2, 1) both,
        notification-out .4s cubic-bezier(.4, 0, 1, 1) 4s forwards;
}

.notification-toast--error {
    background-color: #e98e7b;
}

@keyframes notification-in {
    from { opacity: 0; transform: translateY(1rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes notification-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(1rem); }
}

@media (prefers-reduced-motion: reduce) {
    .notification-toast {
        animation: notification-out 0s linear 4.4s forwards;
    }
}

/* Home: the four buttons under the intro, in a row on a wide screen and
   two by two in between; long labels wrap onto a second line */
@media screen and (min-width: 750px) {
    #intro-nav ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 24rem));
        justify-content: center;
        gap: 1rem 2rem;
    }

    #intro-nav ul li {
        margin: 0;
    }

    #intro-nav ul li a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
    }
}

@media screen and (min-width: 1200px) {
    #intro-nav ul {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
}
