/* Credit Cards */

.additionalFields .adyen-checkout__label,
.adyen-checkout__label__text {
    float: none;
    width: 100%;
    text-align: left;
}

.form-horizontal #newCard label {
    float: none;
    width: 100%;
    text-align: left;
}

.creditCard {
    margin-left: 27%;
}

.paymentMethod {
    list-style-type: none;
    margin: 0.5em 0 0.5em 0;
    border-bottom: 1px solid #b9c4c9;
}

/* Fossil Customization */

.paymentMethod:last-child {
    border-bottom: none;
}

.paymentMethod_img {
    margin: 0 0.3125em 0 0.3125em;
    vertical-align: middle;
    width: 40px;
    height: 26px;
}

.additionalFields {
    display: inline-block;
}

.hiddenFields {
    display: none;
}

.security-code-input .adyen-checkout__field:first-child {
    display: none;
}

/* Checkout Components */

.checkoutComponent {
    display: none;
    margin-top: 1.25em;
}

#component_ach .form-row label {
    float: left;
}

#type {
    list-style-type: none;
    line-height: 3.125em;
}

#type .form-row {
    margin: .5rem 0 .5rem;
}

#ssnValue {
    background: #fff;
    border: 0.0625em solid #b9c4c9;
    border-radius: 0.1875em;
    color: #001b2b;
    display: block;
    font-family: inherit;
    font-size: 1em;
    height: 3em;
    outline: none;
    padding: 0.3125em 0.5em;
    position: relative;
    transition: border 0.2s ease-out, box-shadow 0.2s ease-out;
    width: 12.5em;
}

#ssn_klarna {
    margin-top: 1em;
}

/* Summary page */

.summary-label {
    font-weight: bold;
}

.adyen-payment-details {
    max-width: 25em;
    margin: auto;
}

/* Custom Adyen */

.payment-method #type {
    margin-left: 22%;
}

.payment-method .issuer {
    margin: 1% 5%;
    display: none;
}

.payment-method-options .form-row {
    width: 25%;
}

.payment-method #type .logo {
    position: absolute;
}

.payment-method #type label {
    display: inline;
    float: none;
    width: auto;
}

.payment_method_label {
    padding: 0.75em 6em 0;
}

.openinvoiceInput {
    display: none;
}

.adyen-checkout__field {
    display: table;
}

.card-error {
    display: none;
}

/* Custom Adyen SFRA */

.adyen-checkout__input-wrapper .adyen-checkout__dropdown__list {
    z-index: 10;
}

#paymentMethodsUl {
    width: 80%;
    padding-inline-start: 0;
    margin: auto;
}

#adyenModalDialog {
    pointer-events: auto;
    background: white;
}

#amazonModal {
    opacity: 0.95;
}

/* Toggle Switch */

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #2196f3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196f3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.payment-methods-container {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #b9c4c9;
    border-radius: 8px;
    background: white;
}

.additionalFields {
    margin-bottom: 10px;
}

#cancelQrMethodsButton {
    position: absolute;
    top: 0;
    right: 0;
}

#cancelQrMethodsButtonStyling {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.expressComponent {
    margin: 10px 0;
}

/* Fossil customization - existing express checkout styles */

#express-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#express-container .expressComponent {
    margin: 0.25rem 0;
}

.expressComponent button {
    width: 100%;
    padding: 10px 0;
}

.expressComponent #gpay-button-online-api-id {
    padding: 5px 0;
}

.express-loader-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.express-loader {
    width: 48px;
    height: 48px;
    border: 5px solid #00a1e0;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.hidden {
    display: none;
}

.adyen-checkout__amazonpay__button {
    min-width: 100%;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#amazonPayAddressDetails label,
label[for="shippingMethods"] {
    font-weight: 500;
}

.addressHeaders {
    display: flex;
    justify-content: space-between;
}

.addressHeaders > label {
    white-space: nowrap;
}

address {
    font-size: 0.9rem;
}

.editAddressBtn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #0070d2;
    margin-bottom: 0.5rem;
}

/* ========================================
   PDP - Buy Now / Express Checkout (Flattened)
   ======================================== */

.express_checkout_pdp {
    width: 100%;
    background-color: #F9F9F9;
    border-radius: 0.25rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-sizing: border-box;
    margin-bottom: 2.5rem;
}

