body.checkout-open {
    overflow: hidden;
}

.page-wrapper {
    transition: 0.3s;
}

[dir="ltr"] body.checkout-open .page-wrapper {
    transform: translateX(-500px);
}

[dir="rtl"] body.checkout-open .page-wrapper {
    transform: translateX(500px);
}


/* PANEL */

.checkout-panel {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    transition: 0.5s;
    backdrop-filter: blur(3px);
}

.checkout-panel:before {
    content: "";
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 100%;
    background-color: var(--key);
    opacity: 0.4;
}

.checkout-panel-content {
    width: 600px;
    background-color: var(--light);
    position: relative;
    padding: 50px;
    transition: .3s;
    box-shadow: 0 0 50px rgb(0 0 0 / 20%);
    overflow: hidden auto;
}

[dir="ltr"] .checkout-panel-content {
    transform: translateX(600px);
}

[dir="rtl"] .checkout-panel-content {
    transform: translateX(-600px);
}

.checkout-panel.open {
    z-index: 999;
    opacity: 1;
    pointer-events: all;
}

[dir="ltr"] .open .checkout-panel-content {
    transform: translateX(0);
}

[dir="rtl"] .open .checkout-panel-content {
    transform: translateX(0);
}

.checkout-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--light);
    margin: -50px -50px 40px;
    padding: 30px 50px;
    position: sticky;
    top: -50px;
    box-shadow: 0 0 10px rgb(0 0 0 / 10%);
    z-index: 9;
}

.checkout-panel-head h3 {
    font-size: 30px;
    color: var(--dark);
}

button.checkout-cancel {
    color: var(--red);
    font-weight: 600;
}

.addresses-section,
.methods-section,
.payment-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 50px;
}

.addresses-section>h4,
.methods-section>h4,
.payment-section>h4 {
    font-size: 18px;
    color: var(--dark);
}


/* SUMMARY */

.checkout-summary-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkout-summary-wrap>h5 {
    font-size: 14px;
    color: var(--dark);
}

ul.checkout-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

ul.checkout-summary li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

ul.checkout-summary li:before {
    content: "";
    flex-grow: 1;
    height: 1px;
    background-color: var(--shades);
}

ul.checkout-summary li span {
    order: -1;
}

ul.checkout-summary li.separated {
    font-size: 16px;
    color: var(--dark);
    font-weight: 600;
}

.address {
    display: flex;
    padding: 20px;
    border: 2px solid var(--shades);
    border-radius: 10px;
    cursor: pointer;
    transition: 0.1s;
    gap: 10px;
}

.address:hover {
    border-color: var(--shadow);
}


/* METHODS */

.checkout-methods,
.addresses-list {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-direction: column;
    margin: 15px 0;
}

.checkout-methods label {
    display: flex;
    align-items: center;
    border: 2px solid var(--shades);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    gap: 10px;
    position: relative;
    font-weight: 600;
    transition: 0.1s;
}

.checkout-methods label:hover {
    border-color: var(--shadow);
}

.checkout-methods label.active,
label.address.active {
    border-color: var(--blue);
}

.checkout-methods label i,
label.address span i {
    font-style: normal;
    font-size: 20px;
    font-weight: normal;
}

.checkout-methods label img {
    min-width: 30px;
}

.checkout-methods label i:before,
label.address span i::before {
    content: "\e95e";
    font-family: 'icons';
    color: var(--shadow);
}

.checkout-methods label input:checked~i:before,
label.address span input:checked~i:before {
    content: "\e957";
    color: var(--blue);
}

button.checkout-pay {
    padding: 0 20px;
    height: 60px;
    font-weight: 600;
    transition: 0.1s;
    opacity: 0.9;
    line-height: 100%;
    font-family: var(--font) !important;
    justify-content: center;
    border-radius: 0.5em;
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    background-color: var(--green);
    color: #FFF;
}

button.checkout-pay:hover {
    opacity: 1;
}

button.checkout-pay:before {
    content: "\ea67";
    font-family: icons;
}

#platon-checkout iframe#frame {
    display: block !important;
    width: 100% !important;
    height: 60vh !important;
}
/* ADDRESSES */

button.edit-address {
    margin-inline-start: auto;
    flex-shrink: 0;
    font-weight: 600;
    color: var(--blue);
}

button.add-address {
    display: flex;
    gap: 5px;
    font-weight: 600;
    color: var(--blue);
    width: max-content;
}

