/* assets/css/chamelo-order-list.css */

.chamelo-orders-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.chamelo-order-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.order-info {
    flex: 1;
}

.customer-name {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.order-details {
    display: flex;
    gap: 20px;
    color: #666;
}

.order-actions {
    display: flex;
    gap: 10px;

    position: absolute;
    top: 0;
    right: 0;
}

.order-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.order-actions button img {
    width: 24px;
    height: 24px;
}

/* Modal Styles */
#chamelo-edit-order-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.save-order {
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
}

#chamelo-edit-order-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.order-item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control input {
    width: 30px;
    height: 30px;
    text-align: center;
    border-radius: 0px;
    border: 0;
    border-width: 1px 0px 1px 0px;
    border-style: solid;
    border-color: #ccc;
}

.quantity-control .quantity-input {
    margin: 0;
}

#chamelo-order-summary .checkout .order-items .order-item input[type=number] {
    padding: 0 !important;
}

.quantity-control .increase-order,  
.quantity-control .decrease-order {
    width: 30px;
    height: 30px;
    border-radius: 0px;
    border: 1px solid #ccc;
    background-color: #FFF;
    color: #000;
    font-size: 17px;
    cursor: pointer;
    line-height: 0;
}

.quantity-control .increase-order {
    border-radius: 0 6px 6px 0;
}

.quantity-control .decrease-order {
    border-radius: 6px 0 0 06px;
}

.save-order {
    width: 100%;
    padding: 10px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
}

.order-total-wrapper {
    text-align: right;
    font-size: 18px;
}

.order-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.add-item-button {
    background: #000;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.remove-item {
    background: #ff4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

#products-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

#products-selection-modal .modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.product-search {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.products-list {
    max-height: 400px;
    overflow-y: auto;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-price {
    color: #666;
    font-size: 0.9em;
}

.add-to-order {
    background: #000;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.modal-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: right;
}

.finish-product-selection {
    background: #000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}

.product-details {
    display: flex;
    gap: 10px;
    color: #666;
    font-size: 0.9em;
}

.product-stock {
    color: #888;
}

@media(max-width: 767px) {
    .chamelo-order-item {
        padding: 12px;
    }
}