.wpf-container {
    max-width: 800px;
    margin: 20px auto;
    font-family: Arial, sans-serif;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    background-color: #fff;
    border-radius: 0;
}

.wpf-header {
    background-color: #003366;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpf-logo-left .trust {
    font-weight: bold;
    font-style: italic;
    font-size: 24px;
}

.wpf-logo-left .health {
    font-weight: normal;
    font-style: italic;
    font-size: 24px;
    color: #00a0e3;
}

.wpf-banner {
    background: linear-gradient(to bottom, #f0f8ff, #d9e6f2);
    padding: 20px;
    border-bottom: 1px solid #ccc;
}

.wpf-banner h1 {
    margin: 0;
    color: #003366;
    font-size: 22px;
}

.wpf-banner p {
    margin: 5px 0 0;
    color: #003366;
}

.wpf-form {
    padding: 20px;
}

.wpf-section {
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.wpf-section:last-of-type {
    border-bottom: none;
}

.wpf-section h3 {
    color: #003366;
    font-size: 16px;
    margin-bottom: 15px;
}

.wpf-field {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.wpf-field label {
    flex: 0 0 200px;
    color: #003366;
    font-weight: bold;
    padding-top: 10px;
}

.wpf-input-wrapper {
    flex: 1;
}

.wpf-input-wrapper input {
    width: 100%;
    height: 40px; /* Explicit height to ensure uniformity across all types */
    padding: 10px;
    border: 1px solid #999;
    border-radius: 0 !important; /* Rectangular instead of curved */
    box-sizing: border-box;
    font-size: 14px; /* Uniform text size */
    color: #333;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: normal; /* Fix for some browser defaults */
}

/* Remove up and down toggles (spinners) from the amount field */
.wpf-input-wrapper input[type=number]::-webkit-inner-spin-button,
.wpf-input-wrapper input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wpf-input-wrapper input[type=number] {
    -moz-appearance: textfield;
}

.wpf-input-wrapper input::placeholder {
    font-size: 14px;
    color: #999;
    opacity: 1; /* Firefox */
}

.wpf-input-wrapper input:-ms-input-placeholder { /* Internet Explorer 10-11 */
    font-size: 14px;
    color: #999;
}

.wpf-input-wrapper input::-ms-input-placeholder { /* Microsoft Edge */
    font-size: 14px;
    color: #999;
}

.wpf-input-wrapper small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.wpf-payment-methods {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wpf-method {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wpf-logo-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.worldpay-logo-img {
    height: 20px;
    width: auto;
}

.wpf-worldpay-logo {
    height: 25px;
    width: auto;
    margin-bottom: 5px;
}

.wpf-method.apple-pay {
    border: none;
    padding: 0;
}

.apple-pay-container {
    padding: 0;
    border-radius: 0; /* Rectangular to match other inputs */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: 140px;
    overflow: hidden;
    border: 1px solid #000;
}

.apple-pay-button {
    background-color: #fff;
    color: #000;
    padding: 5px 15px;
    border-radius: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    width: 100%;
    box-sizing: border-box;
}

.apple-pay-text-area {
    background-color: #000;
    color: #fff;
    padding: 5px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    border-top: 1px solid #333; /* Separator */
    border-radius: 0;
}

.apple-pay-text-area small {
    color: #fff;
    font-size: 10px;
    display: block;
}

.apple-logo {
    font-size: 20px;
    margin-right: 2px;
}

.wpf-cards img {
    height: 20px;
    width: auto;
    border: 1px solid #ccc;
    border-radius: 0;
}

.wpf-submit {
    text-align: center;
    margin-top: 20px;
}

.wpf-submit button {
    background-color: #003366;
    color: white;
    padding: 12px 40px;
    border: none;
    border-radius: 0; /* Rectangular to match input boxes */
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 80%;
}

.wpf-submit p {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.wpf-error-text {
    color: #d32f2f;
    margin-top: 10px;
}

#wpf-message {
    margin-top: 10px;
}

.wpf-success, .wpf-error, .wpf-info {
    padding: 40px;
    text-align: center;
}

.wpf-success h2 { color: #2e7d32; }
.wpf-error h2 { color: #c62828; }
.wpf-info h2 { color: #1565c0; }

.wpf-method.no-amex {
    color: #003366;
    font-weight: bold;
    font-size: 14px;
    flex-direction: row;
    gap: 5px;
}

#wpf-iframe-container {
    min-height: 600px;
    width: 100%;
    margin-top: 20px;
    overflow: visible;
}

.wpf-payment-summary {
    background: #f9f9f9;
    padding: 20px;
    border-bottom: 2px solid #003366;
    margin-bottom: 20px;
}

.wpf-payment-summary h3 {
    margin: 0 0 15px 0;
    color: #003366;
    font-size: 18px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
}

.wpf-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.wpf-summary-item {
    font-size: 14px;
    color: #333;
}

.wpf-summary-item strong {
    color: #003366;
}

#wpf-iframe-target {
    min-height: 600px;
    width: 100%;
}

#wpf-iframe-target iframe, #wpf-iframe-container iframe {
    width: 100% !important;
    min-height: 600px !important;
    border: none;
    display: block;
}

/* Mobile Responsiveness */
@media screen and (max-width: 600px) {
    .wpf-container {
        margin: 0;
        border: none;
        box-shadow: none;
    }

    .wpf-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px 10px;
    }

    .wpf-logo-right {
        justify-content: center;
    }

    .wpf-banner {
        text-align: center;
        padding: 20px 10px;
    }

    .wpf-form {
        padding: 15px;
    }

    .wpf-field {
        flex-direction: column;
    }

    .wpf-field label {
        flex: none;
        width: 100%;
        margin-bottom: 5px;
        padding-top: 0;
    }

    .wpf-input-wrapper {
        width: 100%;
    }

    .wpf-payment-methods {
        flex-direction: column;
        gap: 30px;
        width: 100%;
    }

    .wpf-method {
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .wpf-cards {
        display: flex;
        justify-content: center;
        gap: 5px;
        margin-top: 5px;
    }

    .wpf-method.no-amex {
        justify-content: center;
        margin-top: 10px;
    }

    .apple-pay-container {
        width: 100%;
    }

    .wpf-submit button {
        width: 100%;
    }

    .wpf-success, .wpf-error, .wpf-info {
        padding: 20px 10px;
    }
}
