.stx-rental-fields {
    margin: 1rem 0;
}

.stx-product-quantity-label {
    display: block;
    margin: 0.5rem 0 0.25rem;
    font-weight: 600;
}

.stx-checkout-rental-section {
    margin-top: 0;
    padding: 1rem 1.1rem;
    border: 1px solid #d7e4f2;
    border-radius: 10px;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9fe 100%);
}

.stx-checkout-rental-section h3 {
    margin: 0 0 0.35rem;
}

.stx-checkout-rental-note {
    margin: 0 0 0.9rem;
    color: #5f6b7a;
    font-size: 0.92em;
}

.stx-checkout-contact-section {
    margin-top: 0;
    padding: 1rem 1.1rem;
    border: 1px solid #e8d7f2;
    border-radius: 10px;
    background: linear-gradient(180deg, #fdfbff 0%, #f9f5fe 100%);
}

.stx-checkout-contact-section h3 {
    margin: 0 0 0.35rem;
}

.stx-checkout-contact-note {
    margin: 0 0 0.9rem;
    color: #5f6b7a;
    font-size: 0.92em;
}

.stx-contact-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stx-contact-row .form-row {
    flex: 1;
}

.stx-contact-row input[type="text"],
.stx-contact-row input[type="email"],
.stx-contact-row input[type="tel"] {
    width: 100%;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 0.95em;
    box-sizing: border-box;
    background: #fff;
    color: #1d2327;
    line-height: 1.4;
}

.stx-contact-row input[type="text"]:focus,
.stx-contact-row input[type="email"]:focus,
.stx-contact-row input[type="tel"]:focus {
    border-color: #9b59b6;
    box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.15);
    outline: none;
}

/* Divi-specific overrides */
.et_pb_module .stx-rental-fields {
    margin: 1.5rem 0;
}

/* Rental date/time pickers – flatpickr altInput */
.stx-rental-fields input[type="datetime-local"],
.stx-rental-fields .stx-flatpickr-dt + input.flatpickr-input {
    width: 100%;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 0.95em;
    box-sizing: border-box;
    background: #fff;
    color: #1d2327;
    line-height: 1.4;
}

.stx-rental-fields input[type="datetime-local"]:focus,
.stx-rental-fields .stx-flatpickr-dt + input.flatpickr-input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.15);
    outline: none;
}

/* Readonly inputs show default cursor to indicate they're not directly editable */
.stx-rental-fields .stx-flatpickr-dt[readonly] {
    cursor: default;
}
    padding: 8px 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 0.95em;
    box-sizing: border-box;
    background: #fff;
    color: #1d2327;
    line-height: 1.4;
}

/* Duration display row */
.stx-rental-duration-row {
    margin-top: 6px !important;
}

.stx-rental-duration-row .stx-days-info {
    display: block;
    font-size: 0.93em;
    color: #555;
    padding-top: 2px;
}

.stx-rental-duration-row .stx-days-info strong {
    color: #1d2327;
    font-weight: 600;
}

.stx-rental-price {
    font-size: 1.2em;
    margin: 0.5rem 0;
}

.stx-day-price,
.stx-hour-price {
    display: inline-block;
    color: #77a464;
}

.stx-calculated-price {
    margin: 1.5rem 0 0.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f0f8ff 0%, #f0f9f5 100%);
    border: 2px solid #2196F3;
    border-radius: 10px;
    font-size: 1em;
    box-shadow: 0 3px 12px rgba(33, 150, 243, 0.15);
}

/* Divi-specific overrides */
.et_pb_module .stx-calculated-price {
    background: #f9f9f9;
    border: 1px solid #ddd;
    box-shadow: none;
}

.stx-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stx-price-detail {
    font-size: 0.88em;
    color: #555;
    line-height: 1.5;
}

.stx-price-qty {
    font-size: 0.9em;
    color: #333;
    font-weight: 600;
}

.stx-total-price {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid #c0d8f0;
    font-size: 1.35em;
    color: #1565c0;
    font-weight: 700;
}

/* Divi-specific overrides */
.et_pb_module .stx-total-price {
    font-size: 1.2em;
    color: #333;
}

.stx-total-price strong {
    font-weight: 800;
}

/* Deposit info in price breakdown (product page) */
.stx-deposit-calc {
    margin-top: 0.5rem;
    padding: 0.45rem 0.8rem;
    background: #fff8e1;
    border-left: 3px solid #f59e0b;
    border-radius: 3px;
    font-size: 0.9em;
    color: #78350f;
}

.stx-deposit-calc strong {
    color: #92400e;
    font-weight: 700;
}

