.collab-cart-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Page title */
.collab-cart-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Control buttons and input field */
.collab-cart-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.collab-cart-controls input {
    flex-grow: 1;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.collab-cart-controls button,
.collab-add-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#collab-cart-join-btn {
    background-color: #0073aa;
    color: white;
}
#collab-cart-join-btn:hover {
    background-color: #005f88;
}
#collab-cart-join-btn:active {
    transform: translateY(1px);
}

#collab-cart-share-btn {
    background-color: #28a745;
    color: white;
}
#collab-cart-share-btn:hover {
    background-color: #218838;
}
#collab-cart-share-btn:active {
    transform: translateY(1px);
}

.collab-add-btn {
    background-color: #f7a000;
    color: white;
    font-size: 0.9rem;
}
.collab-add-btn:hover {
    background-color: #dd9200;
}
.collab-add-btn:active {
    transform: translateY(1px);
}

/* Shared code display area */
.collab-cart-code-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #e9ecef;
    border-radius: 6px;
}

.collab-cart-code-display p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #555;
}

#collab-cart-code-value {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #fff;
    border: 1px dashed #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1.2rem;
    color: #333;
    letter-spacing: 1px;
}

/* Main content area */
.collab-cart-content {
    border-top: 1px solid #ccc;
    padding-top: 2rem;
}

.placeholder-text,
.loading-text,
.error-text,
.info-text {
    text-align: center;
    font-style: italic;
    color: #666;
}

.error-text {
    color: #dc3545;
    font-weight: bold;
}

/* Cart items list */
.cart-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item:hover {
    background-color: #f1f1f1;
}

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.item-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-weight: bold;
    color: #333;
}

.product-quantity,
.product-price {
    font-size: 0.9rem;
    color: #777;
}

.product-price {
    font-weight: 500;
    color: #000;
}

/* Responsive design for smaller screens */
@media (max-width: 600px) {
    .collab-cart-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .collab-cart-controls input,
    .collab-cart-controls button,
    .collab-add-btn {
        width: 100%;
    }
}

.collab-cart-content .cart_item .product-thumbnail img {
    width: 54px;
    height: auto;
}

.collab-qty-box {
    display: inline-block;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 70px; /* adjust width */
    overflow: hidden;
}

.collab-qty-box input.qty {
    width: 100%;
    height: 36px;
    padding: 0 5px;
    border: none;
    text-align: center;
    box-sizing: border-box;
    font-size: 14px;

    /* Force native arrows always */
    -webkit-appearance: textfield !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Webkit browsers (Chrome, Safari, Edge) */
.collab-qty-box input.qty::-webkit-inner-spin-button,
.collab-qty-box input.qty::-webkit-outer-spin-button {
    -webkit-appearance: spinner-button !important;
    display: block !important;
    opacity: 1 !important;
    margin: 0;
}

/* Firefox */
.collab-qty-box input.qty::-moz-inner-spin-button,
.collab-qty-box input.qty::-moz-outer-spin-button {
    -moz-appearance: spinner-button !important;
    display: block !important;
    opacity: 1 !important;
}

/* Override focus/hover */
.collab-qty-box input.qty:hover,
.collab-qty-box input.qty:focus {
    -webkit-appearance: textfield !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.collab-qty-box input.qty:hover::-webkit-inner-spin-button,
.collab-qty-box input.qty:hover::-webkit-outer-spin-button,
.collab-qty-box input.qty:focus::-webkit-inner-spin-button,
.collab-qty-box input.qty:focus::-webkit-outer-spin-button {
    -webkit-appearance: spinner-button !important;
    display: block !important;
    opacity: 1 !important;
}


/* add to collab-cart.css */
#collab-cart-content.multi-cart-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.collab-cart-instance {
    flex: 1 1 320px; /* responsive boxes side-by-side */
    min-width: 280px;
}

/* Collab Cart Quantity Box */
.collab-qty-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Input field */
.collab-qty-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    padding: 0;
    -moz-appearance: textfield; /* Firefox hide arrows */
}

/* Hide default arrows in Chrome/Safari */
.collab-qty-input::-webkit-outer-spin-button,
.collab-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Plus & Minus Buttons */
.collab-qty-box button {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    font-size: 18px;
    line-height: 1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collab-qty-box button:hover {
    background: #ff007f;  /* match your site accent */
    color: #fff;
    border-color: #ff007f;
}


/*----------------------- responsive design --------------------------*/
@media screen and (max-width: 768px) {
  .collab-cart-content table,
  .collab-cart-content thead,
  .collab-cart-content tbody,
  .collab-cart-content th,
  .collab-cart-content td,
  .collab-cart-content tr {
    display: block;
    /*width: 100%;*/
  }

  .collab-cart-content thead tr {
    display: none; /* hide headers */
  }

  .collab-cart-content tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    display: flex;
    justify-content: space-between;
  }

  .collab-cart-content td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border: none;
    border-bottom: 1px solid #eee;
  }

  .collab-cart-content td:last-child {
    border-bottom: none;
  }

  .collab-cart-content td:before {
    font-weight: bold;
    flex: 1;
    /*text-align: left;*/
    /*padding-right: 10px;*/
  }
  
    .comment-text table.wp-block-table th, .lte-text-page table.wp-block-table th, .comment-text table.shop_table th, .lte-text-page table.shop_table th, .comment-text table.lte-table th, .lte-text-page table.lte-table th, .comment-text table.wp-block-table td, .lte-text-page table.wp-block-table td, .comment-text table.shop_table td, .lte-text-page table.shop_table td, .comment-text table.lte-table td, .lte-text-page table.lte-table td {
        font-size: 12px;
        padding: 0px 12px;
    }
    
    .collab-qty-control {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .collab-qty-input {
        width: 50px;
        height: 40px;
    }
}

