#wgc-payment-gateway label {
    font-weight: 400;
    display: inline;
}

#wgc-payment-gateway .save-for-later-use {
    margin-left: 5px;
    margin-top: 5px;
}

#wgc-payment-gateway #wgc-payment-gateway-fields{
    padding-bottom: 1em;
}

#wgc-payment-gateway #wgc-payment-gateway-fields > div {
    margin-bottom: 12px;
}

#wgc-payment-gateway #wgc-payment-gateway-fields div > input {
    margin: 0 8px 0 0;
}

#wgc-payment-gateway .save-for-later-use-message {
    margin-top: 5px;
}

#wgc-payment-gateway .red{
    color: red;
}

#wc-elavon-converge-gateway-cc-form{
    display: none;
}

table.woocommerce_subscriptions_table {
    border: 1px solid rgba(0, 0, 0, .1);
    margin: 0 -1px 24px 0;
    text-align: left;
    width: 100%;
    border-collapse: separate;
    border-radius: 5px;
}

table.woocommerce_subscriptions_table th, table.woocommerce_subscriptions_table td{
    padding: 1em;
}

table.woocommerce_subscriptions_table td{
    border-top: 1px solid rgba(0, 0, 0, .1);
    line-height: 1.5em;
}
/* Hosted Fields Classic Checkout */
.wgc-hosted-fields-classic #wgc-hosted-fields-container {
    display: flex;
    flex-direction: column;
    margin: 20px 0;
    position: relative;
}

.wgc-hosted-fields-classic .wgc-wallet-container {
    display: flex;
    flex-direction: column;
    margin: 20px 0;
    position: relative;
}

.wgc-hosted-fields-classic #wgc-hosted-fields-container.has-overlay {
    min-height: 200px;
}

.wgc-hosted-fields-classic .wgc-wallet-container.has-overlay {
    min-height: 200px;
}

.wgc-payment-flow-selector {
    display: grid;
    gap: 12px;
    margin: 20px 0 12px;
}

.wgc-payment-flow-option {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid #d5d9df;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.wgc-payment-flow-option.is-selected {
    border-color: #111827;
    box-shadow: 0 0 0 1px #111827;
    background: #f8fafc;
}

.wgc-payment-flow-option input {
    margin-top: 3px;
}

.wgc-payment-flow-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wgc-payment-flow-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.wgc-payment-flow-description {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.wgc-payment-flow-panel {
    margin-top: 8px;
}

.wgc-wallet-intro {
    margin-bottom: 16px;
}

.wgc-wallet-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.wgc-wallet-description {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
}

/* Card Icons */
.wgc-card-types-container {
    margin-bottom: 15px;
    text-align: center;
}

.wgc-card-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.wgc-card-icon {
    display: inline-block;
    width: 40px;
    height: 25px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.wgc-card-icon.visa {
    background-image: url('../images/card-brands/visa.svg');
    background-size: 140%;
}

.wgc-card-icon.mastercard {
    background-image: url('../images/card-brands/mastercard.svg');
}

.wgc-card-icon.amex {
    background-image: url('../images/card-brands/amex.svg');
}

.wgc-card-icon.discover {
    background-image: url('../images/card-brands/discover.png');
}

/* Required Fields Notice */
.wgc-required-fields-notice {
    margin: 0 0 15px 0;
    text-align: left;
    font-size: 12px;
    color: #555;
}

.wgc-alt-payments-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 20px 0 12px;
}

.wgc-gpay-wrapper,
.wgc-applepay-wrapper {
    min-width: 400px;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.wgc-gpay-wrapper #google-pay-button,
.wgc-applepay-wrapper #apple-pay-button {
    width: auto;
}

/* Security Info */
.wgc-security-info {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #4b5563;
    margin-top: 10px;
}

.wgc-security-info span {
    margin-right: 4px;
}

.wgc-hosted-field-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.wgc-hosted-field-wrapper.has-error {
    margin-bottom: 35px;
}

.wgc-hosted-field-wrapper label.wgc-floating-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%) scale(1);
    padding: 0 5px;
    z-index: 1;
    opacity: 1;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(.4,0,.2,1);
    background: transparent;
}

.wgc-hosted-field-wrapper.is-focused .wgc-floating-label,
.wgc-hosted-field-wrapper.has-content .wgc-floating-label {
    top: -12px;
    left: 8px;
    transform: scale(0.85);
    color: #007cba;
    background: #fff;
    opacity: 1;
    padding: 0 4px;
}

/* Expiration date field - hide label by default (SDK shows MM/YY placeholder) */
.wgc-hosted-field-wrapper.wgc-exp-date .wgc-floating-label {
    opacity: 0;
    visibility: hidden;
}

.wgc-hosted-field-wrapper.wgc-exp-date.is-focused .wgc-floating-label,
.wgc-hosted-field-wrapper.wgc-exp-date.has-content .wgc-floating-label {
    opacity: 1;
    visibility: visible;
}

.wgc-hosted-field-wrapper.has-error .wgc-floating-label {
    color: #e53935;
}

.wgc-hosted-field-wrapper.has-error:not(.is-focused):not(.has-content) .wgc-floating-label {
    color: #e53935;
}

.wgc-hosted-field {
    height: 42px;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wgc-hosted-field-wrapper.is-focused .wgc-hosted-field {
    border-color: #4b5563;
    box-shadow: 0 0 0 1px #4b5563;
}

.wgc-hosted-field-wrapper.has-error .wgc-hosted-field {
    border-color: #e53935;
    box-shadow: 0 0 0 1px #e53935;
}

.wgc-error-text {
    color: #e53935;
    font-size: 12px;
    position: absolute;
    left: 0;
    bottom: -18px;
    width: 100%;
    z-index: 2;
    margin-top: 0;
    display: block;
}

.wgc-hosted-field-row {
    display: flex;
    gap: 15px;
}

.wgc-hosted-field-wrapper.wgc-half {
    flex: 1;
}

.wgc-new-card-fields {
    margin-top: 15px;
}

.required-mark {
    color: #e53935;
    font-weight: bold;
    margin-left: 2px;
}

/* Error Overlay */
.wgc-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 4px;
}

.wgc-error-message {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 20px;
    text-align: center;
    max-width: 90%;
    width: 400px;
}

.wgc-error-message p {
    color: #e53935;
    font-size: 16px;
    margin-bottom: 16px;
}

.wgc-error-close-btn {
    background-color: #e53935;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.wgc-error-close-btn:hover {
    background-color: #c62828;
}

/* Loading Overlay */
.wgc-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 4px;
}

.wgc-loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: wgc-spin 1s linear infinite;
    margin-bottom: 12px;
}

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

.wgc-loading-overlay p {
    margin: 0;
    color: #333;
    font-size: 14px;
}

.wgc-inline-place-order-row {
    display: none;
    justify-content: center;
}

.wgc-inline-place-order-button {
    width: 240px !important;
    height: 40px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; 
    background-color: #000000;
    font-size: 16px;
    color: #ffffff;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: none !important;
}

.wgc-inline-place-order-button:hover {
    opacity: 0.7;
    box-shadow: none !important;
    background-color: #000000;
    color: #ffffff;
}

@media (max-width: 600px) {
    .wgc-gpay-wrapper,
    .wgc-applepay-wrapper {
        min-width: 100%;
    }

    .wgc-hosted-field-row {
        flex-direction: column;
        gap: 0;
    }

    .wgc-payment-flow-option {
        padding: 14px;
    }
}
