/**
 * Thuedo Rental - Frontend Styles
 * Compatible with Woodmart + Elementor
 *
 * @package ThuedoRental
 */

/* ============================================
   CSS Reset & Isolation
   Prevents conflicts with Woodmart/Elementor
   ============================================ */
.thuedo-rental-container,
.thuedo-rental-container *,
.thuedo-rental-container *::before,
.thuedo-rental-container *::after,
.thuedo-prices,
.thuedo-prices *,
.thuedo-info,
.thuedo-info *,
.thuedo-badge {
    box-sizing: border-box !important;
    font-family: inherit;
}

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --thuedo-primary: #d4a574;
    --thuedo-primary-dark: #c49660;
    --thuedo-primary-light: #e8d4c0;
    --thuedo-text: #333333;
    --thuedo-text-light: #666666;
    --thuedo-text-muted: #999999;
    --thuedo-border: #e5e5e5;
    --thuedo-bg: #f8f8f8;
    --thuedo-white: #ffffff;
    --thuedo-success: #4caf50;
    --thuedo-warning: #ff9800;
    --thuedo-danger: #f44336;
    --thuedo-radius: 8px;
    --thuedo-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Rental Badge
   ============================================ */
.thuedo-badge {
    display: inline-block !important;
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    background: var(--thuedo-primary) !important;
    color: var(--thuedo-white) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 3px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    z-index: 10 !important;
    line-height: 1.3 !important;
}

.thuedo-badge-single {
    top: 15px !important;
    left: 15px !important;
    font-size: 12px !important;
    padding: 5px 12px !important;
}

/* Woodmart specific adjustments */
.woodmart-hover-base .thuedo-badge,
.product-image-link .thuedo-badge {
    z-index: 5 !important;
}

/* ============================================
   Price Display
   ============================================ */
.thuedo-prices {
    margin: 15px 0 !important;
    padding: 0 !important;
}

.thuedo-prices .thuedo-brand-price,
.thuedo-prices .thuedo-rental-price {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.thuedo-prices .price-label {
    color: var(--thuedo-text-light) !important;
    font-weight: 400 !important;
    font-size: 14px !important;
}

.thuedo-prices .price-value {
    font-weight: 700 !important;
    font-size: 18px !important;
    color: var(--thuedo-primary-dark) !important;
}

.thuedo-prices .price-original {
    color: var(--thuedo-text-muted) !important;
    font-size: 14px !important;
    text-decoration: line-through !important;
}

.thuedo-prices .price-sale {
    color: var(--thuedo-danger) !important;
}

.thuedo-prices .price-unit {
    color: var(--thuedo-text-muted) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

/* Woodmart price fixes */
.woodmart-theme .thuedo-prices .woocommerce-Price-amount {
    font-size: inherit !important;
    color: inherit !important;
}

/* ============================================
   Rental Info
   ============================================ */
.thuedo-info {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    margin: 15px 0 !important;
    padding: 12px 15px !important;
    background: var(--thuedo-bg) !important;
    border-radius: var(--thuedo-radius) !important;
    border: 1px solid var(--thuedo-border) !important;
}

.thuedo-info-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    color: var(--thuedo-text) !important;
}

.thuedo-info-item .info-icon {
    font-size: 16px !important;
}

/* ============================================
   Rental Form Container
   ============================================ */
.thuedo-rental-container {
    position: relative !important;
    width: 100% !important;
    margin: 20px 0 !important;
    padding: 0 !important;
}

.thuedo-rental-form-wrapper {
    width: 100% !important;
}

.thuedo-rental-form.cart {
    margin: 0 !important;
    padding: 0 !important;
}

/* ============================================
   Rental Box - Rentzy Style (chuẩn)
   ============================================ */
.thuedo-rental-box {
    display: block !important;
    border: 1px solid #C6A886 !important;
    border-radius: 8px !important;
    overflow: visible !important;
    margin-bottom: 20px !important;
    background: #FAF6F2 !important;
    padding: 20px !important;
    position: relative !important;
}

/* Card Header */
.thuedo-rental-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    margin-bottom: 16px !important;
}

.thuedo-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Custom Radio Circle */
.thuedo-radio-circle {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    border-radius: 50% !important;
    border: 1px solid #C6A886 !important;
    background: #ffffff !important;
}

