.clg-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

.clg-form-section, .clg-preview-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    box-sizing: border-box;
}

.clg-form-section {
    border-right: 1px solid #eee;
}

/* Override theme styles for the wrapper class to prevent shrinking */
.clg-container .clg-form-section.pt-order-review-wrapper {
    width: 100% !important;
    float: none !important;
    flex: 1;
    max-width: none !important;
}

.clg-preview-section {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    position: relative;
}

/* Download PDF Button */
.clg-download-btn {
    position: absolute;
    top: 70px;
    right: 20px;
    background: transparent;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    color: #333;
    padding: 8px;
    transition: background 0.2s;
    z-index: 10;
}

.clg-download-btn:hover {
    background-color: rgba(66, 133, 244, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

h2, h3 {
    color: #333;
    margin-top: 0;
}

/* Custom Search Styles */
.clg-search-container {
    position: relative;
    margin-bottom: 30px;
}

.clg-search-wrapper {
    display: flex;
    gap: 10px;
}

.clg-search-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #333;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.clg-search-wrapper button {
    background-color: #f36c25;
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.clg-search-wrapper button:hover {
    background-color: #d65a18;
}

.clg-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.clg-search-results.active {
    display: block;
}

.clg-search-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.1s;
}

.clg-search-item:last-child {
    border-bottom: none;
}

.clg-search-item:hover {
    background-color: #f5f5f5;
}

/* Preview Styles */
.clg-letter-header {
    background-color: #4285f4;
    color: white;
    padding: 10px 15px;
    margin: -20px -20px 20px -20px;
}

.clg-letter-header h2 {
    color: white;
    margin: 0;
    font-size: 18px;
}

.clg-letter-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.clg-recipient-address {
    margin-bottom: 20px;
    white-space: pre-line;
}

.clg-date {
    margin-bottom: 20px;
}

.clg-subject {
    margin-bottom: 20px;
}

.clg-salutation {
    margin-bottom: 15px;
}

.clg-body p {
    margin-bottom: 15px;
}

.clg-summary {
    background: #f9f9f9;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.summary-row {
    margin-bottom: 5px;
}

.clg-signature {
    margin-top: 30px;
    font-family: 'Brush Script MT', cursive;
    font-size: 24px;
    color: #4285f4;
}

.terms-checkbox {
    margin: 20px 0;
    font-size: 14px;
}

.terms-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
}

.terms-checkbox a {
    color: #4285f4;
    text-decoration: none;
}

/* WooCommerce Checkout Integration Styles */
.clg-checkout-section {
    margin-top: 40px;
    background: #f4f6f9;
    padding: 20px; /* Reduced padding */
    border-radius: 8px;
    clear: both;
    width: 100%;
    box-sizing: border-box;
}

.clg-checkout-section h3 {
    margin-bottom: 20px;
}

/* Hide fields we sync (Billing) */
.clg-checkout-section .woocommerce-billing-fields {
    display: none;
}

/* Hide Additional Fields (Order Notes) */
.clg-checkout-section .woocommerce-additional-fields {
    display: none;
}

/* Hide Coupon */
.clg-checkout-section .woocommerce-form-coupon-toggle,
.clg-checkout-section .woocommerce-form-coupon {
    display: none !important;
}

/* Style Order Review / Payment Section */
#order_review_heading {
    display: none;
}

#order_review {
    background: #fff;
    padding: 15px; /* Reduced padding */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    width: 100% !important;
    box-sizing: border-box;
}

/* Table styling for "Je Bestelling" */
#order_review table.shop_table {
    border: none;
    width: 100% !important;
    table-layout: fixed;
}

#order_review table.shop_table th,
#order_review table.shop_table td {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

/* Payment Methods Styling */
#payment {
    background: transparent !important;
}

#payment ul.payment_methods {
    border-bottom: none !important;
    padding: 0 !important;
}

#payment div.place-order {
    padding: 20px 0 0 0 !important;
    background: transparent !important;
}

/* Place Order Button */
#place_order {
    width: 100% !important;
    background-color: #6200ea !important; /* Purple from Photo 2 */
    color: white !important;
    padding: 15px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    border-radius: 50px !important;
    transition: background 0.2s;
    white-space: normal !important;
    display: block !important;
}

#place_order:hover {
    background-color: #4a00b0 !important;
}

@media (max-width: 768px) {
    .clg-container {
        flex-direction: column;
    }
    .clg-form-section {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
}

/* Category Browser Styles */
.clg-browser-container {
    font-family: Arial, sans-serif;
    margin: 20px 0;
}

.clg-view h3 {
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
    border-bottom: 2px solid #4285f4;
    padding-bottom: 10px;
    display: inline-block;
}

/* Category Grid */
.clg-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.clg-category-btn {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.clg-category-btn:hover {
    background-color: #4285f4;
    color: white;
    border-color: #4285f4;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Company List */
.clg-company-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
}

.clg-company-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: background 0.2s;
}

.clg-company-item a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.clg-company-item:hover {
    background-color: #f0f7ff;
    border-color: #4285f4;
}

.clg-company-item:hover a {
    color: #4285f4;
}

/* Back Button */
#clg-back-btn {
    background: transparent;
    border: 1px solid #ccc;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 14px;
    color: #555;
    transition: all 0.2s;
}

#clg-back-btn:hover {
    background: #f5f5f5;
    color: #333;
    border-color: #999;
}
