@font-face {
    font-family: 'GT Cinetype';
    src: url('../fonts/GT-Cinetype-Bold.woff') format('woff'),
         url('../fonts/GT-Cinetype-Bold.woff2') format('woff2'),
         url('../fonts/GT-Cinetype-Bold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'GT Cinetype';
    src: url('../fonts/GT-Cinetype-Regular.woff') format('woff'),
         url('../fonts/GT-Cinetype-Regular.woff2') format('woff2'),
         url('../fonts/GT-Cinetype-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'GT Flexa';
    src: url('../fonts/GT-Flexa-Standard-Regular.woff') format('woff'),
    url('../fonts/GT-Flexa-Standard-Regular.woff2') format('woff2'),
    url('../fonts/GT-Flexa-Standard-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

:root {
    --headingFontFamily: 'GT Flexa', sans-serif;
    --headingFontWeight: 400;

    --bodyFontFamily: 'GT Cinetype', sans-serif;
    --bodyFontWeight: 400;

    --boldFontWeight: 600;

    --buttonFontFamily: var(--bodyFontFamily);
    --buttonFontWeight: 600;

    --borderRadius: 8px;

    --primaryColor: #00362F;
    --borderColor: #D8D8D8;
    --grey: #808080;
    --bodyBackgroundColor: #f3f3f3;
    --red: #FF4040; /* #E42500; */
    --light-red: #FBDED9;
    --green: #46E9A3;

    --max-page-width: 520px; /* 480px; */
    
}

* {
    box-sizing: border-box;
}

html,body {
    margin:0;
}

body {
    display: flex;
    flex-direction: row;
    overflow-x:hidden;
    padding:16px;
}

/*
******************************
LOADING
******************************
*/

.loading {
    position: relative;
    width:100%;
    height:100%;
    display: none;
    text-align: center;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index:1000;
}

.loading.full-screen {
    position:fixed;
    top:0;
    left:0;
    width:100vw;
    height:100vh;
    background:var(--bodyBackgroundColor);
    z-index:1000;
}

.loading.is-loading {
    display: flex;
}

.loading:before {
    content: " ";
    display: inline-block;
    margin-bottom: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 4px solid #000;
    border-color: #000 transparent #000 transparent;
    animation: icon-loading 1.2s linear infinite;
}
@keyframes icon-loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/*
  //////////////////////////////
    TYPE
  //////////////////////////////
*/
html, body {
    font-family:var(--bodyFontFamily);
    font-weight:var(--bodyFontWeight);
    font-size:16px;
    line-height: 1.2;
    background:#fff;
}

h1,h2,h3,h4,h5 {
    font-family:var(--headingFontFamily);
    font-weight:var(--headingFontWeight);
}

p {
    margin:0 0 16px 0;
}

small {
    font-size: 0.8em;
}

details > summary {
    list-style: none;
}

details > summary::marker,
details > summary::-webkit-details-marker {
    display: none;
}

.heading {
    font-family:var(--headingFontFamily);
    font-weight:var(--headingFontWeight);
    line-height: 1.1;
    margin-top:0;
    margin-bottom:24px;
}

.heading-card {
    font-family:var(--headingFontFamily);
    font-weight:var(--headingFontWeight);
    font-size:18px;
    margin-top:0;
    margin-bottom:24px;
}

/*
  //////////////////////////////
    BUTTONS
  //////////////////////////////
*/
a {
    color:#000;
}

a:hover,
a:focus {
    color:var(--primaryColor);
}

button {
    border:none;
    background:transparent;
    font-size:1em;
    font-family:var(--bodyFontFamily);
    font-weight:var(--bodyFontWeight);
    cursor:pointer;
}

button:focus,
button:hover {
    outline: 0;
}

.button {
    font-family:var(--buttonFontFamily);
    font-weight:var(--buttonFontWeight);
    font-size:1em;
    align-items: center;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    line-height: 1.3;
    padding: 15px 16px;
    text-decoration: none;
    transition: all .14s ease-out;
    white-space: nowrap;
    width:100%;
    color:#000;
    margin-bottom:16px;
    background:transparent;
    border: 1px solid var(--borderColor);
    height:52px;
}

.button:hover, 
.button:focus {
    border-color:var(--primaryColor);
    color:var(--primaryColor);
}

.button.is-disabled,
.button.is-disabled:hover,
.button.is-disabled:focus,
.button:disabled {
    pointer-events: none;
    cursor: default;
}

.button-primary {
    background: var(--primaryColor);
    border:none;
    color:#fff;
    min-height:48px;
}

.button-primary:hover, 
.button-primary:focus {
    filter: brightness(0.85);
    border-color:var(--primaryColor);
    color:#fff;
}

.button-primary.is-disabled,
.button-primary.is-disabled:hover,
.button-primary.is-disabled:focus,
.button-primary:disabled {
    pointer-events: none;
    cursor: default;
    opacity:0.5;
}

.button-primary.is-loading {
    pointer-events: none;
    cursor: not-allowed;
}

.button-primary.is-loading:before {
    content: " ";
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    border-color: #fff transparent #fff transparent;
    animation: icon-loading 1.2s linear infinite;
}
@keyframes icon-loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

[type="submit"] {margin:0;}

.divider {
    display: flex;
    align-items: center;
    color:var(--borderColor);
    margin:24px 0;
    gap: 16px;
}

.divider:before,
.divider:after {
    content:"";
    background:var(--borderColor);
    display: flex;
    height:1px;
    width:100%;
}

/*
  //////////////////////////////
    CHECKOUT
 //////////////////////////////
*/
#amount-selector {
    margin-top: 16px;
    display: none;
    margin-bottom:0;
}
#amount-selector #amount{
    margin-bottom:0;
}

#checkout.is-loading .loading {
    min-height:200px;
    display: flex;
}

#checkout.is-loading #payment-methods {
    display:none;
}

