@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');
body {
    font-family: 'Roboto';
    background-color: #c9ffc5;
    text-align: center;
    color: #292929;
}

header {
    position: fixed;
    background-color: #0408038c;
    height: 80px;
    margin: 0;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9;
    -webkit-backdrop-filter: saturate(180%) blur(15px);
    backdrop-filter: saturate(180%) blur(15px);
}

header .logo div {
    height: 80px;
    width: 170px;
    background-image: url(../img/header_logo.png);
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    float: left;
}

#change_lang {
    position: absolute;
    top: 35px;
    right: 27px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

#prev_price {
    font-weight: bold;
    font-size: 20px;
}

.pack-offer {
    position: relative;
    width: 90%;
    max-width: 720px;
    margin: 72px auto 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.pack-offer.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 220ms ease, visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
    .pack-offer, .pack-offer.is-visible { transition: none; }
}

.pack-offer[hidden] {
    display: none;
}

.pack-offer-eyebrow {
    color: #34532c;
    font-size: 16px;
    text-transform: uppercase;
}

.pack-offer-eyebrow::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    margin: 0 auto 22px;
    background: linear-gradient(to right, transparent, #8dbd86 25%, #8dbd86 75%, transparent);
}

.pack-offer-heading {
    margin: 6px 0 20px;
    color: #1e321b;
    font-size: 17px;
    font-weight: bold;
    white-space: pre-line;
}

.pack-offer-percent {
    position: relative;
    display: inline-flex;
    width: 21px;
    height: 21px;
    align-items: center;
    justify-content: center;
    color: #60845b;
    font-size: 12px;
    font-weight: bold;
    vertical-align: middle;
}

.pack-offer-percent svg {
    width: 100%;
    height: 100%;
}

.pack-offer-percent span {
    position: absolute;
    color: #fff;
    line-height: 1;
}

.pack-offer-options {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.pack-offer-after-recording {
    display: none;
}

#finish_it .pack-offer-eyebrow,
#finish_it .pack-offer-heading,
#finish_it .pack-offer-options {
    display: none;
}

#finish_it .pack-offer-after-recording {
    display: block;
}

.pack-offer-or::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    margin-bottom: 18px;
    background: linear-gradient(to right, transparent, #8dbd86 25%, #8dbd86 75%, transparent);
}

.pack-offer-or {
    margin-bottom: 18px;
    font-size: 18px;
}

#pack_offer_buy {
    width: 100%;
    max-width: 320px;
    min-height: 54px;
    padding: 10px 16px;
    margin: 0 auto;
    font-size: 17px;
    font-weight: 600;
}

.pack-offer-button {
    display: flex;
    flex: 1 1 0;
    min-width: 0;
    min-height: 76px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 9px 8px;
    border: none;
    border-radius: 27px;
    background: #60845b;
    color: #fff;
    font-family: inherit;
    cursor: pointer;
}

.pack-offer-button:hover {
    background: #6c9366;
}

.pack-offer-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.pack-offer-name {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.1;
}

.pack-offer-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
}

.pack-offer-tag {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.pack-offer-separator {
    font-weight: bold;
}

#finish_it {
    display: none;
    width: 100vw;
    max-width: 800px;
}

#finish_it.show {
    display: inline-block;
}

#recording_layout {
    position: relative;
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin: 0 auto;
    padding-top: 20vh;
    transition: all ease 0.3s;
}

#recording_layout.ended {
    flex: 0 0 auto;
    padding-top: 0;
}

#recording_layout > .pack-offer {
    margin-top: auto;
}

#recording_layout:not(.ended) #recorder_it {
    margin-bottom: 72px;
}

#recorder_it {
    display: inline-block;
    transform: none;
    transition: none;
    width: 100vw;
    max-width: 800px;
    margin-top: 90px;
}

.separator {
    display: block;
}

#title {
    font-size: 26px;
    margin: 20px 12px;
}

#permission_button {
    height: 130px;
    width: 130px;
    background-color: #60845b;
    border-radius: 100%;
    border: none;
    box-shadow: 0 0 25px #ffffff45;
    background-image: url(../img/micro.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 35%;
    transform: scale(1);
    position: relative;
    cursor: pointer;
}

