/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #f9f9f9;
}

.hidden {
    display: none; 
}

.dimmed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 999; /* Below the spinner */
    pointer-events: none;
}

.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* Above the dimmed overlay */
}

.spinner {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

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

/* Current User Section */
#affinipay-current-user-container {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #e6f9e6; /* Light green background */
    border: 1px solid #b2d8b2; /* Subtle green border */
    border-radius: 4px;
    font-weight: bold;
    font-size: 1rem;
    color: #155724; /* Dark green text */
}

#current-user {
    font-weight: bold;
    color: #005b33;
}

/* Alerts Section */
#affinipay-alerts-container
 {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.95rem;
    text-align: center;
    display: none; /* Hidden by default, shown dynamically */
}

/* Success Alert */
#affinipay-alerts-container.alert-success,
#affinipay-current-user-container.alert-success,
#affinipay-submit-button.alert-success {
    background-color: #d4edda; /* Light green background */
    color: #155724; /* Dark green text */
    border: 1px solid #c3e6cb;
}

/* Error Alert */
#affinipay-alerts-container.alert-error,
#affinipay-current-user-container.alert-error,
#affinipay-submit-button.alert-error {
    background-color: #f8d7da; /* Light red background */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb;
}

/* Warning Alert */
#affinipay-alerts-container.alert-warning,
#affinipay-current-user-container.alert-warning,
#affinipay-submit-button.alert-warning {
    background-color: #fff3cd; /* Light yellow background */
    color: #856404; /* Dark yellow text */
    border: 1px solid #ffeeba;
}

/* Info Alert */
#affinipay-alerts-container.alert-info
#affinipay-current-user-container.alert-info
#affinipay-submit-button.alert-info {
    background-color: #d1ecf1; /* Light blue background */
    color: #0c5460; /* Dark blue text */
    border: 1px solid #bee5eb;
}

/* Payment Form Container */
.payment-form-container {
    min-width: 425px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#dues-payment-container .payment-form-container {
    margin: initial !important;
    padding: initial !important;
    box-shadow: initial !important;
    background: initial !important;
    border-radius: initial !important;
}

/* Form Headings */
h2#form-heading {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #005b33;
    text-align: center;
}

/* Form Group Styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    color: #555;
}

/* Input, Select, and Hosted Field Styling */
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group select,
.hosted-field {
    width: 100%;
    padding: 8px 12px;
    font-size: 1rem;
    line-height: 1.6;
    border: 1px solid #ccc;
    border-radius: 4px; /* Rounded corners */
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
    border-radius: 4px;
}

/* Focus State */
.form-group input:focus,
.hosted-field:focus-within {
    outline: none;
    border-color: #005b33;
    box-shadow: inset 0 0 2px #005b33;
}

/* Hosted Field Styling */
.hosted-field {
    position: relative;
    height: 45px; /* Set a consistent height */
    /*  border: 1px solid red; /* Default invalid */
    border-radius: 4px;
    overflow: hidden;
    /* background-color: rgba(255, 0, 0, 0.1); Invalid state by default */
    padding: 0;
}

.hosted-field iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
}

/* Validation States */
.input-error,
.hosted-field.input-error {
    border: 1px solid red !important;
    background-color: rgba(255, 0, 0, 0.1) !important;
    color: #721c24 !important;
}

.input-valid,
.hosted-field.input-valid {
    /* border: 1px solid green !important; */
    background-color: (#ffffff) !important;
    /* color: #155724 !important; */
} 

/* Form Row Layout */
.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

.form-group.quarter {
    flex: 0.5;
}

.form-group.two-thirds {
    flex: 2;
}

.form-group.full {
    flex: 1 0 100%;
}

/* Card Number Larger */
#credit-card {
    height: 45px;
    font-size: 1.2rem;
}

#state{
    height: 44px;
    font-size: 1rem;
}

/* Smaller Expiration and CVV */
#expires,
#cvv {
    height: 45px;
    font-size: 1rem;
}

/* Payment Method Options */
.payment-method-options {
    display: flex;
    gap: 15px;
    padding-bottom: 25px;
}

.radio-heading {
    margin-bottom: 10px;
}

.radio-option input {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #555;
    border-radius: 50%;
    margin-right: 5px;
    cursor: pointer;
}

.radio-option input:checked {
    background-color: #005b33;
    border-color: #005b33;
}

/* Cost Summary */
#affinipay-cost-summary-container {
    margin: 20px 0;
    border-top: 2px solid #ccc;
    padding-top: 10px;
}

.summary-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
}

.summary-section.highlight-discounts {
    color: #005b33;
    font-weight:600;
}

.summary-section.highlight-costs {
    color: hsl(0, 100%, 18%);
    font-weight:600;
}

.summary-section.highlight-total {
    /* add a top border above the total */
    border-top: 1px solid #ccc;
    font-weight: bolder;
}

