/* Solar Pro — WooCommerce thank you / order received */

/* Default WC blocks — replaced by .sp-thankyou-card / custom message */
.woocommerce-order-received .woocommerce-order-overview,
.woocommerce-order-received .woocommerce-order-details,
.woocommerce-order-received .woocommerce-customer-details,
.woocommerce-order-received table.woocommerce-table--order-details.shop_table.order_details,
.woocommerce-order-received .woocommerce-notice.woocommerce-thankyou-order-received {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
}

/* Collapse empty wrappers left by hidden WC markup */
.woocommerce-order-received .woocommerce-order > p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.sp-thankyou-booking-message,
.thankyou-booking-message {
    margin: 0 0 20px;
    padding: 14px 18px;
    background: rgba(196, 22, 28, 0.08);
    border: 1px solid rgba(196, 22, 28, 0.22);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    text-align: right;
    direction: rtl;
    line-height: 1.5;
}

.sp-thankyou-card {
    margin: 20px 0 30px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(196, 22, 28, 0.2);
    box-shadow: 0 6px 24px rgba(0, 59, 102, 0.08);
    direction: rtl;
    text-align: right;
}

.sp-thankyou-card__header {
    background: #c4161c;
    padding: 14px 20px;
    text-align: center;
}

.sp-thankyou-card__header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.sp-thankyou-card__body {
    padding: 20px;
}

.sp-thankyou-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.sp-thankyou-grid__item {
    border-bottom: 1px solid #e8eef2;
    padding-bottom: 10px;
}

.sp-thankyou-grid__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-bottom: 4px;
}

.sp-thankyou-grid__value {
    color: #111;
    font-size: 15px;
    font-weight: 800;
}

.sp-thankyou-services {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed rgba(196, 22, 28, 0.25);
}

.sp-thankyou-services__title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 800;
    color: #111;
}

.sp-thankyou-table-wrap {
    overflow-x: auto;
    border: 1px solid #e8eef2;
    border-radius: 12px;
}

.sp-thankyou-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sp-thankyou-table thead th {
    padding: 10px 14px;
    background: #f4f7f9;
    color: #666;
    font-weight: 800;
    text-align: right;
    border-bottom: 1px solid #e8eef2;
}

.sp-thankyou-table thead th.sp-thankyou-col-price {
    text-align: left;
}

.sp-thankyou-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    color: #111;
    vertical-align: top;
}

.sp-thankyou-table tbody tr:last-child td {
    border-bottom: none;
}

.sp-thankyou-table .sp-thankyou-col-service {
    font-weight: 700;
    color: #111;
}

.sp-thankyou-table .sp-thankyou-col-price {
    text-align: left;
    white-space: nowrap;
    font-weight: 800;
    color: #111;
}

.sp-thankyou-table .sp-thankyou-price-cell,
.sp-thankyou-table .sp-thankyou-price-cell .sp-price-sar,
.sp-thankyou-table .sp-thankyou-price-cell .sp-price-sar__amount {
    color: #111;
}

.sp-thankyou-price-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.sp-thankyou-card .sp-price-display--thankyou.sp-price-display--on-sale {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    direction: rtl;
}

.sp-thankyou-table tfoot td {
    padding: 12px 14px;
    background: rgba(196, 22, 28, 0.06);
    font-weight: 800;
    border-top: 1px solid #e8eef2;
}

.sp-thankyou-table tfoot .sp-thankyou-col-price {
    color: #c4161c;
    font-size: 16px;
}

.sp-thankyou-card .sp-price-sar {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 5px;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.sp-thankyou-card .sp-price-sar__amount {
    font-variant-numeric: tabular-nums;
}

.sp-thankyou-card .sp-price-regular--plain {
    color: #999;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

/* Old price — line through (::after works with SAR icon font). */
.sp-thankyou-card del.sp-price-regular,
.sp-thankyou-card .sp-price-regular--strike {
    position: relative;
    display: block;
    color: #999 !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}

.sp-thankyou-card del.sp-price-regular::after,
.sp-thankyou-card .sp-price-regular--strike::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: #999;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

.sp-thankyou-card del .sp-price-sar,
.sp-thankyou-card del .sp-price-sar__amount,
.sp-thankyou-card del .sp-price-sar__symbol {
    color: #999 !important;
    text-decoration: none !important;
}

.sp-thankyou-card .sp-price-sale,
.sp-thankyou-card ins.sp-price-sale {
    color: #c4161c;
    text-decoration: none;
    font-size: 15px;
    font-weight: 800;
}

.sp-thankyou-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px dashed rgba(0, 59, 102, 0.2);
    text-align: center;
}

.sp-thankyou-footer__payment {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.sp-thankyou-footer__payment strong {
    color: #111;
}

.sp-thankyou-footer__order {
    margin: 10px 0 0;
    font-size: 16px;
    font-weight: 800;
    color: #c4161c;
}

@media (max-width: 640px) {
    .sp-thankyou-grid {
        grid-template-columns: 1fr;
    }

    .sp-thankyou-table {
        font-size: 12px;
    }

    .sp-thankyou-table thead th,
    .sp-thankyou-table tbody td,
    .sp-thankyou-table tfoot td {
        padding: 8px 10px;
    }
}
