﻿/* https://stripe-payments-demo.appspot.com/ */
/* https://github.com/stripe/stripe-payments-demo/tree/master/public */

* {
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: none;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 15px;
    line-height: 1.4em;
}

.slash-through {
    text-decoration: line-through;
    color: white;
}

/* Checkout */

#checkout {
    position: absolute;
    /*max-width: 480px;*/
    margin: 0 auto;
    padding: 30px 0;
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.5s linear 0.5s;
}

#main.checkout #checkout {
    visibility: visible;
    opacity: 1;
}

section {
    display: flex;
    flex-direction: column;
    position: relative;
    text-align: left;
}

#confirmation h1 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 500;
}

#payment-form {
    margin: 0 -30px;
    padding: 20px 30px 30px;
    border-radius: 4px;
    border: 1px solid #e8e8fb;
}

/* Form */

fieldset {
    margin-bottom: 20px;
    background: #fff;
    box-shadow: 0 1px 3px 0 rgba(50, 50, 93, 0.15), 0 4px 6px 0 rgba(112, 157, 199, 0.15);
    border-radius: 4px;
    border: none;
    font-size: 0;
}

    fieldset label {
        position: relative;
        display: flex;
        flex-direction: row;
        height: 42px;
        padding: 10px 0;
        align-items: center;
        justify-content: center;
        color: #8898aa;
        font-weight: 400;
    }

        fieldset label:not(:last-child) {
            border-bottom: 1px solid #f0f5fa;
        }

        fieldset label.state {
            display: inline-flex;
            width: 75%;
        }

    fieldset:not(.with-state) label.state {
        display: none;
    }

    fieldset label.zip {
        display: inline-flex;
        width: 25%;
        padding-right: 60px;
    }

    fieldset:not(.with-state) label.zip {
        width: 100%;
    }

    fieldset label span {
        min-width: 125px;
        padding: 0 15px;
        text-align: right;
    }

    fieldset .redirect label span {
        width: 100%;
        text-align: center;
    }

p.instruction {
    display: inline-table;
    margin-top: -32px;
    padding: 0 5px;
    text-align: center;
    background: #f8fbfd;
}

p.tip {
    margin: -10px auto 10px;
    padding: 5px 0 5px 30px;
    font-size: 14px;
    background: url(/images/tip.svg) left center no-repeat;
}

span#generate {
    cursor: pointer;
    color: #525f7f;
    text-decoration: underline;
}

    span#generate:hover {
        text-decoration: none;
    }

.field {
    flex: 1;
    padding: 0 15px;
    background: transparent;
    font-weight: 400;
    color: #31325f;
    outline: none;
    cursor: text;
}

    .field::-webkit-input-placeholder {
        color: #aab7c4;
    }

    .field::-moz-placeholder {
        color: #aab7c4;
    }

    .field:-ms-input-placeholder {
        color: #aab7c4;
    }

fieldset .select::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 5px;
    right: 20px;
    top: 50%;
    margin-top: -2px;
    background-image: url(/images/dropdown.svg);
    pointer-events: none;
}

input {
    flex: 1;
    border-style: none;
    outline: none;
    color: #313b3f;
}

select {
    flex: 1;
    border-style: none;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    color: #313b3f;
    cursor: pointer;
    background: transparent;
}

    select:focus {
        color: #666ee8;
    }

::-webkit-input-placeholder {
    color: #cfd7e0;
}

::-moz-placeholder {
    color: #cfd7e0;
    opacity: 1;
}

:-ms-input-placeholder {
    color: #cfd7e0;
}

input:-webkit-autofill,
select:-webkit-autofill {
    -webkit-text-fill-color: #666ee8;
    transition: background-color 100000000s;
    -webkit-animation: 1ms void-animation-out 1s;
}

.StripeElement--webkit-autofill {
    background: transparent !important;
}

#card-element {
    margin-top: -1px;
}

