body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    color: #444;
}

.page-title {
    background-color: #5a4694; /* Example purple */
    color: white;
    padding: 15px 30px;
    margin: 0 0 30px 0;
    font-weight: 400;
}

h2 {
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    padding: 0 30px; /* Add horizontal padding */
    max-width: 1200px; /* Limit overall width */
    margin: 0 auto; /* Center container */
}

.checkout-form,
.payment-section {
    flex: 1; /* Takes up available space */
    min-width: 320px; /* Minimum width before wrapping */
    background-color: #fff;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px; /* Space below sections */
}

/* Style individual form fields */
.form-field {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.9em;
    color: #555;
}

label span.required {
    color: red;
    margin-left: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"], /* Add other types as needed */
select,
textarea {
    width: 100%; /* Use full width */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
    font-size: 1em;
}

select {
     height: 40px; /* Consistent height for selects */
     background-color: white; /* Ensure background for selects */
}

textarea {
    min-height: 80px;
}


button#pay-button {
    background-color: #5a4694; /* Match title bar */
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
    width: 100%;
    transition: background-color 0.2s ease;
}

button#pay-button:hover:not(:disabled) {
     background-color: #4a367d; /* Darker shade on hover */
}


button#pay-button:disabled {
    background-color: #a9a9a9; /* Lighter grey when disabled */
    cursor: not-allowed;
}

#order-summary {
    background-color: #fdfdfd;
    border: 1px solid #eee;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}
#order-summary h4 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}
#order-summary ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}
#order-summary li {
    margin-bottom: 5px;
    font-size: 0.95em;
}
#order-summary p {
    margin: 8px 0;
}
#order-summary strong {
    font-size: 1.1em;
}


#stripe-iframe-container {
    border: 1px solid #ddd; /* Solid border */
    padding: 0; /* Remove padding, let iframe content handle it */
    margin-top: 20px;
    min-height: 150px; /* Adjust based on Stripe Element style */
    border-radius: 4px;
    overflow: hidden; /* Hide potential iframe scrollbars if sized correctly */
}
#stripe-iframe-container p { /* Hide the 'Loading...' text */
    display: none;
}


#payment-status, #shipping-recalc-status {
    margin-top: 15px;
    font-weight: bold;
    min-height: 20px; /* Prevent layout shift */
    text-align: center;
    color: #5a4694;
}
#payment-status:empty, #shipping-recalc-status:empty {
     min-height: 0; /* Collapse if empty */
}


/* Basic responsive adjustments */
@media (max-width: 800px) {
    .container {
        flex-direction: column;
        padding: 0 15px; /* Adjust padding */
    }
}