.icon-prefix {
    position: absolute;
    top: 45px;
    left: 16px;
    z-index: 1;
}

#amount {
    padding-left:32px;
    margin-bottom:16px;
}

#payment-card {
    display: none;
    margin-top:16px;
}

#payment-card fieldset {
    margin: 0;
}

#payment-summary {
    display: none;
}

#payment-summary .card-fee {
    display: none;
}

#payment-summary .button-primary {
    margin:0;
}

.payment-paypal,
.payment-paypal:focus {
    background:#C5E3FB;
    border:none;
}

.payment-paypal:hover {
    filter: brightness(0.9);
}

.skeleton {
    display: inline-block;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #DCDCDC; /* #efefef; */
    border-radius: 4px;
}

.skeleton:after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
    content: '';
}

.skeleton-label {
    position: absolute;
    top:0;
    left:0;
    height:19px;
    width:50%;
}

.skeleton-card {
    height: 54px;
}

@keyframes shimmer {
    100% {
      transform: translateX(100%);
    }
  }

.StripeElement {
    font-size:1em;
    font-family: var(--bodyFontFamily);
    font-weight: var(--bodyFontWeight);
    width:100%;
    border:1px solid var(--borderColor);
    border-radius: 4px;
    position: relative;
    padding:16px;
}

.StripeElement--invalid {
    border-color: var(--red);
}

/* #card-errors {
    color: var(--red);
    margin: -16px 0 24px 0;
    text-align: left;
    display: none;
} */

#card-errors {
    color: var(--red);
    background: rgb(228,37,0,.08);
    padding:16px;
    margin-top:16px;
    width:100%;
    border-radius:4px;
    text-align: center;
    display: none;
}

.payment-summary dt {
    color: var(--primaryColor);
}

.payment-summary .dt-large {
    font-size: 18px;
    font-weight:500;
}

/*
 //////////////////////////////
 CONFIRMATION
 //////////////////////////////
*/
.confirmation-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: "GT Flexa", sans-serif;
    gap: 8px;
    border-bottom:1px solid var(--borderColor);
    padding-bottom:24px;
    margin-bottom:24px;
}

.confirmation-header .title {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap:8px;
    width:100%;
}

.confirmation-header .title h2 {
    font-size: 18px;
    flex: 2;
    margin:0;
    text-align: left;
    color: var(--green);
}

.confirmation-header .payment-amount {
    font-size: 2.4em;
    font-family: var(--headingFontFamily);
    font-weight: var(--headingFontWeight);
}

.confirmation-header .payment-date {
    color: var(--grey);
    margin:0;
    font-family: var(--bodyFontFamily);
    font-weight: var(--bodyFontWeight);
}

.invoice-download {
    border:none;
    margin-bottom:0;
    gap: 8px;
}

.invoice-download object {
    width:20px;
}

.confirmation-header {
    text-align:center;
    margin-bottom:24px;
}

.confirmation-header h2 {
    margin:0;
    font-size:2.4em;
}

.confirmation-header h3 {
    color:var(--borderColor);
    font-size:1em;
    margin:8px 0 0 0;
}

/*
 //////////////////////////////
 INPUTS
 //////////////////////////////
*/
input, textarea, select {
    padding:16px;
    font-size:1em;
    font-family: var(--bodyFontFamily);
    font-weight: var(--bodyFontWeight);
    width:100%;
    border:1px solid var(--borderColor);
    border-radius: 4px;
    position: relative;
}

input::placeholder, textarea::placeholder, select::placeholder {
    color:var(--borderColor);
}

input:hover,
input:focus,
textarea:hover,
textarea:focus,
select:hover,
select:focus {
    outline: 0;
}