.thuedo-radio-dot {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: #C6A886 !important;
}

/* Header Text */
.thuedo-header-text {
    display: flex !important;
    flex-direction: column !important;
}

.thuedo-option-title {
    display: block !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #1c1917 !important;
    line-height: 1.2 !important;
}

.thuedo-option-subtitle {
    display: block !important;
    font-size: 12px !important;
    color: #78716c !important;
    margin-top: 2px !important;
}

/* Header Right - Price */
.thuedo-header-right {
    text-align: right !important;
}

.thuedo-option-price {
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #1c1917 !important;
}

.thuedo-option-price .woocommerce-Price-amount {
    font-size: inherit !important;
    color: inherit !important;
    font-weight: inherit !important;
}

.thuedo-option-price small {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #78716c !important;
}

.thuedo-price-unit {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #78716c !important;
}

/* Date Wrapper - chứa date input + calendar dropdown */
.thuedo-date-wrapper {
    position: relative !important;
}

/* Date Input Trigger - Rentzy Style */
.thuedo-date-input {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 12px 16px !important;
    border: 1px solid #E6D4C0 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.thuedo-date-input:hover {
    border-color: #C6A886 !important;
}

.thuedo-date-input.active {
    border-color: #C6A886 !important;
}

/* Date Content */
.thuedo-date-content {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
}

.thuedo-date-input .date-label {
    color: #a8a29e !important;
    font-weight: 400 !important;
}

.thuedo-date-input .date-value {
    font-weight: 500 !important;
    color: #1c1917 !important;
}

.thuedo-date-input .date-value.placeholder {
    color: #a8a29e !important;
    font-weight: 400 !important;
}

.thuedo-date-input .date-separator {
    color: #d6d3d1 !important;
    margin: 0 4px !important;
}

.thuedo-date-input .date-icon {
    color: #C6A886 !important;
    display: flex !important;
    align-items: center !important;
}

.thuedo-date-input .date-icon svg {
    width: 16px !important;
    height: 16px !important;
}

/* ============================================
   Calendar Dropdown Style - Xổ ra bên ngoài box
   ============================================ */
#thuedo-calendar-popup,
.thuedo-calendar-popup {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 55% !important;
    background: #ffffff !important;
    border: 1px solid #f5f5f4 !important;
    border-radius: 8px !important;
    z-index: 1000 !important;
    padding: 0 !important;
    margin-top: 8px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    -webkit-box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.thuedo-calendar-popup-inner {
    padding: 12px 16px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Calendar Container */
#thuedo-calendar-container {
    width: 100% !important;
    display: block !important;
}

/* Flatpickr Full Width Reset */
.flatpickr-calendar,
.flatpickr-calendar.inline,
#thuedo-calendar-container .flatpickr-calendar,
#thuedo-calendar-container .flatpickr-calendar.inline {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border: none !important;
    font-family: inherit !important;
    background: transparent !important;
}

#thuedo-calendar-container .flatpickr-innerContainer,
#thuedo-calendar-container .flatpickr-rContainer {
    display: block !important;
    width: 100% !important;
}

#thuedo-calendar-container .flatpickr-days {
    width: 100% !important;
}

#thuedo-calendar-container .dayContainer {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
}

/* Months Header - Căn đều */
#thuedo-calendar-container .flatpickr-months {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 0 12px 0 !important;
    width: 100% !important;
}

#thuedo-calendar-container .flatpickr-months .flatpickr-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    height: auto !important;
}

#thuedo-calendar-container .flatpickr-current-month {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    width: auto !important;
    padding: 0 !important;
    position: relative !important;
    left: 0 !important;
}

/* Navigation arrows */
#thuedo-calendar-container .flatpickr-prev-month,
#thuedo-calendar-container .flatpickr-next-month {
    position: relative !important;
    top: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 5px !important;
}

#thuedo-calendar-container .flatpickr-prev-month {
    left: 0 !important;
}

#thuedo-calendar-container .flatpickr-next-month {
    right: 0 !important;
}

/* Weekdays Header - Grid 7 columns */
#thuedo-calendar-container .flatpickr-weekdays {
    width: 100% !important;
    display: flex !important;
}