.express_checkout_pdp .express_checkout_pdp_buy_now_message {
    color: #242424;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.3125rem;
    font-weight: 400 !important;
}

.express_checkout_pdp #express-payment-buttons {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 1rem;
}

/* 1. Hide deprioritized methods */
.express_checkout_pdp #express-payment-buttons #paypal-pdp,
.express_checkout_pdp #express-payment-buttons #klarna-pdp {
    display: none !important;
}

/* 2. Container styling to act as the visual button boundary */
.express_checkout_pdp div#express-payment-buttons div#applepay-pdp,
.express_checkout_pdp div#express-payment-buttons div#googlepay-pdp {
    border-radius: 0.25rem;
    border: 0.66px solid #CCCCCC;
    background: #FFFFFF;
    overflow: hidden;
    display: block;
    height: 2.5rem; 
    flex: 1; 
    max-width: 100%; 
    padding: 0;
    margin: 0;
    position: relative;
}

.express_checkout_pdp #express-payment-buttons #express-product-form {
    display: none;
}

/* 3. Apple Pay inner component fix */
.express_checkout_pdp div#express-payment-buttons apple-pay-button {
    --apple-pay-button-border-radius: 4px;
    --apple-pay-button-height: 100%; 
    width: 100%;
    height: 100%;
    display: block;
}

/* 4. Google Pay absolute positioning crop trick & Centering Fix */
.express_checkout_pdp #express-payment-buttons #googlepay-pdp .adyen-checkout__paywithgoogle {
    position: absolute !important;
    top: -1px !important;
    left: -1px !important;
    width: calc(100% + 2px) !important;
    height: calc(100% + 2px) !important;
    min-width: 0 !important; /* Overrides native Adyen/Google SDK min-widths */
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Covers both the normal IFRAME mode and the Incognito BUTTON fallback mode */
.express_checkout_pdp #express-payment-buttons #googlepay-pdp .gpay-card-info-container-fill,
.express_checkout_pdp #express-payment-buttons #googlepay-pdp button.gpay-card-info-container,
.express_checkout_pdp #express-payment-buttons #googlepay-pdp .gpay-button-fill,
.express_checkout_pdp #express-payment-buttons #googlepay-pdp button.gpay-button {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important; /* Forces the SDK to drop its native 43px minimum */
    max-width: 100% !important;
    max-height: 100% !important; /* Ensures it perfectly matches our cropped wrapper */
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: transparent !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.express_checkout_pdp #express-payment-buttons #googlepay-pdp iframe {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background-color: transparent !important;
    display: block !important;
}

/* Locks the background image size for the Incognito fallback button */
.express_checkout_pdp #express-payment-buttons #googlepay-pdp button.gpay-button {
    background-size: auto 24px !important; /* 24px perfectly matches Apple Pay's visual height */
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* 5. Hide duplicate Adyen Google Pay mounts */
#googlepay-pdp .gpay-card-info-container-fill ~ .gpay-card-info-container-fill {
    display: none !important;
}

/* 6. Collapse payment containers when the SDK hides the inner button (e.g., Apple Pay on Android) */
.express_checkout_pdp div#express-payment-buttons div#applepay-pdp:empty,
.express_checkout_pdp div#express-payment-buttons div#googlepay-pdp:empty {
    display: none;
    border: none;
    height: 0;
}
.express_checkout_pdp div#express-payment-buttons div#applepay-pdp:has(apple-pay-button[hidden]),
.express_checkout_pdp div#express-payment-buttons div#googlepay-pdp:has(button[hidden]) {
    display: none;
    border: none;
    height: 0;
}

/* 7. Hide the entire Buy Now section if there are no valid, visible payment buttons */
.express_checkout_pdp:not(:has(apple-pay-button:not([hidden]))):not(:has(#googlepay-pdp button.gpay-button:not([hidden]), #googlepay-pdp iframe:not([hidden]), #googlepay-pdp .gpay-card-info-container-fill:not([hidden]))) {
    display: none;
    margin: 0;
    padding: 0;
}

/* PDP - Mobile */
@media (max-width: 767.98px) {
    .express_checkout_pdp #express-payment-buttons {
        flex-wrap: nowrap;
    }

    .express_checkout_pdp #express-payment-buttons #applepay-pdp,
    .express_checkout_pdp #express-payment-buttons #googlepay-pdp {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100% !important;
    }
}