.alert {
    padding-left:8px;
    margin-top:12px;
    text-align:left;
    font-size: 0.8em;
    color:var(--red);
}

fieldset {
    border:none;
    padding:0;
    margin:0 0 24px 0;
    position:relative;
}

fieldset.is-error input,
fieldset.is-error textarea,
fieldset.is-error select {
    border-color: var(--red);
    color: var(--red);
}

fieldset.is-error label {
    color: var(--red);
}

fieldset small {
    color:var(--iinp);
    font-size: 0.8em;
    margin-top: 12px;
    display: block;
    padding: 0 16px;
}

fieldset small.align-right {
    text-align: right;
}

label {
    display: block;
    font-size: 1em;
    color:#000;
    margin-bottom:8px;
    padding-left:8px;
}

/*
 //////////////////////////////
 RADIO COMPONENT
 //////////////////////////////
*/

.radio-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.radio-input {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    gap: 16px;
    margin-bottom:2px;
    padding: 16px;
    border-radius: 4px;
    width: 100%;
    border: 1px solid transparent;
}

.radio-label {
    flex-grow: 1;
    display: flex;
    align-content: flex-start;
    justify-content: start;
}

.radio-icon {
    height: 24px;
    width: 24px;
    border:1px solid var(--primaryColor);
    border-radius: 50%;
}

.radio-input:hover ~ .radio-icon,
.radio-input:focus ~ .radio-icon,
.radio-input input:checked ~ .radio-icon {
    border-width: 7px;
}

.radio-input.is-enabled, 
.radio-input:hover, 
.radio-input:focus {
    border: 1px solid var(--primaryColor);
}

/* RADIO BUTTONS */
.radio-buttons {
    flex-direction: row;
    gap:16px;
}

.radio-button-input {
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    user-select: none;
    margin-bottom:0;
    padding: 16px 8px;
    border-radius: 4px;
    width: 100%;
    align-self: stretch;
    border: 1px solid var(--borderColor);
}

.radio-button-label {
    display: flex;
    text-align: center;
    flex-direction: column;
    height:100%;
    justify-content: center;
}

.radio-button-input.is-enabled, 
.radio-button-input:hover, 
.radio-button-input:focus {
    border: 1px solid var(--primaryColor);
}

.radio-input input,
.radio-button-input input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* .radio-icon:after {
    content: "";
    position: absolute;
    display: none;
} */

/* .radio-container input:checked ~ .radio-icon:after {
    display: block;
} */

/* .radio-container .radio-icon:after {
    top: 9px;
    left: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
} */

/*
 //////////////////////////////
 INVOICE
 //////////////////////////////
*/
.invoice-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: "GT Flexa", sans-serif;
    gap: 8px;
    border-bottom:1px solid var(--borderColor);
    padding-bottom:24px;
    margin-bottom:24px;
}

.invoice-header .title {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap:16px;
    width:100%;
}

.invoice-header .title h2 {
    font-size: 18px;
    flex: 2;
    margin:0;
}

.invoice-header .title .status {
    padding:6px 8px;
    border-radius:4px;
    text-align:left;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    font-size: 0.9em;
    text-transform: uppercase;
    line-height: 1;
    background:var(--light-red);
    color:var(--red);
    font-family: var(--bodyFontFamily);
    font-weight: 600;
    display: none;
}

.invoice-header .date-due {
    display: flex;
    flex-direction: row;
    color: var(--grey);
    gap: 8px;
    align-items: center;
    margin-top:8px;
}

.invoice-header .amount-due {
    font-size: 2.4em;
    font-family: var(--headingFontFamily);
    font-weight: var(--headingFontWeight);
}

.invoice-header.is-overdue h2,
.invoice-header.is-overdue .amount-due {
    color:var(--red);
}

.invoice-header.is-overdue .status {
    display: inline-flex;
}

.invoice-download {
    border:none;
    margin-bottom:0;
    gap: 8px;
}

.invoice-download object {
    width:20px;
}


/* Instalments */
/* .invoice-instalments {
    position: relative;
    padding:16px 0 24px 0;
    margin:0;
    border-bottom:1px solid var(--borderColor);
    display: none;
} */

/* .invoice-instalments:before {
    content: "";
    height:calc(100% - 24px);
    width:1px;
    background:var(--borderColor);
    position: absolute;
    top:0px;
    left:20px;
}

.invoice-instalments li {
    display: flex;
    align-items: center;
    margin-bottom:16px;
    padding-left:8px;
}

.invoice-instalments li:last-child {
    margin-bottom:0;
}

/* .instalment-icon { */
/* .invoice-instalments li:before {
    content:"";
    background: url("./img/icon-instalment.svg") no-repeat center center;
    width:25px;
    height:25px;
    display: flex;
    z-index: 1;
    margin-right: 8px;
}

/* .instalment-icon.completed {
.invoice-instalments li.completed:before {
    background: url("./img/icon-instalment-completed.svg") no-repeat center center;
}

.invoice-instalments li.overdue:before {
    background: url("./img/icon-instalment-overdue.svg") no-repeat center center;
}

.instalment-description {
    flex-grow: 1;
}

.instalment-amount {
    text-align:right;
} */