#thuedo-calendar-container .flatpickr-weekdaycontainer {
    display: flex !important;
    width: 100% !important;
}

#thuedo-calendar-container .flatpickr-weekday {
    flex: 1 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #a8a29e !important;
    text-align: center !important;
}

/* Calendar Days - Each day takes 1/7 width */
#thuedo-calendar-container .flatpickr-day {
    flex: 0 0 calc(100% / 7) !important;
    max-width: calc(100% / 7) !important;
    width: calc(100% / 7) !important;
    height: 40px !important;
    line-height: 40px !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #44403c !important;
    margin: 0 !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

#thuedo-calendar-container .flatpickr-day:hover {
    background: #fafaf9 !important;
}

#thuedo-calendar-container .flatpickr-day.selected,
#thuedo-calendar-container .flatpickr-day.startRange,
#thuedo-calendar-container .flatpickr-day.endRange {
    background: #C6A886 !important;
    border-color: #C6A886 !important;
    color: #ffffff !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 4px rgba(198, 168, 134, 0.3) !important;
}

#thuedo-calendar-container .flatpickr-day.inRange {
    background: #FAF0E6 !important;
    border-color: transparent !important;
    color: #C6A886 !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border-radius: 0 !important;
}

#thuedo-calendar-container .flatpickr-day.today {
    border: 1px solid #C6A886 !important;
    background: transparent !important;
}

#thuedo-calendar-container .flatpickr-day.disabled,
#thuedo-calendar-container .flatpickr-day.flatpickr-disabled,
#thuedo-calendar-container .flatpickr-day.prevMonthDay,
#thuedo-calendar-container .flatpickr-day.nextMonthDay {
    color: #d6d3d1 !important;
    background: transparent !important;
}

/* Calendar Legend */
.thuedo-calendar-legend {
    padding: 10px 0 !important;
    border-top: 1px solid var(--thuedo-border) !important;
    margin-top: 10px !important;
}

.thuedo-calendar-legend .legend-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    margin-bottom: 8px !important;
}

.thuedo-calendar-legend .legend-row:last-child {
    margin-bottom: 0 !important;
}

.thuedo-calendar-legend .legend-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 11px !important;
    color: var(--thuedo-text-light) !important;
}

.thuedo-calendar-legend .legend-box {
    width: 16px !important;
    height: 16px !important;
    border-radius: 3px !important;
    flex-shrink: 0 !important;
}

.thuedo-calendar-legend .legend-today {
    border: 2px solid var(--thuedo-primary) !important;
    background: transparent !important;
}

.thuedo-calendar-legend .legend-pickup {
    background: var(--thuedo-success) !important;
}

.thuedo-calendar-legend .legend-rented {
    background: var(--thuedo-primary-light) !important;
}

.thuedo-calendar-legend .legend-return {
    background: var(--thuedo-warning) !important;
}

/* Available Info */
.thuedo-available-info {
    padding: 10px 12px !important;
    background: #e8f5e9 !important;
    border-radius: var(--thuedo-radius) !important;
    font-size: 13px !important;
    color: #2e7d32 !important;
    margin: 10px 0 !important;
    text-align: center !important;
}

/* Calendar Footer - Reset & Apply */
.thuedo-calendar-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-top: 8px !important;
    border-top: 1px solid #f5f5f4 !important;
    margin-top: 8px !important;
}

.thuedo-btn-reset {
    background: transparent !important;
    border: none !important;
    color: #a8a29e !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
}

.thuedo-btn-reset:hover {
    color: #57534e !important;
}

.thuedo-btn-apply {
    padding: 6px 16px !important;
    background: #C6A886 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 9999px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.thuedo-btn-apply:hover:not(:disabled) {
    background: #b09372 !important;
}

.thuedo-btn-apply:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* ============================================
   Form Rows - Rentzy Style
   ============================================ */
.thuedo-form-row {
    margin-bottom: 16px !important;
}

.thuedo-row-label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1c1917 !important;
    margin-bottom: 8px !important;
}

/* Size Options */
.thuedo-size-options {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.thuedo-size-option {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 50px !important;
    padding: 10px 15px !important;
    border: 1px solid var(--thuedo-border) !important;
    border-radius: var(--thuedo-radius) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--thuedo-text) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: var(--thuedo-white) !important;
    margin: 0 !important;
}