/* Deposit info block below add-to-cart fields */
.stx-deposit-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 4px;
    font-size: 0.9em;
    color: #92400e;
}

.stx-deposit-label {
    font-weight: 600;
}

.stx-deposit-amount {
    font-weight: 700;
}

.stx-cart-price-detail {
    display: block;
    color: #666;
    font-size: 0.82em;
    line-height: 1.5;
    margin-top: 2px;
}

.stx-cart-price-incl {
    display: block;
    color: #888;
    font-size: 0.82em;
    line-height: 1.5;
}

/* ── Cart / mini-cart item meta: bold label + value on same line ── */
/*
 * WooCommerce renders cart+minicart item data as <dl class="variation">
 * and order-detail / emails as <ul class="wc-item-meta">.
 * Both need the same treatment: label bold, label+value inline per row.
 */

/* ── dl.variation (cart page + mini-cart widget) ── */
dl.variation {
    margin: 4px 0 0;
    padding: 0;
    font-size: 0.85em;
    line-height: 1.5;
}
dl.variation dt {
    display: inline;
    font-weight: 700;
    color: #333;
    margin: 0;
    padding: 0;
}
dl.variation dd {
    display: inline;
    margin: 0;
    padding: 0;
}
dl.variation dd p {
    display: inline;
    margin: 0;
}
/* line-break after each dt+dd pair */
dl.variation dd::after {
    content: '\A';
    white-space: pre;
}

/* ── ul.wc-item-meta (order detail page + emails) ── */
.wc-item-meta {
    margin: 0;
    padding: 0;
}
.wc-item-meta li {
    display: block;
    margin: 0 0 2px;
    line-height: 1.5;
    font-size: 0.85em;
}
/* Value <p> must stay inline so label + value appear on the same line */
.wc-item-meta li p {
    display: inline;
    margin: 0;
    line-height: inherit;
    font-size: inherit;
}
.wc-item-meta li .wc-item-meta-label,
.wc-item-meta p strong {
    font-weight: 700;
    color: #333;
}
.wc-item-meta li .wc-item-meta-label::after {
    content: ' ';
}
/* Fallback: WC uses <dl><dt><dd> inside wc-item-meta in some themes */
.wc-item-meta dl,
.wc-item-meta dt,
.wc-item-meta dd {
    display: inline;
    margin: 0;
    padding: 0;
}
.wc-item-meta dd::after {
    content: '\A';
    white-space: pre;
}

.stx-mini-rental {
    display: none; /* removed — period text no longer shown in mini-cart */
}

.stx-price-tiers {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.stx-price-tiers h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1em;
}

.stx-price-table {
    width: 100%;
    border-collapse: collapse;
}

.stx-price-table th,
.stx-price-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.stx-price-table th {
    font-weight: 600;
    background: #f0f0f0;
}

.stx-price-table tbody tr:last-child td {
    border-bottom: none;
}

.stx-cart-section td {
    padding: 1.5rem 0 !important;
}

.stx-cart-transport-section,
.stx-checkout-transport-section {
    display: block !important;
    visibility: visible !important;
    margin: 2rem 0;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #2196F3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stx-cart-transport-section h2,
.stx-checkout-transport-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2196F3;
    color: #2196F3;
    font-size: 1.3em;
}

.stx-cart-options h3,
.stx-checkout-options h3 {
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.1em;
    font-weight: 600;
}

.stx-cart-options h3:first-child,
.stx-checkout-options h3:first-child {
    margin-top: 0;
}

.stx-cart-options,
.stx-checkout-options {
    padding: 0;
}

.stx-cart-options h3 {
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1em;
}

.stx-cart-options h3:first-child {
    margin-top: 0;
}

.stx-cart-options .form-row {
    margin-bottom: 1rem;
}

.stx-cart-options input[type="text"],
.stx-cart-options select,
.stx-checkout-options input[type="text"],
.stx-checkout-options select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.stx-cart-options label,
.stx-checkout-options label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stx-cart-message {
    margin: 1rem 0;
    padding: 1rem;
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    font-size: 0.95em;
}

/* Standalone checkout button when cart totals panel is hidden */
.stx-cart-checkout-wrap {
    margin: 1.5rem 0;
    text-align: right;
}
.stx-cart-checkout-wrap .checkout-button {
    display: inline-block;
    font-size: 1.1em;
    padding: 0.9em 2em;
}

.stx-checkout-section {
    margin: 2rem 0;
    padding: 1rem;
    background: #f7f7f7;
    border-radius: 8px;
}

.stx-services {
    display: grid;
    gap: 0.5rem;
}