dl {
    display: grid;
    grid-template-columns: auto max-content;
    margin:0 0 16px 0;
    align-items: center;
}

dt {
    grid-column-start: 1;
    color: var(--grey);
    padding: 8px 0;
}

dd {
    grid-column-start: 2;
    padding: 8px 0;
    text-align:right;
}

hr {
    border-top:1px solid var(--borderColor);
    margin:24px 0;
}

dl.large dt,
dl.large dd {
    font-weight:600;
    color:#000;
}

dl.large dd {
    font-size:1.2em;
}

dl:last-child {
    border-bottom:none;
}

/*
 //////////////////////////////
 MISC.
 //////////////////////////////
*/
main {
    display:flex;
    width:100%
}

.page-container {
    max-width: var(--max-page-width);
    width:100%;
    min-height: 80vh;
    margin: 32px auto;
}

.card {
    background:#fff;
    border: 1px solid var(--borderColor);
    padding:24px 16px;
    border-radius:12px;
    text-align:left;
    display: block;
    margin-bottom:24px;
    position:relative;
    overflow: hidden;
}

.card-header {
    margin-bottom:16px;
    display: flex;
}

.card-divider {
    width:100%;
    height:1px;
    background: var(--borderColor);
    margin:16px 0;
}

#page-checkout,
#page-confirmation {
    display:none;
}

.instructions {
    margin:0 0 16px 0;
}

.page-header {
    margin-bottom:24px;
}

.logo {
    max-width:180px;
    max-height:60px;
}

.page-footer {
    width:100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin:32px auto;
    font-size: 12px;
    text-align: center;
    gap:12px;
    max-width:300px;
    text-align: center;
    line-height: 1.4;
}

.page-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight:var(--boldFontWeight);
    font-size:14px;
    margin:0;
    display: inline-flex;
    padding:12px 16px;
    width:auto;
    color:#000;
    border:none;
    height:auto;
}

.error-footer a:hover,
.error-footer a:focus,
.page-footer a:hover,
.page-footer a:focus {
    background:var(--bodyBackgroundColor);
}

.page-footer p {margin:0;}

.page-footer object {
    height: 25px;
}

.error {
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background:#fff;
    z-index:1000;
    padding:16px;
    text-align: center;
    display: none;
}

.error h1 {
    margin-top:0;
}

.error .button-primary {margin:32px 0;}

.error-footer {
    display: flex;
    align-items: center;
    margin-top: 32px;
    flex-direction: column;
    color:var(--grey);
}

.error-footer object {
    height: 20px;
    margin-right: 8px;
}

.error-footer p {
    margin: 0 0 12px 0;
}

.error-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight:var(--bodyFontWeight);
    font-size:16px;
    margin:0;
    display: inline-flex;
    width:auto;
    color:var(--grey);
    border:none;
    height:auto;
    padding:6px;
}

/*
 //////////////////////////////
 RECEIPT
 //////////////////////////////
*/
.receipt-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-family: "GT Flexa", sans-serif;
    gap: 8px;
    border-bottom:1px solid var(--borderColor);
    padding-bottom:24px;
    margin-bottom:24px;
}

.receipt-header .payment-amount {
    font-size: 2.4em;
    font-family: var(--headingFontFamily);
    font-weight: var(--headingFontWeight);
}

.receipt-header .payment-date {
    color: var(--grey);
    margin:0;
    font-family: var(--bodyFontFamily);
    font-weight: var(--bodyFontWeight);
}

.invoice-download {
    border:none;
    margin-bottom:0;
    gap: 8px;
}

.invoice-download object {
    width:20px;
}


@media only screen and (max-width: 479px) {
    html,body {
        background:#fff;
        padding-bottom: 92px;
    }

    .page-container {
        margin:0;
    }

    .card {
        border-radius:0;
        border-bottom:none;
        border: none;
        padding:0;
    }

    #payment {
        margin-bottom:120px;
    }

    #payment-summary {
        position: fixed;
        left: 0;
        bottom: 0;
        width: 100%;
        padding: 16px;
        margin: 0;
        border-top: 1px solid var(--borderColor);
        border-radius: 0;
    }

    #receipt-summary dd, #receipt-summary dt {
        grid-column-start: 1;
        text-align: left;
        margin: 0;
        padding: 0 0 8px 0;
    }

    #receipt-summary dd {
        padding: 0 0 16px 0;
    }
}