.thuedo-size-option input[type="radio"] {
    display: none !important;
}

.thuedo-size-option:hover {
    border-color: var(--thuedo-primary) !important;
}

.thuedo-size-option.active,
.thuedo-size-option:has(input:checked) {
    background: var(--thuedo-primary) !important;
    border-color: var(--thuedo-primary) !important;
    color: var(--thuedo-white) !important;
}

/* Quantity Wrapper - Rentzy Style */
.thuedo-qty-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
}

.thuedo-qty-inline {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #e7e5e4 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

.thuedo-qty-btn {
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: transparent !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #78716c !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
}

.thuedo-qty-btn:first-child {
    border-right: 1px solid #f5f5f4 !important;
}

.thuedo-qty-btn:last-child {
    border-left: 1px solid #f5f5f4 !important;
}

.thuedo-qty-btn:hover {
    background: #fafaf9 !important;
}

.thuedo-qty-input {
    width: 48px !important;
    height: 40px !important;
    border: none !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #1c1917 !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
    outline: none !important;
}

.thuedo-qty-input::-webkit-outer-spin-button,
.thuedo-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.thuedo-stock-info {
    font-size: 12px !important;
    color: #a8a29e !important;
}

/* Voucher Box */
.thuedo-voucher-box {
    padding: 12px 15px !important;
    border: 1px dashed var(--thuedo-border) !important;
    border-radius: var(--thuedo-radius) !important;
    font-size: 13px !important;
    color: var(--thuedo-text-muted) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    background: var(--thuedo-white) !important;
}

.thuedo-voucher-box:hover {
    border-color: var(--thuedo-primary) !important;
}

/* ============================================
   Summary
   ============================================ */
.thuedo-summary {
    background: var(--thuedo-bg) !important;
    border: 1px solid var(--thuedo-border) !important;
    border-radius: var(--thuedo-radius) !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}

.thuedo-summary .summary-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid var(--thuedo-border) !important;
}

.thuedo-summary .summary-row:last-child {
    border-bottom: none !important;
}

.thuedo-summary .summary-label {
    font-size: 14px !important;
    color: var(--thuedo-text-light) !important;
}

.thuedo-summary .summary-value {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--thuedo-text) !important;
}

.thuedo-summary .summary-total {
    margin-top: 10px !important;
    padding-top: 15px !important;
    border-top: 2px solid var(--thuedo-primary) !important;
    border-bottom: none !important;
}

.thuedo-summary .summary-total .summary-label {
    font-weight: 600 !important;
    color: var(--thuedo-text) !important;
    font-size: 15px !important;
}

.thuedo-summary .summary-total .summary-value {
    font-size: 18px !important;
    color: var(--thuedo-primary-dark) !important;
}

.thuedo-summary .summary-discount-value {
    color: var(--thuedo-success) !important;
}

.thuedo-summary .summary-deposit {
    background: #fff8e1 !important;
    margin: 8px -15px !important;
    padding: 10px 15px !important;
    border-radius: 0 !important;
}

.thuedo-summary .summary-deposit .summary-label {
    color: #f57c00 !important;
}

.thuedo-summary .summary-deposit .summary-value {
    color: #f57c00 !important;
    font-weight: 700 !important;
}

/* ============================================
   Message
   ============================================ */
.thuedo-message {
    margin-bottom: 15px !important;
    padding: 12px 15px !important;
    border-radius: var(--thuedo-radius) !important;
    font-size: 13px !important;
    display: none;
}

.thuedo-message.show {
    display: block !important;
}

.thuedo-message.error {
    background: #ffebee !important;
    color: #c62828 !important;
    border: 1px solid #ef9a9a !important;
}

.thuedo-message.success {
    background: #e8f5e9 !important;
    color: #2e7d32 !important;
    border: 1px solid #a5d6a7 !important;
}

.thuedo-message.warning {
    background: #fff3e0 !important;
    color: #e65100 !important;
    border: 1px solid #ffcc80 !important;
}

/* ============================================
   Buttons - Rentzy Style
   ============================================ */
.thuedo-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-top: 16px !important;
}