#permission_button.recording {
    background-color: #bf0534;
    background-image: url(../img/pause.png);
    animation: recording 1s ease-in-out infinite;
    background-size: 30%;
}

#permission_button.loading {
    background-image: url(../img/loading.gif);
    background-size: 45%;
}

#permission_button.error {
    background-image: url(../img/no_micro.png);
    background-size: 45%;
    background-color: #fd4545;
}

#permission_button::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    height: calc(100% + 10px);
    width: calc(100% + 10px);
    border: 5px solid #ff0040;
    border-radius: 100%;
    opacity: 0;
}

#permission_button.recording::before {
    content: "";
    position: absolute;
    top: -10px;
    left: -10px;
    height: calc(100% + 10px);
    width: calc(100% + 10px);
    border: 5px solid #ff0040;
    border-radius: 100%;
    animation: recording_before 1s ease-in-out infinite;
}

#line {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    margin-top: 20px;
    width: 90%;
    height: 10px;
    background-color: #b9b9b9;
    display: inline-block;
    position: relative;
    transition: all ease 0.2s;
}

#line #progress {
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    height: 100%;
    background-color: #009aff;
    transition: none;
}

#line #circle {
    position: absolute;
    left: 0%;
    transform: translateX(-10px);
    top: -5px;
    width: 20px;
    height: 20px;
    border-radius: 100%;
    background-color: #005cda;
    transition: none;
}

#line.finish {
    background-color: #009aff;
}

#line.finish #progress {
    background-color: #ff81d8;
}

#line.finish #circle {
    background-color: #ff00b1;
}

#audio_seek {
    position: absolute;
    left: 0;
    top: -17px;
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    touch-action: pan-y;
    outline: none;
}

#line.finish #audio_seek:not(:disabled) {
    pointer-events: auto;
    cursor: pointer;
}

#time {
    top: 15px;
    width: 90%;
    left: 0;
    font-size: 45px;
    text-align: center;
    transition: all linear 0.3s;
    display: inline-block;
    height: 60px;
}

#time.ended {
    font-size: 25px;
    text-align: right;
    color: #005cda
}

#line.ended {
    left: 30px;
    margin-top: 20px;
    width: 82%;
}

#triangle {
    display: none;
    height: 50px;
    width: 50px;
    transform: translate(15px, -93px);
    position: relative;
    color: #464646;
    background-image: url(../img/play1.png);
    background-size: cover;
    position: absolute;
    cursor: pointer;
}

#triangle.paused {
    background-image: url(../img/pause1.png);
}

#blob_audio {
    display: none;
}

#your_name,
#pack_email {
    width: 550px;
    height: 60px;
    border-radius: 100px;
    font-size: 28px;
    text-align: center;
    border: none;
    display: inline-block;
}

.pack-modal[hidden] {
    display: none;
}

.pack-modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.pack-modal-content {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 760px;
    max-height: 100%;
    overflow-y: auto;
    padding: 28px;
    border-radius: 18px;
    background: #c9ffc5;
}

.pack-modal-close {
    position: absolute;
    top: 8px;
    right: 14px;
    border: 0;
    background: transparent;
    color: #292929;
    font-size: 30px;
    cursor: pointer;
}

.pack-modal-eyebrow::before {
    display: none;
}

.pack-modal-eyebrow::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    margin: 18px auto 22px;
    background: linear-gradient(to right, transparent, #8dbd86 25%, #8dbd86 75%, transparent);
}

.pack-modal-options {
    display: flex;
    gap: 16px;
}

.pack-modal-option {
    opacity: .4;
}

.pack-modal-option.selected {
    opacity: 1;
}

#pack_label {
    margin: 12px 12px 24px;
    font-size: 28px;
    font-weight: normal;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#pack_label strong {
    font-size: 1.3em;
}

.pack-title-mobile-break {
    display: none;
}

#pack_email_description {
    margin: 20px 0 28px;
    font-size: 19px;
    line-height: 1.5;
    font-weight: bold;
}

