@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

/* variables */
:root {
    --nyf-default-font: Lato, sans-serif;
    --nyf-font-color: #4E3B57;
    --nyf-selected-button-color: #4E3B57;
    --nyf-background-color: #F9FAFB;
    --nyf-border-color: #4E3B57;
    --nyf-slider-background-color: #d3d3d3;
    --nyf-slider-slid-background-color: #4b3b76;
    --nyf-slider-thumb-color: #4b3b76;
}

/* admin styles */

.nyf-settings__page {
    padding: 20px 20px 20px 0;
}

.nyf-settings__main-title {
    margin: 0 0 1em 0;
    text-align: left;
}

.nyf-settings__form {
    width: fit-content;
    padding: 2em;
    border-radius: 1em;
    font-size: 14px;
}

.nyf-settings__form > h2 {
    display: none;
}

.nyf-settings__form th[scope="row"] {
    text-align: right;
    font-weight: normal;
}

.nyf-settings__bottom, .nyf-settings__form > p.submit {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2em 0 0 0;
}

.nyf-settings__form [type="submit"]  {
    width: fit-content;
    padding: 0.5em;
    border: none;
    border-radius: 2px;
    background-color: rgb(0, 124, 186);
    color: white;
}

#nyf_run_now {
    padding: 0.2em;
    background-color: red;
}

.nyf-settings__form > p {
    margin-top: 1em;
    font-size: 0.8em;
    text-align: center;
}

.nyf-settings__metal-group {
    display: grid;
    grid-template-columns: 200px 100px;
    gap: 20px;
}

.nyf-settings__metal-group > label {
    min-height: 40px;
    display: flex;
    flex-flow: column wrap;
    align-items: flex-end;
    justify-content: center;
    text-align: right;
}

.nyf-settings__metal-group > label > span {
    width: 100%;
    font-size: 0.8em;
}

@keyframes spinner {
    from {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background-color: black;
    }

    to {
        width: 20px;
        height: 20px;
        border: none;
        background-color: rgba(0 , 0, 0, 0);
        transform: rotate(590deg);
    }
}

.default-spinner {
    position: fixed;
    top: 30%;
    margin: 0 auto;
    border: 1px solid white;
    animation-duration: 1.5s;
    animation-name: spinner;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

.default-spinner::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

/* customer styles */

.nyf-container {
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    padding: 2vh;
    gap: 2rem;
    background-color: var(--nyf-background-color);
    font-family: var(--nyf-default-font);
    color: var(--nyf-font-color);
}

.nyf-button-box {
    max-width: 8000px;
    margin: 0 auto;
    padding: 2vh;
    border-radius: 8px;
}

.nyf-title {
    font-weight: 700;
    font-size: 0.8rem;
    text-align: center;
}

.nyf-row-top {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    margin: 1vh 0;
}

.nyf-row {
    display: flex;
    justify-content: left;
    flex-wrap: wrap;
    margin: 10px 0;
    gap: 1%;
}

.nyf-button {
    transition: transform 0.2s ease, background 0.3s ease;
    width: 24%;
    text-align: center;
    margin: 0 0 1%;
    padding: 1em 0;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    border: 1px solid var(--nyf-border-color);
    background-color: var(--nyf-background-color);
}

.nyf-button:hover {
    background: var(--nyf-font-color);
    color: var(--nyf-background-color);
    cursor: pointer;
}

.nyf-button:active {
    transform: scale(0.9);
}

.nyf-button--50 {
    width: 49% ;
}

.nyf-button--metal {
    width: fit-content;
    padding: 1em;
}

.nyf-button--metal.selected,
.nyf-button--metal:hover {
    background: var(--nyf-font-color);
    color: var(--nyf-background-color);
    cursor: pointer;
}

.nyf-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 99%;
    height: 4px;
    background-color: var(--nyf-slider-background-color);
    border-radius: 12px;
    outline: none;
    opacity: 0.9;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}

.nyf-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background-color: var(--nyf-slider-thumb-color);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.nyf-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background-color: var(--nyf-slider-thumb-color);
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

.nyf-weight-input label {
    font-weight: 500;
    font-size: 1.2rem;
    text-transform: capitalize;
    display: inline-flex;
    align-items: center;
}

.nyf-weight-input-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* Price calculation container */
.nyf-price-calculation {
    margin-top: 1.5rem;
    text-align: center;
}

.nyf-price-calculation h2 {
    margin-bottom: 0.5rem;
}

.nyf-price-calculation p#nyf-calculated-price {
    font-weight: bold;
    font-size: 2.5rem;
    margin: 0;
}

.nyf-number-box {
    width: 50%;
    font-size: 1rem;
    padding: 0.3em 0.5em;
    border: 1px solid var(--nyf-border-color);
    border-radius: 2px;
    height: 2em;
}

.nyf-main-content {
    flex: 1 1 60%;
}

.nyf-price-box {
    flex: 0 0 35%;
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    max-height: none ;
    overflow-y: visible ;
}

.nyf-price-box-title {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin: 0;
    padding: 4px 8px;
}

.nyf-price-box h2 {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1em;
    text-transform: uppercase;
    text-align: center;
}

.nyf-price-box p#nyf-calculated-price {
    margin: 0;
}

.nyf-price-box ul {
    width: 100%;
    margin: 0;
    padding: 0;
    max-height: none ;
    overflow-y: visible ;
}

@media (max-width: 1020px) {
    .nyf-button {
        width: 49%;
    }

    .nyf-button--metal {
        width: fit-content;
        padding: 1em;
    }

    .nyf-container {
        flex-direction: column;
    }

    .nyf-price-box {
        max-width: 100%;
        min-width: auto;
        margin-top: 2vh;
    }
}

@media (max-width: 600px) {

    .nyf-button,
    .nyf-weight-input label,
    .nyf-price-list-item,
    .nyf-price-box h2,
    .nyf-price-calculation p#calculatedPrice {
        font-size: 0.7rem;
    }

    .nyf-price-calculation p#calculatedPrice {
        font-size: 2rem;
    }

    .nyf-weight-input label {
        font-size: 1rem;
    }

    .nyf-price-box h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .nyf-row-top .nyf-button {
        min-width: 48%;
        align-items: center;
    }

    .nyf-row .nyf-button {
        width: 100%;
    }
}

.nyf-hidden {
    display: none ;
}

.nyf-price-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    border-bottom: 1px solid var(--nyf-slider-background-color);
    font-size: 0.9rem;
}

.nyf-price-list-item:last-child {
    border-bottom: none;
}

/* Label (left side) */
.nyf-price-label {
    flex: 1;
    text-align: left;
    white-space: nowrap;
}

/* Price (right side) */
.nyf-price-value {
    text-align: right;
    white-space: nowrap;
}

.nyf-selected {
    background-color: var(--nyf-selected-button-color);
    color: var(--nyf-background-color);
}