.thuedo-submit-btn {
    padding: 14px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 2px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
    text-align: center !important;
    line-height: 1.4 !important;
}

.thuedo-btn-add-cart {
    background: #78716c !important;
    color: #ffffff !important;
}

.thuedo-btn-add-cart:hover:not(:disabled) {
    background: #57534e !important;
}

.thuedo-btn-rent-now {
    background: #DFC09F !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.thuedo-btn-rent-now:hover:not(:disabled) {
    background: #d4b491 !important;
}

.thuedo-submit-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Loading state for buttons */
.thuedo-submit-btn.loading {
    position: relative !important;
    color: transparent !important;
    pointer-events: none !important;
}

.thuedo-submit-btn.loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 18px !important;
    height: 18px !important;
    margin: -9px 0 0 -9px !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
    border-top-color: #ffffff !important;
    border-radius: 50% !important;
    animation: thuedo-spin 0.8s linear infinite !important;
}

@keyframes thuedo-spin {
    to { transform: rotate(360deg); }
}

/* Woodmart button overrides */
.woodmart-theme .thuedo-submit-btn {
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: var(--thuedo-radius) !important;
}

.woodmart-theme .thuedo-submit-btn:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================
   Responsive - Mobile (≤768px)
   Left và Right width 100%, xếp 2 dòng
   ============================================ */
@media screen and (max-width: 768px) {
    .thuedo-rental-box {
        flex-direction: column !important;
    }

    .thuedo-rental-box-left,
    .thuedo-rental-box-right {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    /* Date trigger center on mobile */
    #thuedo-date-trigger,
    .thuedo-date-input {
        justify-content: center !important;
        text-align: center !important;
    }

    /* Calendar popup full width on mobile */
    #thuedo-calendar-popup,
    .thuedo-calendar-popup {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }

    /* Buttons xếp dọc */
    .thuedo-buttons {
        flex-direction: column !important;
    }

    .thuedo-submit-btn {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
}

/* ============================================
   Elementor Specific Fixes
   ============================================ */
.elementor-widget-woocommerce-product-content .thuedo-rental-container,
.elementor-widget-shortcode .thuedo-rental-container {
    width: 100% !important;
}

.elementor .thuedo-submit-btn {
    font-family: inherit !important;
}

/* ============================================
   Woodmart Specific Fixes
   ============================================ */
.woodmart-theme .thuedo-rental-form .quantity {
    display: none !important; /* Hide default WC quantity */
}

.woodmart-theme .thuedo-prices .amount {
    font-size: inherit !important;
}

.woodmart-theme .product-summary .thuedo-rental-container {
    margin-top: 20px !important;
}

/* Fix Woodmart sticky add to cart */
.woodmart-theme .woodmart-sticky-btn .thuedo-rental-form {
    display: none !important;
}

/* ============================================
   Flatpickr Theme Override
   ============================================ */
.flatpickr-calendar.thuedo-calendar {
    font-family: inherit !important;
    border-radius: var(--thuedo-radius) !important;
    box-shadow: var(--thuedo-shadow) !important;
}

.flatpickr-calendar.thuedo-calendar .flatpickr-month {
    background: transparent !important;
    color: var(--thuedo-text) !important;
}

.flatpickr-calendar.thuedo-calendar .flatpickr-weekday {
    color: var(--thuedo-text-light) !important;
    font-weight: 600 !important;
}

.flatpickr-calendar.thuedo-calendar .flatpickr-day:hover {
    background: var(--thuedo-primary-light) !important;
    border-color: var(--thuedo-primary-light) !important;
}

/* Overlay - hidden by default for dropdown style */
.thuedo-calendar-backdrop,
.thuedo-overlay {
    display: none !important;
}

/* ============================================
   Loading State
   ============================================ */
.thuedo-loading {
    position: relative !important;
    pointer-events: none !important;
    opacity: 0.7 !important;
}

.thuedo-loading::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 24px !important;
    height: 24px !important;
    margin: -12px 0 0 -12px !important;
    border: 3px solid var(--thuedo-border) !important;
    border-top-color: var(--thuedo-primary) !important;
    border-radius: 50% !important;
    animation: thuedo-spin 0.8s linear infinite !important;
}

@keyframes thuedo-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Calendar Day States - Rentzy Colors
   ============================================ */
.flatpickr-day.thuedo-past {
    opacity: 0.3 !important;
    text-decoration: line-through !important;
}

.flatpickr-day.thuedo-today {
    border: 2px solid var(--thuedo-primary) !important;
    background: transparent !important;
}

.flatpickr-day.thuedo-pickup {
    background: var(--thuedo-success) !important;
    color: var(--thuedo-white) !important;
    border-color: var(--thuedo-success) !important;
}

.flatpickr-day.thuedo-return {
    background: var(--thuedo-warning) !important;
    color: var(--thuedo-white) !important;
    border-color: var(--thuedo-warning) !important;
}

.flatpickr-day.thuedo-rented {
    background: var(--thuedo-primary-light) !important;
    color: var(--thuedo-text) !important;
}

.flatpickr-day.thuedo-fully-booked {
    background: #e0e0e0 !important;
    color: #999 !important;
    text-decoration: line-through !important;
    cursor: not-allowed !important;
}

.flatpickr-day.thuedo-blocked {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(200, 200, 200, 0.4) 3px,
        rgba(200, 200, 200, 0.4) 6px
    ) !important;
    color: #999 !important;
    cursor: not-allowed !important;
    position: relative !important;
}