#pack_email_label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}

#pack_email {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-bottom: 18px;
}

#pack_payment_methods {
    max-width: 440px;
    margin: 18px auto 0;
}


#your_name.error {
    -webkit-appearance: none;
    -moz-appearance: none;
    animation: no_name 1s ease-in-out 1;
}

#text_description {
    font-size: 16px;
    width: 90%;
    display: inline-block;
    margin: 15px 0px;
}

#tip_box {
    margin-top: 25px;
    width: 320px;
    text-align: right;
    font-size: 22px;
    color: #383838;
    font-weight: bold;
    display: inline-block;
}

#tip_box span {
    font-size: 12px;
    font-weight: normal;
}

#disable_page {
    height: 100vh;
    width: 100vw;
    background-color: #599755;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 999;
    display: none;
}

#disable_page_logo {
    height: 200px;
    width: 400px;
    background-image: url(../img/header_logo.png);
    background-size: 80%;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    top: 10vw;
    left: 50%;
    transform: translateX(-50%);
}

#disable_page_text {
    width: 80%;
    color: #fff;
    font-size: 20px;
    display: inline-block;
    position: absolute;
    left: 10%;
    font-weight: bold;
    top: calc( 10vw + 200px);
}

#loading {
    height: 100vh;
    width: 100vw;
    background-color: #c9ffc5f2;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9;
    opacity: 1;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 35%;
    display: none;
}

#initial_loading {
    position: fixed;
    top: 80px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    background-color: #c9ffc580;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

#initial_loading .lds-ring {
    top: 50%;
    left: 50%;
}

#loading span {
    font-size: 22px;
    font-weight: bold;
    color: #60845b;
    top: 40vh;
    text-align: center;
    transform: translateY(-100px);
    width: 100%;
    left: 0;
    position: absolute;
}

.lds-ring {
    display: inline-block;
    position: absolute;
    width: 80px;
    height: 80px;
    top: 40vh;
    left: 50vw;
    transform: translate(-40px, -40px) scale(1.8);
}

.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid #60845b;
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #60845b transparent transparent transparent;
}

.lds-ring div:nth-child(1) {
    animation-delay: -0.45s;
}

.lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}

.lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}

#no_permission {
    border: 2px solid #f00;
    font-size: 20px;
    padding: 12px;
    position: absolute;
    top: 100px;
    width: 50%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fd4545;
    border-radius: 10px;
    color: #000;
    display: none;
    z-index: 99;
}

#open_mobile {
    display: block;
    position: absolute;
    top: 85px;
    right: 10px;
    width: 150px;
}

#open_mobile span {
    font-size: 14px;
    display: block;
}

#open_mobile #open_mobile_qr {
    height: 110px;
    width: 110px;
    background-color: #d7d7d7;
    border: 1px solid #60845b;
    display: inline-block;
    background-size: cover;
}

#footer {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 11px;
    color: #0000003d;
    display: none;
    text-align: left;
}

#footer a {
    text-decoration: none;
    color: #0000003d;
}

@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2),
(max-width: 850px) {
    #footer {
        position: static;
        bottom: 0;
        left: 0;
        width: 96%;
        font-size: 11px;
        color: #0000003d;
        text-align: center;
        padding: 2%;
        display: none;
    }
    .footer_thanks {
        position: absolute !important;
    }
    #disable_page_logo {
        height: 200px;
        width: 100vw;
        top: 30vw;
    }
    #disable_page_text {
        top: calc( 30vw + 200px);
    }
    header {
        height: 45px;
    }
    #initial_loading {
        top: 45px;
    }
    header .logo div {
        height: 45px;
        width: 110px;
    }
    #change_lang {
        top: 16px;
    }
    .separator {
        display: none;
    }
    #finish_it {
        max-width: none;
        width: auto;
    }
    #recorder_it {
        margin-top: 50px;
        max-width: none;
        display: block;
        width: auto;
    }
    #finish_it.show {
        display: block;
    }
    #line.ended {
        width: 72%;
    }
    #tip_box {
        width: 90%;
    }
    #your_name {
        width: 90%;
        height: 45px;
        font-size: 22px;
        border: none
    }
    #no_permission {
        top: 60px;
        width: 87%;
    }
    #open_mobile {
        display: none;
    }
}

