/* Import Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* Common container width */
.dps-donation-selector,
.dps-checkout-form {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dps-donation-selector {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.dps-category {
    margin-bottom: 1px;
}

.dps-category-header {
    background-color: #4a4a4a;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 1px;
    position: relative;
}

.dps-category-header h3 {
    margin: 0;
    font-weight: 400;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
}

.dps-category-content {
    display: none;
    background: white;
}

.dps-category.active .dps-category-content {
    display: block;
}

.dps-product {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #eee;
    align-items: center;
    background: #f9f9f9;
}

.dps-product:hover {
    background: #f5f5f5;
}

.dps-product-image {
    width: 100px;
    height: 100px;
    margin-right: 20px;
    flex-shrink: 0;
}

.dps-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dps-product-info {
    flex: 1;
}

.dps-product-info h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.dps-product-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

.dps-product-price {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 200px;
}

.dps-product-price span {
    font-size: 16px;
    color: #666;
    min-width: 80px;
    font-family: 'Poppins', sans-serif;
}

.dps-quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dps-quantity-selector button {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    color: #bb2626;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s;
}

.dps-quantity-selector button:hover {
    background: #bb2626;
    color: white;
    border-color: #bb2626;
}

.dps-quantity-selector button.dps-increase {
    width: 40px;
    height: 40px;
    font-size: 20px;
    line-height: 1;
    border: 1px solid #ddd;
    background: white;
    color: #bb2626;
    cursor: pointer;
    transition: background 0.2s;
}

.dps-quantity-selector button.dps-increase:hover {
    background: #bb2626;
    color: white;
    border-color: #bb2626;
}

.dps-quantity-input,
.dps-custom-price-input {
    width: 80px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.dps-header {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dps-total {
    font-size: 18px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

/* Clear cart button text */
.dps-clear-cart {
    padding: 8px 16px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.dps-clear-cart:hover {
    background-color: #555;
}

/* Remove old checkout section */
.dps-checkout-section {
    display: none;
}

/* Style checkout form */
.dps-checkout-form {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

/* Style checkout form fields */
.woocommerce-billing-fields__field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Make all fields full width */
.woocommerce-billing-fields__field-wrapper .form-row {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Form field styles */
.woocommerce-billing-fields__field-wrapper input,
.woocommerce-billing-fields__field-wrapper select {
    width: 100% !important;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

/* Labels */
.woocommerce-billing-fields__field-wrapper label {
    display: block;
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #333;
}

/* Remove any grid or column settings */
#billing_salutation_field,
#billing_first_name_field,
#billing_last_name_field,
#billing_company_field,
#billing_country_field,
#billing_address_1_field,
#billing_address_2_field,
#billing_postcode_field,
#billing_city_field,
#billing_state_field,
#billing_phone_field,
#billing_house_number_field {
    grid-column: unset;
    width: 100% !important;
}

/* Style place order button */
#place_order {
    background-color: #bb2626;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

#place_order:hover {
    background-color: #a01f1f;
}

/* Required field asterisk */
.required {
    color: #bb2626;
}

/* Remove extra spacing */
.woocommerce-billing-fields {
    margin-bottom: 0;
}

/* Style section headings */
.woocommerce-billing-fields h3,
#order_review_heading {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin-bottom: 20px;
}

.dps-product-info::before {
    content: "i";
    display: inline-block;
    width: 18px;
    height: 18px;
    background: #ccc;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    font-style: italic;
    margin-right: 10px;
    vertical-align: middle;
}

.dps-category-header::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
    transition: transform 0.3s;
    position: absolute;
    right: 20px;
    top: 50%;
    margin-top: -5px;
}

.dps-category.active .dps-category-header::after {
    transform: rotate(-135deg);
    margin-top: 0;
}

.dps-category-header::before {
    content: attr(data-total);
    font-size: 14px;
    color: white;
    margin-right: 40px;
}

.dps-custom-price-input {
    width: 100px;
    text-align: right;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}

.dps-custom-price-input:focus {
    border-color: #bb2626;
    outline: none;
    box-shadow: 0 0 0 1px #bb2626;
}

/* Update product price spacing for custom price */
.dps-product-price {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 200px;
}

.dps-product-price span {
    font-size: 16px;
    color: #666;
    min-width: 80px;
    font-family: 'Poppins', sans-serif;
}

/* Fix WooCommerce column width */
.woocommerce .col2-set .col-1,
.woocommerce-page .col2-set .col-1,
.woocommerce .col2-set .col-2,
.woocommerce-page .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
}

/* Checkout layout */
.woocommerce-checkout {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

#customer_details {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

#order_review {
    width: 400px;
    flex-shrink: 0;
    margin-top: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

/* Hide "Billing details" text */
.woocommerce-billing-fields h3 {
    display: none;
}

/* Style order review table */
.woocommerce-checkout-review-order-table {
    border: none !important;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    border: none !important;
    padding: 10px 0 !important;
    font-size: 14px;
}

.woocommerce-checkout-review-order-table thead {
    display: none;
}

/* Cart total styles */
.cart-subtotal,
.order-total {
    border-top: 1px solid #eee !important;
}

.order-total {
    font-size: 16px;
    font-weight: 500;
}

/* Responsive layout */
@media (max-width: 991px) {
    .woocommerce-checkout {
        flex-direction: column;
    }

    #order_review {
        width: 100%;
        position: static;
        margin-top: 40px;
    }
}

/* Hide "Your order" heading */
#order_review_heading {
    display: none !important;
}

/* Empty cart message */
.dps-empty-cart-message {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 4px;
    color: #666;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    margin-top: 20px;
    border: 1px solid #eee;
}

/* Tabs */
.dps-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.dps-tab-button {
    padding: 12px 24px;
    border: none;
    background: none;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    position: relative;
}

.dps-tab-button.active {
    color: #bb2626;
    font-weight: 500;
}

.dps-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #bb2626;
}

/* Tab content */
.dps-tab-content {
    display: none;
}

.dps-tab-content.active {
    display: block;
}

/* Bottom bar */
.dps-bottom-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.dps-clear-selected-donations,
.dps-proceed-checkout {
    padding: 10px 20px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.dps-proceed-checkout {
    background-color: #bb2626;
}

.dps-proceed-checkout:hover {
    background-color: #a01f1f;
}

.dps-clear-selected-donations:hover {
    background-color: #555;
}

.dps-cart-items {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.dps-cart-items h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 15px;
}

.dps-cart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dps-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    transition: background 0.2s;
}

.dps-cart-item:hover {
    background: #f5f5f5;
}

.dps-cart-item-info {
    flex: 1;
}

.dps-cart-item-info h4 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: #333;
}

.dps-cart-item-info span {
    font-family: 'Poppins', sans-serif;
    color: #666;
    font-size: 14px;
}

.dps-remove-cart-item {
    background-color: #bb2626;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: background 0.3s;
}

.dps-remove-cart-item:hover {
    background-color: #a01f1f;
}

.dps-add-custom-price {
    background-color: #bb2626; /* Match the style of other buttons */
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: background 0.3s;
}

.dps-add-custom-price:hover {
    background-color: #a01f1f;
} 