/* PAPA CART V1.1 */

#papa-cart-trigger {
    position: fixed;
    right: 18px;
    bottom: 24px;
    z-index: 10000;
    background: #f57c00;
    color: #fff;
    border-radius: 30px;
    padding: 16px 20px;
    font-size: .88rem;
    font-weight: 800;
    box-shadow: 0 6px 25px #0008;
}

#papa-cart {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(460px, calc(100% - 24px));
    max-height: 85vh;
    max-height: 85dvh;
    padding: 0;
    color: #fff;
    background: #242424;
    border: 1px solid #444;
    border-radius: 18px;
    overflow: auto;
    box-shadow: 0 20px 60px #0009;
}

#papa-cart::backdrop {
    background: #000b;
    backdrop-filter: blur(4px);
}

.papa-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px;
    border-bottom: 1px solid #444;
}

.papa-cart-header h2 {
    font-size: 1.25rem;
}

#papa-cart-close {
    background: #383838;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 26px;
}

#papa-cart-items {
    padding: 20px;
}

.papa-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 0;
    border-bottom: 1px solid #383838;
}

.papa-cart-item > div:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.papa-cart-item small {
    display: block;
    color: #f57c00;
    font-size: .92rem;
    font-weight: 700;
    margin-top: 5px;
}

.papa-cart-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.papa-cart-quantity button {
    background: #383838;
    color: #fff;
    border-radius: 8px;
    width: 36px;
    height: 38px;
    font-size: 20px;
    font-weight: 700;
}

.papa-cart-footer {
    padding: 22px;
    background: #1a1a1a;
}

.papa-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    margin-bottom: 20px;
}

.papa-cart-total strong {
    color: #f57c00;
    font-size: 1.4rem;
}

#papa-cart-checkout {
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    color: #fff;
    background: #25d366;
    font-weight: 800;
    font-size: 1rem;
}

#papa-cart-checkout:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.papa-cart-footer small {
    display: block;
    text-align: center;
    color: #b0b0b0;
    margin-top: 12px;
}

#papa-cart button:focus-visible,
#papa-cart-trigger:focus-visible {
    outline: 2px solid #ffd600;
    outline-offset: 3px;
}

.papa-cart-pulse {
    animation: papaCartPulse .35s ease;
}

@keyframes papaCartPulse {
    50% { transform: scale(1.08); }
}

@media (max-width: 600px) {
    #papa-cart-trigger {
        right: 12px;
        bottom: 20px;
        padding: 14px 16px;
    }

    #papa-cart {
        max-height: 85dvh;
    }

    .papa-cart-header,
    .papa-cart-footer {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .papa-cart-pulse {
        animation: none;
    }
}


/* PAPA OPTIONS V1.2 */

#papa-options {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(460px, calc(100% - 24px));
    max-height: 88vh;
    max-height: 88dvh;
    padding: 0;
    color: #fff;
    background: #242424;
    border: 1px solid #444;
    border-radius: 18px;
    overflow: auto;
    box-shadow: 0 20px 60px #0009;
}

#papa-options::backdrop {
    background: #000b;
    backdrop-filter: blur(4px);
}

.papa-options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 22px;
    border-bottom: 1px solid #444;
}

.papa-options-header h2 {
    font-size: 1.2rem;
    overflow-wrap: anywhere;
}

#papa-options-close {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: #383838;
    color: #fff;
    border-radius: 10px;
    font-size: 26px;
}

.papa-options-body {
    padding: 22px;
}

#papa-options-price {
    display: block;
    color: #ff941f;
    font-size: 1.6rem;
    margin-bottom: 20px;
}

#papa-options-extras:not(:empty) {
    margin-bottom: 22px;
}

#papa-options-extras h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.papa-extra-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid #444;
}

.papa-extra-option input {
    width: 20px;
    height: 20px;
    accent-color: #f57c00;
    flex-shrink: 0;
}

.papa-extra-option span {
    flex: 1;
}

.papa-extra-option strong {
    color: #ff941f;
    font-size: .85rem;
}

.papa-options-body > label {
    display: block;
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 10px;
}

#papa-options-note {
    width: 100%;
    min-height: 100px;
    padding: 14px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #444;
    border-radius: 10px;
    resize: vertical;
    font: inherit;
    font-size: 16px;
}

.papa-options-quantity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    gap: 12px;
}

.papa-options-quantity > div {
    display: flex;
    align-items: center;
    gap: 14px;
}

.papa-options-quantity button {
    width: 42px;
    height: 42px;
    background: #383838;
    color: #fff;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 700;
}

.papa-options-quantity button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.papa-options-footer {
    padding: 20px;
    background: #1a1a1a;
    border-top: 1px solid #444;
}

#papa-options-confirm {
    width: 100%;
    min-height: 52px;
    padding: 14px;
    border-radius: 10px;
    background: #f57c00;
    color: #171717;
    font-size: 1rem;
    font-weight: 800;
}

.papa-cart-item .papa-item-detail {
    color: #b0b0b0;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.5;
}

