/**
 * Frontend Styles - WooCommerce Matrice (Partea 1)
 */

/* 1. Stepper Liniar de Progres */
.matrice-stepper-wrapper {
    margin: 20px 0 30px;
    width: 100%;
}

.matrice-stepper-list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.matrice-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    text-align: center;
}

.matrice-step-indicator {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    z-index: 2;
    background: #e0e0e0;
    color: #666;
}

.matrice-step-label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #888;
}

/* Starea Pending (Gri) */
.matrice-step-item.is-pending .matrice-step-indicator {
    background: #ebebeb;
    color: #999;
}
.matrice-step-item.is-pending .matrice-step-check {
    display: none;
}

/* Starea Active (Portocaliu) */
.matrice-step-item.is-active .matrice-step-indicator {
    background: #ff7a00;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.2);
}
.matrice-step-item.is-active .matrice-step-label {
    color: #111;
    font-weight: 700;
}
.matrice-step-item.is-active .matrice-step-check {
    display: none;
}

/* Starea Completed (Bifă) */
.matrice-step-item.is-completed .matrice-step-indicator {
    background: var(--e-global-color-primary);
    color: #fff;
}
.matrice-step-item.is-completed .matrice-step-number {
    display: none;
}
.matrice-step-item.is-completed .matrice-step-check {
    display: inline-block;
    font-size: 20px;
}

/* Linia de legătură dintre pași */
.matrice-step-line {
    position: absolute;
    top: 19px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: #e0e0e0;
    z-index: 1;
}
.matrice-step-item.is-completed .matrice-step-line {
    background: var(--e-global-color-primary);
}

/* 2. Container Flux Popup */
.matrice-booking-flow {
    width: 100%;
    margin: 0 auto;
    font-family: inherit;
}
.matrice-qty-stepper {display:flex;}
.matrice-panel-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #222;
}

.matrice-rooms-table,
.matrice-options-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.matrice-rooms-table th,
.matrice-options-table th {
    background: #f8f9fa;
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 2px solid #e9ecef;
}

.matrice-row td {
    padding: 14px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
/* 3. Carduri Camere și Opțiuni */
.matrice-room-card,
.matrice-option-card {
display: flex;
align-items: flex-start;
gap: 14px;
}
.ro-tooltip-anchor {max-height:16px;}
.matrice-room-thumb img,
.matrice-option-thumb img {
width: 100%;
height: auto;
object-fit: cover;
border-radius: 6px;
display: block;
}
.matrice-room-title,
.matrice-option-title {
display: inline-block;

}
.matrice-option-duration {
font-size: 13px;
margin-left: 6px;
}
.matrice-room-desc,
.matrice-option-desc {
margin: 4px 0 6px 0;
line-height: 1.4;
}
/* 4. Prețuri și Tăieturi */
.matrice-room-price-info .price-regular.strikethrough {
text-decoration: line-through;
color: #999;
margin-right: 6px;
}
.matrice-col-details {border:0!important;}
.matrice-room-price-info .price-sale {
color: var(--wd-primary-color);

}
.matrice-room-price-info .price-current {
color: #111;
font-weight: 700;
font-size: 15px;
}
.matrice-room-price-info .price-unit,
.matrice-price-per-person .price-label {
font-size: 12px;
color: #777;
margin-left: 3px;
}
.matrice-price-per-person .price-value {
font-size: 15px;
font-weight: 700;
color: #111;
}
/* 5. Capacitate și Badge Epuizat */
.matrice-capacity-badge {
display: inline-block;
background: #f1f3f5;
color: #495057;
padding: 4px 10px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
}
.matrice-badge-soldout {
display: inline-block;
background: #fee2e2;
color: #b91c1c;
padding: 4px 10px;
border-radius: 4px;
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
}
tr.is-sold-out {
opacity: 0.55;
}
/* --- 6. Antet Popup: Total Stanga Sus & Butoane Dreapta Sus --- */
.matrice-popup-header {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 15px;
padding: 15px 20px;
margin-bottom: 20px;
background: #f8f9fa;
border: 1px solid #e9ecef;
border-radius: 8px;
}
.matrice-popup-header .matrice-total-box {
display: flex;
flex-direction: column;
}
.matrice-popup-header .matrice-total-label {
font-size: 13px;
color: #6c757d;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 2px;
}
.matrice-popup-header .matrice-total-amount {
font-size: 24px;
font-weight: 700;
color: #ff7a00;
line-height: 1.2;
}
.matrice-popup-header .matrice-actions-box {
display: flex;
align-items: center;
gap: 10px;
}
/* --- 7. Link-uri Stepper (Cos & Checkout catre Produs) --- */
.matrice-step-link {
display: flex;
flex-direction: column;
align-items: center;
text-decoration: none !important;
color: inherit !important;
transition: transform 0.2s ease;
z-index:2;
}
.matrice-step-link:hover {
transform: translateY(-2px);
}
.matrice-step-link:hover .matrice-step-label {
color: #ff7a00;
text-decoration: underline;
}
/* --- 8. Stilizare HTML Fee-uri in Cos & Checkout --- */
.matrice-fee-title,
.matrice-fee-opt-title {
font-weight: 700;
color: #111;
}
.matrice-fee-desc {
color: #555;
font-weight: 400;
}
.matrice-fee-capacity {
font-weight: 600;
color: #333;
}
.matrice-fee-qty,
.matrice-fee-opt-qty {
display: inline-block;
background: #eef2f7;
color: #1d2327;
padding: 1px 6px;
border-radius: 4px;
font-weight: 600;
font-size: 0.9em;
margin-left: 3px;
}
.matrice-cart-remove-link {
display: inline-block;
color: #d63638 !important;
font-size: 12px;
font-weight: 600;
text-decoration: none !important;
margin-left: 8px;
padding: 1px 5px;
border-radius: 3px;
background: #fcf0f1;
}
.matrice-cart-remove-link:hover {
background: #d63638;
color: #fff !important;
}
/* Buton rotund X in stanga fee-ului */
.matrice-cart-remove-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #ededed;
    color: #222 !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    margin-right: 12px;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.matrice-cart-remove-icon:hover {
    background-color: #d63638;
    color: #fff !important;
}


/* Forțează ordinea vizuală în tabelul de totaluri din Coș și Checkout */
.woocommerce-cart .cart_totals table tbody,
.woocommerce-checkout .woocommerce-checkout-review-order-table tbody {
    display: flex;
    flex-direction: column;
}
.woocommerce-checkout-review-order-table tfoot {display:flex;flex-direction:column;}
.woocommerce-checkout-review-order-table .cart-subtotal, .woocommerce-checkout-review-order-table .wd-checkout-prod-total  {display:none!important;}

    .matrice-fee-title {font-weight:700;}
.cart_item .product-quantity:after, .woocommerce-table--order-details .product-quantity:after {content:" pers.";}
tr.fee:has(.matrice-fee-title) {
    order: 10 !important;
}

tr.fee:has(.matrice-fee-opt-title) {
    order: 20 !important;
}
tr.fee th {width:100%;}
/* 3. Subtotal, transport sau alte linii standard la locul lor */
tr.cart-subtotal {
    order: 1 !important;
}
tr.shipping {
    order: 30 !important;
}
tr.order-total {
    order: 40 !important;
}