.flatpickr-day.thuedo-blocked::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 10% !important;
    right: 10% !important;
    height: 1px !important;
    background: #999 !important;
    transform: rotate(-45deg) !important;
}

/* Calendar Legend */
.thuedo-calendar-legend {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    padding: 12px 15px !important;
    background: #fafafa !important;
    border-top: 1px solid #e5e5e5 !important;
    font-size: 11px !important;
}

.thuedo-legend-item {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #666 !important;
}

.thuedo-legend-dot {
    width: 14px !important;
    height: 14px !important;
    border-radius: 3px !important;
    flex-shrink: 0 !important;
}

.thuedo-legend-dot.available {
    background: #fff !important;
    border: 1px solid #ddd !important;
}

.thuedo-legend-dot.booked {
    background: #e0e0e0 !important;
    text-decoration: line-through !important;
}

.thuedo-legend-dot.blocked {
    background: repeating-linear-gradient(
        -45deg,
        #fff,
        #fff 2px,
        rgba(200, 200, 200, 0.5) 2px,
        rgba(200, 200, 200, 0.5) 4px
    ) !important;
    border: 1px solid #ccc !important;
    position: relative !important;
}

.thuedo-legend-dot.blocked::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 2px !important;
    right: 2px !important;
    height: 1px !important;
    background: #999 !important;
    transform: rotate(-45deg) !important;
}

.thuedo-legend-dot.pickup {
    background: #C6A886 !important;
}

.thuedo-legend-dot.return {
    background: #4caf50 !important;
}

.thuedo-legend-dot.today {
    background: #fff !important;
    border: 2px solid #ef9f84 !important;
}

/* ============================================
   Woocommerce Overrides
   ============================================ */
.woocommerce .thuedo-rental-form .quantity {
    display: none !important;
}

.woocommerce div.product .thuedo-prices {
    margin-bottom: 20px !important;
}

.woocommerce div.product .thuedo-prices .amount {
    font-size: inherit !important;
    color: inherit !important;
}

/* Hide default WC add to cart on rental products */
.woocommerce div.product.product-type-rental form.cart:not(.thuedo-rental-form) {
    display: none !important;
}

/* ============================================
   Custom Month Display
   ============================================ */
.thuedo-month-display {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--thuedo-text) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month .numInputWrapper {
    display: none !important;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .thuedo-calendar-popup,
    .thuedo-overlay,
    .thuedo-submit-btn {
        display: none !important;
    }
}

/* ============================================
   Woodmart Theme Critical Overrides
   High specificity to override theme styles
   ============================================ */
body.woodmart-theme .thuedo-rental-container,
body.theme-flavor-flavor1 .thuedo-rental-container,
.woocommerce-page .thuedo-rental-container {
    all: unset !important;
    display: block !important;
    position: relative !important;
    width: 100% !important;
    margin: 20px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
}