#papa-options :focus-visible {
    outline: 2px solid #ffd600;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .papa-options-header,
    .papa-options-body,
    .papa-options-footer {
        padding: 18px;
    }
}


/* PAPA CHECKOUT V1.3 */

#papa-checkout {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(480px, calc(100% - 24px));
    max-height: 88vh;
    max-height: 88dvh;
    padding: 0;
    color: #fff;
    background: #242424;
    border: 1px solid #444;
    border-radius: 18px;
    overflow: auto;
    box-shadow: 0 20px 60px #0009;
}

#papa-checkout::backdrop {
    background: #000b;
    backdrop-filter: blur(4px);
}

#papa-checkout-back {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: #383838;
    color: #fff;
    font-size: 26px;
    border-radius: 10px;
}

.papa-checkout-body {
    padding: 22px;
}

.papa-checkout-field {
    margin-bottom: 22px;
}

.papa-checkout-field label {
    display: block;
    margin-bottom: 9px;
    font-size: .95rem;
    font-weight: 700;
}

.papa-checkout-field label small {
    color: #b0b0b0;
    font-weight: 400;
}

.papa-checkout-field input,
.papa-checkout-field textarea {
    display: block;
    width: 100%;
    padding: 14px;
    color: #fff;
    background: #1a1a1a;
    border: 1px solid #555;
    border-radius: 10px;
    font: inherit;
    font-size: 16px;
}

.papa-checkout-field textarea {
    resize: vertical;
}

.papa-checkout-body h3 {
    padding-top: 16px;
    border-top: 1px solid #444;
    font-size: 1rem;
    margin-bottom: 12px;
}

.papa-checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 13px 0;
    gap: 12px;
    border-bottom: 1px solid #383838;
    font-size: .9rem;
}

.papa-checkout-item > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.papa-checkout-item small {
    display: block;
    color: #b0b0b0;
    margin-top: 4px;
    font-size: .8rem;
}

.papa-checkout-price {
    white-space: nowrap;
    color: #ff941f;
}

.papa-checkout-footer {
    background: #1a1a1a;
    border-top: 1px solid #444;
    padding: 22px;
}

#papa-checkout-send {
    width: 100%;
    min-height: 54px;
    padding: 14px;
    background: #25d366;
    color: #12321e;
    border-radius: 10px;
    font-size: .95rem;
    font-weight: 800;
}

#papa-checkout-edit {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: transparent;
    color: #ff941f;
    font-size: .9rem;
    font-weight: 700;
}

.papa-checkout-footer small {
    display: block;
    text-align: center;
    color: #b0b0b0;
    font-size: .75rem;
    margin-top: 10px;
    line-height: 1.6;
}

#papa-checkout :focus-visible {
    outline: 2px solid #ffd600;
    outline-offset: 3px;
}

@media (max-width: 600px) {

    .papa-checkout-body,
    .papa-checkout-footer {
        padding: 18px;
    }
}


/* PAPA DELIVERY V1.4 */

.papa-delivery-methods {
    min-width: 0;
    border: 0;
    padding: 0;
    margin: 0 0 22px;
}

.papa-delivery-methods legend {
    font-weight: 800;
    margin-bottom: 12px;
    font-size: .95rem;
}

.papa-delivery-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #444;
    border-radius: 12px;
    background: #1a1a1a;
    cursor: pointer;
    margin-bottom: 10px;
}

.papa-delivery-option:has(input:checked) {
    border-color: #f57c00;
    background: #f57c0010;
}

.papa-delivery-option input {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: #f57c00;
}

.papa-delivery-option strong {
    display: block;
    font-size: .95rem;
}

.papa-delivery-option small {
    display: block;
    color: #b0b0b0;
    margin-top: 4px;
    font-size: .8rem;
}

#papa-delivery-address[hidden] {
    display: none !important;
}

.papa-delivery-cost,
.papa-delivery-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.papa-delivery-cost {
    color: #ddd;
    font-size: .9rem;
}

#papa-delivery-fee {
    text-align: right;
    color: #ff941f;
}

.papa-delivery-total {
    padding-top: 18px;
    border-top: 1px solid #444;
    font-weight: 800;
}

#papa-final-total {
    color: #ff941f;
    font-size: 1.4rem;
    white-space: nowrap;
}


/* PAPA PAYMENT V1.5 */

.papa-payment-methods {
    min-width: 0;
    border: 0;
    padding: 0;
    margin: 0 0 22px;
}

.papa-payment-methods legend {
    font-size: .95rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.papa-payment-info {
    display: block;
    color: #b0b0b0;
    font-size: .8rem;
    line-height: 1.5;
    margin-top: 8px;
}

#papa-cash-fields[hidden],
#papa-change-fields[hidden] {
    display: none !important;
}

#papa-change-choice {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #555;
    border-radius: 10px;
    font: inherit;
    font-size: 16px;
    color-scheme: dark;
}

#papa-change-result {
    color: #ff941f;
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: 22px;
    line-height: 1.5;
}

#papa-change-result:empty {
    display: none;
}