button {
    display: block;
    background: rgb(55, 202, 55);
    color: #fff;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    border: 0;
    font-weight: 700;
    width: 100%;
    height: 40px;
    outline: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

    button:focus {
        background: #555abf;
    }

    button:hover {
        transform: translateY(-1px);
        box-shadow: 0 7px 14px 0 rgba(50, 50, 93, 0.1), 0 3px 6px 0 rgba(0, 0, 0, 0.08);
    }

    button:active {
        background: #43458b;
    }

#payment-methods,
.payment-info {
    display: none;
}

    .payment-info:not(.card) {
        margin-bottom: 15px;
    }

    #payment-methods.visible,
    .payment-info.visible {
        display: block;
    }

    .payment-info.card.visible {
        text-align: center;
    }

    .payment-info p.notice {
        font-size: 14px;
        color: #8898aa;
        text-align: left;
    }

.element-errors {
    display: inline-flex;
    height: 20px;
    margin: 15px auto 0;
    padding-left: 20px;
    color: #e25950;
    opacity: 0;
    transform: translateY(10px);
    transition-property: opacity, transform;
    transition-duration: 0.35s;
    transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
    background-size: 15px 15px;
}

.element-errors.visible {
    opacity: 1;
    transform: none;
}

.element-errors:not(.visible) {
    display: none;
}

#validated-message-section:not(.visible) {
    display: none;
}

.card-number {
    padding-left: 8px;
    white-space: nowrap;
    font-family: Source Code Pro, monospace;
    color: #0d2b3e;
    font-weight: 500;
}

    .card-number span {
        display: inline-block;
        width: 8px;
    }

/* Order Confirmation */

#confirmation {
    display: flex;
    align-items: center;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    visibility: hidden;
    overflow-x: hidden;
    opacity: 0;
    background: #f8fbfd;
    text-align: left;
    transition: visibility 0s, opacity 0.5s linear 0.5s;
}

#main.success #confirmation{
    visibility: visible;
    opacity: 1;
}

#confirmation h1 {
    font-size: 42px;
    font-weight: 300;
    color: #6863d8;
    letter-spacing: 0.3px;
    margin-bottom: 30px;
}

#confirmation .status {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 75px 0 275px;
    max-width: 75%;
    height: 350px;
    margin: 100px auto;
    box-shadow: 0 1px 3px 0 rgba(50, 50, 93, 0.15);
    border-radius: 6px;
}

#confirmation .status p {
        margin: 0 0 15px;
    }

    #confirmation .status li {
        margin-bottom: 5px;
        list-style: none;
    }

#main.success:not(.processing) #confirmation .status.processing,
#main.success:not(.receiver) #confirmation .status.receiver {
    display: none;
}

#main.processing #confirmation .status.success,
#main.receiver #confirmation .status.success {
    display: none;
}

/* Media Queries */

@media only screen and (max-width: 800px) {
    #payment-request {
        padding-top: 0;
        min-height: 80px;
    }

    #confirmation .status {
        width: auto;
        height: auto;
        margin: 30px;
    }
}

@media only screen and (max-width: 500px) {
    .header {
        height: 60px;
        background-size: 40px 40px;
    }

    #payment-form {
        margin: 0;
        padding: 15px 15px;
        border-width: 2px 0 0 0;
        border-radius: 0;
    }

    .payment-info span {
        display: none;
    }

    fieldset {
        margin-bottom: 15px;
    }

        fieldset label.state,
        fieldset label.zip {
            display: flex;
            width: inherit;
            padding: 10px 0;
        }

    p.instruction {
        margin-top: -12px;
        font-size: 14px;
    }

    p.tip {
        margin-bottom: 0;
        font-size: 13px;
    }

    #checkout {
        margin-bottom: 0;
    }

    #confirmation .status {
        width: auto;
        height: auto;
        padding: 120px 15px 15px;
        background-size: 68px 86px;
        box-shadow: 0 1px 3px 0 rgba(50, 50, 93, 0.15);
        border-radius: 6px;
    }

    #confirmation h1 {
        text-align: center;
    }
}