/* Submit Button */
.submit-button {
    background: #005b33;
    color: white;
    font-size: 1rem;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.3s ease;
    width: 100%;
}

.submit-button:hover {
    background: #007744;
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.count-items {
    display: inline-flex;
    align-items: center;
    margin: 5px 0;
    background-color: var(--accent);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.count-items::before {
    content: "\f174"; /* Dashicon cart icon */
    font-family: "Dashicons";
    margin-right: 8px;
    color: #ffffff; /* Make the icon white */
    font-size: 1.2em; /* Increase the size of the icon */
}

.count-items:hover,
.count-items:focus {
    background-color: var(--accent-2);
    color: #e0e0e0;
    outline: none;
}

.count-items:active {
    background-color: #003f5c;
    color: #c0c0c0;
}

.count-items:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.cart-icon-link {
    display: flex;
    align-items: center;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
    }

    .form-group.half,
    .form-group.quarter,
    .form-group.two-thirds {
        flex: 1 0 100%;
    }

    #credit-card {
        font-size: 1rem;
        height: 45px;
    }
}
/* Cart container */
#cart-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    /* padding: 20px; */
    /* background-color: #f9f9f9; */
    border-radius: 8px;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
    margin-bottom: 20px;
    margin-top: 20px;
}

/* Cart items container */
#cart-items {
    flex: 1 1 60%;
    margin-bottom: 20px;
}

/* Cart payment container */
#cart-payment {
    flex: 1 1 30%;
    /* padding: 0px; */
    background-color: #ffffff;
    border-radius: 8px;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
}

#cart-payment .payment-form-container {
    /*padding: 5px;*/
    margin: 0px;
    min-width: 475px;
}

/* Cart item container */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    background-color: #f9f9f9;
    margin-bottom: 10px;
    border-radius: 8px;
}

/* Cart item image */
.cart-item-image {
    flex: 0 0 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #005b33; /* Green color for the icon */
}

/* Cart item details */
.cart-item-details {
    flex: 1;
    padding: 0 15px;
}

.cart-item-details .item-title {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
}

.cart-item-details .item-date,
.cart-item-details .item-venue,
.cart-item-details .item-credits {
    margin: 5px 0;
    font-size: 0.875rem;
    color: #666;
}

/* Cart item price */
.cart-item-price {
    flex: 0 0 100px;
    text-align: right;
}

.cart-item-price .price {
    font-size: 1.25rem;
    color: #333;
    margin: 0 0 10px;
}

.cart-item-price .remove-item-btn {
    background-color: #d9534f; /* Bootstrap danger color */ 
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cart-item-price .remove-item-btn:hover {
    background-color: #c9302c; /* Darker danger color */
}

/* Responsive design */
@media (max-width: 768px) {
    #cart-container {
        flex-direction: column;
        padding: 15px;
    }

    #cart-items,
    #cart-payment .payment-form-container, .gb-container .gb-container-c14f3aa5 .payment-form-container {
        padding: 15px;
        min-width:100%;
    }
    .cart-item{
        display:flex;
        flex-direction: column;
        flex-wrap:wrap;
        align-items:center;
        justify-content: space-between;
    }
}

/* Modal Background Overlay */
.modal {
    display: block; /* Ensure it’s visible */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Avoid scrolling inside the modal */
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
}

/* Modal Content Box */
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #f8f8f8; /* Matches the site's light gray */
    padding: 20px;
    border: 2px solid #007a33; /* Matches the green from the site */
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* Subtle shadow for depth */
    font-family: 'Arial', sans-serif; /* Match site's font style */
    color: #333; /* Dark text for readability */
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dcdcdc;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Modal Title */
#modal-title {
    margin: 0;
    font-size: 1.25em;
    font-weight: bold;
    color: #007a33; /* Matches the green */
}

/* Close Button */
.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #007a33; /* Matches site's green */
    padding: 0;
}

.close-modal-btn:hover {
    color: #005922; /* Darker green for hover effect */
}

/* Modal Body */
.modal-body {
    margin: 20px 0;
    font-size: 1em;
    color: #555; /* Subtle text color for readability */
    line-height: 1.5;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #dcdcdc;
    padding-top: 10px;
}

/* OK Button */
.modal-footer .button {
    padding: 10px 20px;
    background-color: #007a33; /* Matches site's green */
    color: #fff; /* White text */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.modal-footer .button:hover {
    background-color: #005922; /* Darker green for hover effect */
}


.container {
    /* max-width: 900px; */
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Generic Flexbox Layout for Sections */
.container-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
}

.flex-item {
    flex: 1;
    padding: 20px;
    border: 1px solid #ece9e9;
    background: #fff;
    border-radius: 6px;
}

.flex-half {
    flex: 0.48; /* Two-column layout */
}
.flex-full {
    flex: 1 100%; /* Full-width item */
}