.stx-service-block {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.stx-service-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1em;
    flex-wrap: wrap;
}

.stx-service-price {
    margin-left: auto;
    font-size: 0.88em;
    font-weight: 600;
    color: #1565c0;
    white-space: nowrap;
}

.stx-service-item input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.stx-service-hours {
    margin: 0.5rem 0 1rem;
}

.stx-address-field {
    position: relative;
}

/* Suggestion dropdown */
.stx-suggestions {
    position: absolute;
    z-index: 99999;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 220px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-height: 240px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
}

.stx-suggestion-item {
    padding: 0.6rem 0.85rem;
    font-size: 0.93em;
    cursor: pointer;
    line-height: 1.4;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    outline: none;
}

.stx-suggestion-item:last-child {
    border-bottom: none;
}

.stx-suggestion-item:hover,
.stx-suggestion-item:focus {
    background: #e8f0fe;
    color: #1a56db;
}

/* Loading spinner on address input */
.stx-address-loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%23bbb' stroke-width='3'/%3E%3Cpath d='M12 2a10 10 0 0 1 10 10' fill='none' stroke='%232196F3' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.8s' repeatCount='indefinite'/%3E%3C/path%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.6rem center !important;
    background-size: 18px 18px !important;
    padding-right: 2.2rem !important;
}

/* Auto-selected transport display */
.stx-transport-auto-info {
    display: block;
    min-height: 0;
    padding: 8px 14px;
    margin: 8px 0 12px;
    background: #eef6ff;
    border: 1px solid #90caf9;
    border-radius: 6px;
    font-size: 14px;
    color: #1565c0;
    line-height: 1.5;
    transition: background 0.2s;
}

.stx-transport-auto-info:empty {
    display: none;
}

.stx-transport-auto-info strong {

/* Transport loading progress bar */
}
.stx-transport-loading-bar {
    height: 3px;
    border-radius: 2px;
    margin: -6px 0 6px;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        #e3f2fd 0%,
        #2196F3 35%,
        #90caf9 50%,
        #2196F3 65%,
        #e3f2fd 100%
    );
    background-size: 250% 100%;
    animation: stx-bar-sweep 1.4s ease-in-out infinite;
    display: none;
}
.stx-transport-loading-bar.stx-loading-active {
    display: block;
}
@keyframes stx-bar-sweep {
    0%   { background-position: 120% center; }
    100% { background-position: -120% center; }
}

.stx-transport-auto-info strong {
    color: #0d47a1;
}

.stx-transport-description,
.stx-service-description {
    display: none;
    margin: 0.5rem 0 1rem;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #eee;
}

.stx-related {
    margin-top: 2rem;
}

/* -------------------------------------------------------
   Thank-you page – rental & transport summary
------------------------------------------------------- */
.stx-thankyou-details {
    margin: 2rem 0;
    padding: 0;
}

.stx-thankyou-details > h2 {
    font-size: 1.25em;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
    color: #1565c0;
}

.stx-ty-block {
    background: #f8fbff;
    border: 1px solid #d0e8fb;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.stx-ty-deposit {
    background: #fffbeb;
    border-color: #fde68a;
}

.stx-ty-block h3 {
    font-size: 1em;
    font-weight: 700;
    color: #1565c0;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stx-ty-deposit h3 {
    color: #92400e;
}

.stx-ty-icon {
    font-size: 1.1em;
}

.stx-ty-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stx-ty-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.3rem 0.5rem;
    font-size: 0.95em;
    line-height: 1.5;
}

.stx-ty-label {
    font-weight: 600;
    color: #444;
    white-space: nowrap;
}

.stx-ty-meta {
    font-size: 0.88em;
    color: #666;
}

.stx-ty-price {
    margin-left: auto;
    font-weight: 700;
    color: #1565c0;
    white-space: nowrap;
}

.stx-ty-deposit .stx-ty-price {
    color: #92400e;
}

/* -------------------------------------------------------
   Rental date pickers
------------------------------------------------------- */
.stx-rental-fields {
    margin: 1rem 0;
}

.stx-rental-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.stx-rental-dates .form-row-first,
.stx-rental-dates .form-row-last {
    flex: 1 1 200px;
    float: none;
    width: auto;
    padding: 0;
}

.stx-rental-fields input[type="date"] {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    line-height: 1.5;
    box-sizing: border-box;
}

.stx-rental-days-row {
    margin-top: 0.5rem;
    font-size: 0.95em;
    color: #444;
}

.stx-days-info {
    display: block;
    padding: 0.4rem 0;
}