@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes recording {
    0% {
        background-color: #bf0534;
        transform: scale(0.9);
    }
    50% {
        transform: scale(1);
        background-color: #ff0040;
    }
    100% {
        background-color: #bf0534;
        transform: scale(0.9);
    }
}

@keyframes recording_before {
    0% {
        transform: scale(0.8);
        opacity: 0;
        border-color: #bf0534;
    }
    20% {
        opacity: 1;
    }
    50% {
        opacity: 1;
        border-color: #ff0040;
    }
    100% {
        opacity: 0;
        transform: scale(1.1)
    }
}

@keyframes no_name {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 #00000000;
    }
    20% {
        box-shadow: 0 0 10px 5px #00a1ffbd;
    }
    50% {
        transform: scale(1.1);
    }
    75% {
        box-shadow: 0 0 10px 5px #00a1ffbd;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 #00000000;
    }
}

body.audio-recording-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.audio-recording-page #recorder_page {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 24px;
}


.audio-recording-page #footer {
    position: static;
    width: auto;
    padding: 8px 12px;
    text-align: right;
    display: block;
}

@media (max-width: 850px) {
    .audio-recording-page #payment_methods {
        width: calc(100% - 32px);
    }
}


.audio-recording-page[data-pack-audio-duration] #pack_purchase,
.audio-recording-page[data-pack-audio-duration] #prev_price,
.audio-recording-page[data-pack-audio-duration] .pack-offer,
.audio-recording-page[data-pack-audio-duration] #tip_box {
    display: none;
}

@media (max-width: 600px) {
    .pack-title-mobile-break {
        display: initial;
    }

    #pack_label {
        margin-left: 0;
        margin-right: 0;
    }

    .pack-modal-options {
        gap: 6px;
    }

    .pack-modal-option {
        padding: 8px 2px;
    }

    .pack-modal-option .pack-offer-name {
        font-size: clamp(10px, 3.3vw, 16px);
        white-space: nowrap;
    }

    .pack-modal-option .pack-offer-details {
        font-size: clamp(10px, 3.1vw, 15px);
        gap: 2px;
    }

    .pack-modal-option .pack-offer-tag {
        width: 14px;
        height: 14px;
    }

    #pack_email_description {
        font-size: 16px;
    }

    #pack_email {
        font-size: 16px;
    }

    #recording_layout:not(.ended) {
        padding-top: 5vh;
    }

    .pack-offer {
        width: 90%;
        margin-top: 42px;
    }

    .pack-offer-options {
        flex-direction: column;
        max-width: 360px;
        margin: 0 auto;
        gap: 10px;
    }

    .pack-offer-button {
        min-height: 62px;
    }

    #pack_offer .pack-offer-options .pack-offer-button {
        flex-direction: row;
        gap: 12px;
        white-space: nowrap;
    }

    .pack-offer-name {
        font-size: 19px;
    }

    .pack-offer-details {
        font-size: 17px;
    }
}

#send_another_audio,
#payment_methods .pack-send {
    display: block;
    width: fit-content;
    min-height: 0;
    margin: 28px auto 0;
    padding: 14px 28px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 10px 28px rgba(22, 163, 74, 0.35);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    position: relative;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    z-index: 1;
}

#send_another_audio:hover,
#send_another_audio:focus-visible,
#payment_methods .pack-send:hover:not(:disabled),
#payment_methods .pack-send:focus-visible {
    box-shadow: 0 14px 34px rgba(22, 163, 74, 0.48);
    filter: brightness(1.08);
    outline: none;
    transform: translateY(-2px);
}

#send_another_audio:active,
#payment_methods .pack-send:active:not(:disabled) {
    box-shadow: 0 7px 18px rgba(22, 163, 74, 0.35);
    transform: translateY(1px);
}

#payment_methods .pack-send {
    padding: 18px 42px;
    font-size: 21px;
}

.pack-send:disabled {
    opacity: 0.6;
}