button.add-address:before {
    content: "+";
}

form#address-form label.form-label {
    width: calc(50% - 15px);
}

form#address-form {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}


/* 
.phone-wrap {
    display: flex;
    align-items: center;
    max-width: inherit;
}

 */

.form-label input {
    height: auto;
    padding: 15px 20px;
}

.phone-label input:first-of-type {
    width: 100%;
    border-radius: 0 5px 5px 0;
}

.form-actions {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.ac-button {
    color: var(--text);
    border: 1px solid var(--text-light);
    line-height: 100%;
    font-size: 14px;
    padding: 13px 16px;
    border-radius: 5px;
    opacity: 0.9;
    gap: 5px;
    display: flex;
    align-items: center;
    width: max-content;
    justify-content: center;
    flex-grow: 1;
    max-width: max-content;
}

.ac-button:hover {
    opacity: 1;
}

.ac-save {
    background-color: var(--key);
    color: var(--light);
    border-color: transparent;
}

.ac-save:before {
    content: "\e95b";
    font-family: "icons";
}

.ac-save:active {
    box-shadow: none
}

.ac-button.disabled {
    background-color: var(--text-light);
}

.flag {
    position: absolute;
    top: 19px;
    width: 30px;
    height: 30px;
    inset-inline-start: 20px;
    border-radius: 100px;
}

form#new-address-form #flag {
    top: 34px;
}

#new-address-form input#country-name {
    padding-inline-start: 60px;
}


/* CARDS */

.cards-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.card-primary {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.card-primary:before {
    content: "\e95e";
    font-family: "icons";
    font-weight: normal;
    width: 1em;
}

.primary .card-primary:before {
    content: "\e931";
}

.primary .card-primary {
    color: var(--key);
}

.card {
    border: 2px solid var(--shadow);
    padding: 20px;
    border-radius: 5px;
    display: flex;
    min-width: 300px;
    gap: 20px;
    align-items: center;
    position: relative;
}

form.card.primary:before {
    content: attr(data-label);
    position: absolute;
    top: -12px;
    background-color: var(--light);
    padding: 0 10px;
    border-radius: 100px;
    font-weight: 600;
    color: var(--blue);
}

.card img {
    width: 50px;
    height: 25px;
}

.card-label {
    display: flex;
    flex-direction: column;
    width: 170px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.card-label b {
    color: var(--dark);
}

.cards-list {
    display: flex;
    gap: 10px;
    flex-direction: column;
    margin-top: 30px;
}

.cards-list h2 {
    font-size: 16px;
}

.card-info-wrap {
    display: flex;
    gap: 30px;
}

.card-info-wrap span {
    width: 170px;
}

.card.primary {
    background-color: transparent;
    border-color: var(--blue);
}

#new-card-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
    border-radius: 5px;
    width: 100%;
}

#new-card-form>label {
    flex-grow: 1;
    min-width: max(45%, 280px);
    position: relative;
}

.expiry-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 340px;
}

.expiry-label input {
    width: 120px;
    border-radius: 0;
}

.expiry-label b {
    width: 100%;
}

.expiry-label input:first-of-type {
    border-inline-end: none;
    border-start-start-radius: 5px;
    border-end-start-radius: 5px;
}

.expiry-label input:last-of-type {
    border-inline-start: none;
    border-start-end-radius: 5px;
    border-end-end-radius: 5px;
}

.card-types {
    display: flex;
    align-items: center;
    gap: 20px;
}

.card-types img {
    border: 2px solid var(--shadow);
    width: 100px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
}

.card-types input:checked+img {
    border-color: var(--key);
}

.expiry-label-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.expiry-label-wrap label {
    width: 100px;
}

.expiry-label-wrap h3 {
    width: 100%;
}

.form-actions {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.card-types input {
    position: absolute;
    z-index: -1;
}

.card-types label {
    position: relative;
}

input.card-code {
    width: 90px;
    height: 45px;
    padding: 10px;
    font-weight: 600;
    border: 1px solid var(--shadow);
    border-radius: 5px;
    text-align: center;
    margin-inline-start: auto;
}

.wallet-balance {
    margin-inline-start: auto;
    font-weight: normal;
}

@media screen and (max-width:640px) {
    .checkout-panel-content {
        width: 90vw;
        transform: translateX(90vw);
    }
}