.stx-rental-fields input[type="number"] {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

/* -------------------------------------------------------
   Order table – rental period inline under each product
------------------------------------------------------- */
.stx-order-item-rental {
    margin-top: 0.35rem;
    font-size: 0.875em;
    color: #555;
    line-height: 1.4;
}
.stx-order-item-rental small {
    color: #888;
}

/* Deposit status badge in order totals */
.stx-deposit-paid {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.82em;
    font-weight: 600;
    white-space: nowrap;
}
.stx-deposit-unpaid {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    background: #fff8e1;
    color: #92400e;
    font-size: 0.82em;
    font-weight: 600;
    white-space: nowrap;
}

/* ── My Account: My Rentals table ────────────────────────────────────── */
.stx-my-rentals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.stx-my-rentals-table th,
.stx-my-rentals-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: top;
}
.stx-my-rentals-table th {
    background: #f8f8f8;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    text-align: left;
}
.stx-my-rentals-table tr:last-child td {
    border-bottom: none;
}

/* Row state: active / upcoming / past */
.stx-my-rentals-table tr.stx-rental-active   td { background: #f0fff4; }
.stx-my-rentals-table tr.stx-rental-upcoming td { background: #f0f4ff; }
.stx-my-rentals-table tr.stx-rental-past     td { background: #fafafa; color: #777; }

/* Rental status badge (at_customer, dispatched, returned, …) */
.stx-rental-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    vertical-align: middle;
}

/* Empty-state message */
.stx-my-rentals-empty {
    color: #555;
    padding: 20px 0;
    font-size: 15px;
}

/* Extension request link */
.stx-extend-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    color: #2271b1;
    cursor: pointer;
    text-decoration: underline;
}
.stx-extend-link:hover {
    color: #135e96;
}

/* Extension request form */
.stx-extend-form {
    display: none;
    margin-top: 8px;
}
.stx-extend-form input[type="date"] {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    margin-right: 6px;
}
.stx-extend-submit {
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.stx-extend-submit:hover {
    background: #135e96;
}
.stx-extend-msg {
    display: block;
    margin-top: 4px;
    font-size: 11px;
}
.stx-extend-msg.stx-msg-ok    { color: #2e7d32; }
.stx-extend-msg.stx-msg-error { color: #c62828; }

/* Responsive: stack table on small screens */
@media (max-width: 600px) {
    .stx-my-rentals-table thead { display: none; }
    .stx-my-rentals-table tr    { display: block; margin-bottom: 1rem; border: 1px solid #e0e0e0; border-radius: 6px; overflow: hidden; }
    .stx-my-rentals-table td    { display: block; padding: 8px 12px; border-bottom: 1px solid #f0f0f0; }
    .stx-my-rentals-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        font-size: 11px;
        color: #888;
        margin-bottom: 2px;
    }
    .stx-my-rentals-table tr.stx-rental-active   td,
    .stx-my-rentals-table tr.stx-rental-upcoming td,
    .stx-my-rentals-table tr.stx-rental-past     td { background: inherit; }
    .stx-my-rentals-table tr.stx-rental-active   { background: #f0fff4; }
    .stx-my-rentals-table tr.stx-rental-upcoming { background: #f0f4ff; }
    .stx-my-rentals-table tr.stx-rental-past     { background: #fafafa; }
}

/* ── Shipping module – výběr dopravní metody zákazníkem ───────────────────── */

.stx-shipping-methods {
    margin-bottom: 1rem;
}

.stx-shipping-method-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.stx-shipping-method-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    background: #f9f9f9;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.stx-shipping-method-item:hover {
    background: #f0f4ff;
    border-color: #b0bfdb;
}

.stx-shipping-method-item.stx-shipping-selected {
    background: #e8f0fe;
    border-color: #1565c0;
}

.stx-shipping-method-item input[type="radio"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: #1565c0;
}

.stx-shipping-method-item .stx-shipping-method-block {
    flex: 1;
    min-width: 0;
}

.stx-shipping-method-item .stx-shipping-method-name {
    font-weight: 600;
    font-size: 1em;
    color: #1d2327;
    display: block;
}

.stx-shipping-method-item .stx-shipping-description {
    font-size: 0.87em;
    color: #666;
    display: block;
    margin-top: 2px;
}

.stx-shipping-price {
    margin-left: auto;
    font-size: 0.92em;
    font-weight: 600;
    color: #1565c0;
    white-space: nowrap;
    align-self: center;
    padding-left: 0.75rem;
}

@media (max-width: 600px) {
    .stx-shipping-method-item {
        flex-wrap: wrap;
    }
    .stx-shipping-price {
        margin-left: 0;
        padding-left: 1.6rem;
        width: 100%;
    }
}