body.woodmart-theme .thuedo-rental-form,
body.woodmart-theme .thuedo-rental-form.cart {
    all: unset !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.woodmart-theme .thuedo-rental-box {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    border: 2px solid var(--thuedo-primary, #d4a574) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    margin-bottom: 20px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

body.woodmart-theme .thuedo-rental-box-left {
    flex: 1 1 200px !important;
    padding: 15px !important;
    background: #e8d4c0 !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

body.woodmart-theme .thuedo-rental-box-right {
    flex: 1 1 250px !important;
    padding: 15px !important;
    position: relative !important;
    box-sizing: border-box !important;
}

body.woodmart-theme .thuedo-date-input {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 15px !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    background: #ffffff !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
}

body.woodmart-theme .thuedo-form-row {
    margin-bottom: 20px !important;
    display: block !important;
}

body.woodmart-theme .thuedo-row-label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333333 !important;
    margin-bottom: 10px !important;
}

body.woodmart-theme .thuedo-qty-inline {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

body.woodmart-theme .thuedo-qty-btn {
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: transparent !important;
    font-size: 18px !important;
    color: #333333 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
}

body.woodmart-theme .thuedo-qty-input {
    width: 50px !important;
    height: 40px !important;
    border: none !important;
    border-left: 1px solid #e5e5e5 !important;
    border-right: 1px solid #e5e5e5 !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #333333 !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
}

body.woodmart-theme .thuedo-buttons {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

body.woodmart-theme .thuedo-submit-btn {
    flex: 1 1 200px !important;
    padding: 15px 25px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    border: none !important;
    text-align: center !important;
    line-height: 1.4 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.woodmart-theme .thuedo-btn-add-cart {
    background: #333333 !important;
    color: #ffffff !important;
}

body.woodmart-theme .thuedo-btn-rent-now {
    background: #d4a574 !important;
    color: #ffffff !important;
}

body.woodmart-theme .thuedo-summary {
    background: #f8f8f8 !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    box-sizing: border-box !important;
}

body.woodmart-theme .thuedo-summary .summary-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #e5e5e5 !important;
}

body.woodmart-theme .thuedo-date-wrapper {
    position: relative !important;
}

body.woodmart-theme .thuedo-calendar-popup,
body.woodmart-theme #thuedo-calendar-popup {
    display: none;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    z-index: 1000 !important;
    padding: 20px !important;
    margin-top: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
}

body.woodmart-theme .thuedo-date-input.active {
    border-color: #d4a574 !important;
}

/* Woodmart price display fix */
body.woodmart-theme .thuedo-prices {
    margin: 15px 0 !important;
    padding: 0 !important;
}

body.woodmart-theme .thuedo-prices .thuedo-brand-price,
body.woodmart-theme .thuedo-prices .thuedo-rental-price {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 8px !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

body.woodmart-theme .thuedo-prices .price-value {
    font-weight: 700 !important;
    font-size: 18px !important;
    color: #c49660 !important;
}

body.woodmart-theme .thuedo-prices .woocommerce-Price-amount {
    font-size: inherit !important;
    color: inherit !important;
}

/* Woodmart info box */
body.woodmart-theme .thuedo-info {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    margin: 15px 0 !important;
    padding: 12px 15px !important;
    background: #f8f8f8 !important;
    border-radius: 8px !important;
    border: 1px solid #e5e5e5 !important;
}

/* ============================================
   Elementor Widget Override
   ============================================ */
.elementor-widget-container .thuedo-rental-container {
    all: unset !important;
    display: block !important;
    position: relative !important;
    width: 100% !important;
    margin: 20px 0 !important;
}

.elementor-widget-container .thuedo-rental-form {
    all: unset !important;
    display: block !important;
}

.elementor-element .thuedo-submit-btn {
    font-family: inherit !important;
}

/* ============================================
   Global High Specificity Resets
   ============================================ */
html body .thuedo-rental-container * {
    box-sizing: border-box !important;
}

html body .thuedo-rental-form input[type="hidden"] {
    display: none !important;
}

html body .thuedo-rental-form .thuedo-qty-input {
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
}

html body .thuedo-rental-form .thuedo-qty-input::-webkit-outer-spin-button,
html body .thuedo-rental-form .thuedo-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}
