/** Form Validation Styles - Scoped to booking request modal **/
#bookingRequestModal input.is-invalid:not(.intl-phone-input),
#bookingRequestModal select.is-invalid,
#bookingRequestModal textarea.is-invalid {
    border-color: #EF4444 !important; /* Tailwind red-500 */
}

#bookingRequestModal input.is-invalid:not(.intl-phone-input):focus,
#bookingRequestModal select.is-invalid:focus,
#bookingRequestModal textarea.is-invalid:focus {
    border-color: #EF4444 !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Special handling for intl-tel-input - apply border to the actual input */
#bookingRequestModal .iti input.is-invalid.intl-phone-input {
    border-color: #EF4444 !important;
    border-left-color: #E5E5E5 !important; /* Keep left border normal since flag is there */
}

#bookingRequestModal .iti input.is-invalid.intl-phone-input:focus {
    border-color: #EF4444 !important;
    border-left-color: #E5E5E5 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Apply red border to the flag container when input is invalid */
#bookingRequestModal .iti.is-invalid .iti__selected-country {
    border-color: #EF4444 !important;
    border-right-color: #E5E5E5 !important; /* Keep right border normal */
}
/** END Form Validation Styles **/

/** Share Icons **/
.share-btn-icon {
    @apply block w-12 h-12 mx-auto rounded-full bg-neutral-100 group-hover:bg-neutral-200 flex items-center justify-center transition;
}

.share-btn-svg {
    @apply w-6 h-6;
}

.share-btn-label {
    @apply text-xs mt-1 block text-neutral-700;
}
.share-panel .share-btn-icon{
    padding:5px;
}
/** END Share Icons **/



/**
Mini html editor (scoped + conflict-proof)
*/

/* Mini Editor Typography */
.mini-editor-content {
    line-height: 1.6;
    color: #3A3A3C;
}

/* Headings */
.mini-editor-content h1 {
    font-size: 32px;       /* Figma spec */
    line-height: 1.3;
    margin: 0.7em 0 0.4em;
}
.mini-editor-content h2 {
    font-size: 24px;       /* Figma spec */
    line-height: 1.35;
    margin: 0.7em 0 0.4em;
}
.mini-editor-content h3 {
    font-size: 20px;       /* Figma spec */
    line-height: 1.35;
    margin: 0.7em 0 0.4em;
}

/* Paragraphs */
.mini-editor-content p {
    font-size: 16px;
    margin: 0.6em 0;
}

/* Toolbar controls */
.mini-editor-toolbar .mini-ed-ctrl{
    height: 32px;
    min-height: 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mini-editor-toolbar .mini-ed-btn{ width:32px; padding:0; position:relative; overflow:visible !important; }
.mini-editor-toolbar .mini-ed-select{ padding:0 8px; line-height:1; background:#fff; outline:none; height:32px; }
.mini-editor-toolbar svg{ width:16px; height:16px; }

/* Placeholder */
.mini-editor-content[placeholder]:empty::before{
    content: attr(placeholder);
    color:#9FA1A6;
    pointer-events:none;
    display:block;
}

/* Tables rendered in content */
.mini-editor-content table{ border-collapse:collapse; width:auto; margin:8px 0; }
.mini-editor-content td,
.mini-editor-content th{ border:1px solid #d1d5db; padding:6px 8px; }

/* Resizable Image */
.mini-img-wrap{ display:inline-block; position:relative; max-width:100%; }
.mini-img-wrap img{ max-width:100%; height:auto; display:block; }
.mini-img-handle{
    width:10px;
    height:10px;
    background:#3b82f6;
    border-radius:50%;
    position:absolute;
    bottom:0;
    right:0;
    cursor:se-resize;
}

/* Table Picker (Hidden by default using visibility, not display) */
.mini-table-picker {
    position: absolute;
    top: 38px;
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 6px;
    border-radius: 6px;
    z-index: 9999;

    /* Layout but hidden */
    grid-template-columns: repeat(6, 20px);
    gap: 4px;

    /* Hidden state */
    display: none; /* ✅ Use display:none to prevent initial render */
    visibility: hidden;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}

.mini-table-picker.is-visible {
    display: grid !important; /* ✅ Only show when active */
    visibility: visible !important;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


.mini-table-picker-cell {
    width: 20px;
    height: 20px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    cursor: pointer;
    background: #f9fafb;
}

.mini-table-picker-cell.active {
    background: #3b82f6;
    border-color: #2563eb;
}

/* Ensure button does not clip dropdown */
.mini-ed-btn {
    position: relative;
    overflow: visible !important;
}

/* Ensure images scale properly in content */
.mini-editor-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0.75rem 0;
}

/* Optional: Styling for rendered (read-only) content areas outside the editor */
.content-render-area h1,
.content-render-area h2,
.content-render-area h3,
.content-render-area p,
.content-render-area img { all: revert; }

.content-render-area h1 { font-size: 32px;  margin: 0.7em 0 0.4em; }
.content-render-area h2 { font-size: 24px;  margin: 0.7em 0 0.4em; }
.content-render-area h3 { font-size: 20px;  margin: 0.7em 0 0.4em; }
.content-render-area p  { font-size: 16px; margin: 0.6em 0; }
.content-render-area img { max-width: 100%; height: auto; display: block; margin: 0.75rem 0; }


/* Rendered content area (read-only) */
.content-render-area h1,
.content-render-area h2,
.content-render-area h3,
.content-render-area p,
.content-render-area ul,
.content-render-area ol,
.content-render-area li,
.content-render-area img { all: revert; }

/* Headings */
.content-render-area h1 { font-size:32px;  line-height:1.3;  margin:0.7em 0 0.4em; }
.content-render-area h2 { font-size:24px;  line-height:1.35; margin:0.7em 0 0.4em; }
.content-render-area h3 { font-size:20px;  line-height:1.35; margin:0.7em 0 0.4em; }

/* Paragraphs */
.content-render-area p  { font-size:16px; margin:0.6em 0; }

/* ✅ Lists (override any global resets) */
.content-render-area ul,
.content-render-area ol{
    margin: 0.6em 0 0.6em 1.25em !important;
    padding-left: 1.25em !important;
    list-style-position: outside !important;
}
.content-render-area ul{ list-style-type: disc !important; }
.content-render-area ol{ list-style-type: decimal !important; }

.content-render-area ul ul,
.content-render-area ul ol,
.content-render-area ol ul,
.content-render-area ol ol{
    margin-left: 1.25em !important;
}

/* Images */
.content-render-area img { max-width:100%; height:auto; display:block; margin:0.75rem 0; }

/**
END Mini html editor
*/

/**
 * International Telephone Input (intl-tel-input) Custom Styling
 * Matches the theme's rounded-full design with neutral colors
 */

/* Container styling to match rounded-full inputs */
.iti {
    width: 100%;
    display: block;
}

/* Input field styling - rounded full */
.iti__input {
    width: 100% !important;
    padding: 0.625rem 1rem !important; /* py-2.5 px-4 */
    border: 1px solid #E5E7EB !important; /* border-neutral-200 */
    border-radius: 9999px !important; /* rounded-full */
    background-color: #F9FAFB !important; /* bg-neutral-50 */
    color: #3A3A3C !important; /* text-secondary-400 */
    font-size: 1rem !important;
    outline: none !important;
}

/* Focus state */
.iti__input:focus {
    border-color: #E5E7EB !important;
    box-shadow: 0 0 0 2px rgba(192, 151, 109, 0.1) !important; /* ring-primary-100 */
}

/* Placeholder styling */
.iti__input::placeholder {
    color: #9FA1A6 !important; /* text-secondary-100 */
}

/* Error state */
.iti__input.border-red-400 {
    border-color: #f87171 !important;
}

/* Country dropdown button - styled to match the rounded design */
.iti__selected-flag {
    padding: 0 0.5rem 0 1rem !important;
    border-radius: 9999px 0 0 9999px !important; /* rounded-l-full */
    background-color: #F3F4F6 !important; /* bg-neutral-75 */
    border-right: 1px solid #E5E7EB !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

.iti__selected-flag:hover {
    background-color: #E5E7EB !important; /* Slightly darker on hover */
    border-radius: 9999px 0 0 9999px !important; /* Maintain rounded-l-full on hover */
}

/* Arrow icon */
.iti__arrow {
    border-left: 4px solid transparent !important;
    border-right: 4px solid transparent !important;
    border-top: 5px solid #9FA1A6 !important; /* secondary-100 */
    margin-left: 0.5rem !important;
}

/* Dropdown menu styling */
.iti__country-list {
    border-radius: 1rem !important; /* rounded-2xl */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #E5E7EB !important;
    background-color: #ffffff !important;
    margin-top: 0.5rem !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* Country list items */
.iti__country {
    padding: 0.5rem 1rem !important;
    color: #3A3A3C !important; /* text-secondary-400 */
    font-size: 0.875rem !important; /* text-sm */
}

.iti__country:hover {
    background-color: #F9FAFB !important; /* neutral-50 */
}

.iti__country.iti__highlight {
    background-color: #F3F4F6 !important; /* neutral-100 */
}

.iti__country.iti__active {
    background-color: #F3DED0 !important; /* primary-75 */
    color: #715941 !important;
}

/* Dial code styling */
.iti__dial-code {
    color: #6B7280 !important; /* neutral-300 */
    font-size: 0.875rem !important;
}

/* Flag positioning */
.iti__flag {
    margin-right: 0.5rem !important;
}

/* Search input in dropdown */
.iti__search-input {
    padding: 0.5rem !important;
    border: 1px solid #E5E7EB !important;
    border-radius: 0.5rem !important;
    margin: 0.5rem !important;
    width: calc(100% - 1rem) !important;
}

/* Divider in country list */
.iti__divider {
    border-bottom: 1px solid #E5E7EB !important;
    margin: 0.25rem 0 !important;
}

/* Ensure proper z-index for dropdown - high enough to appear above modals (z-9999) */
/* intl-tel-input appends dropdown to body with .iti--container class */
.iti--container {
    z-index: 10001 !important;
}

/* Hide the separate dial code when integrated */
.iti--separate-dial-code .iti__selected-dial-code {
    margin-left: 0.25rem !important;
    color: #3A3A3C !important;
    font-weight: 500 !important;
}

.iti__selected-country-primary:hover{
    background:none !important;
}

/**
 * Thin Scrollbar Navigation
 * Class: .thin-scrollbar-nav
 * Shows a thin scrollbar without arrow buttons
 * Scrollbar only visible on hover (like Firefox behavior)
 * Note: Do not set display property - let the element use its own (e.g., flex)
 */
.thin-scrollbar-nav {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Webkit browsers (Chrome, Safari, Edge) - thin scrollbar without arrows */
.thin-scrollbar-nav::-webkit-scrollbar {
    height: 4px;
}

.thin-scrollbar-nav::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

/* Scrollbar thumb - transparent by default, visible on hover */
.thin-scrollbar-nav::-webkit-scrollbar-thumb {
    background-color: transparent; /* Hidden by default */
    border-radius: 4px;
}

/* Show scrollbar on container hover */
.thin-scrollbar-nav:hover::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.06);
}

.thin-scrollbar-nav:hover::-webkit-scrollbar-thumb {
    background-color: rgba(185, 138, 89, 0.5); /* primary-400 with opacity */
}

.thin-scrollbar-nav::-webkit-scrollbar-thumb:hover {
    background-color: rgba(185, 138, 89, 0.7);
}

/* Hide scrollbar buttons/arrows */
.thin-scrollbar-nav::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

/* Firefox - thin scrollbar, only visible on hover */
@supports (scrollbar-width: thin) {
    .thin-scrollbar-nav {
        scrollbar-width: thin;
        scrollbar-color: transparent transparent; /* Hidden by default */
    }
    .thin-scrollbar-nav:hover {
        scrollbar-color: rgba(185, 138, 89, 0.5) rgba(0, 0, 0, 0.06); /* thumb track */
    }
}

/**
 * END Thin Scrollbar Navigation
 */

/**
 * Dual Range Slider Styles
 * Two-handle range slider for min/max price selection
 */

/* Container for the dual slider */
.dual-range-slider {
    position: relative;
    height: 32px;
    display: flex;
    align-items: center;
}

/* Background track (gray line) */
.price-range-track-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #E8E8E8;
    border-radius: 4px;
    transform: translateY(-50%);
    z-index: 1;
}

/* Active/selected range track (beige line between thumbs) */
.price-range-track-active {
    position: absolute;
    top: 50%;
    height: 4px;
    background-color: #D4C4B0;
    border-radius: 4px;
    transform: translateY(-50%);
    z-index: 2;
    left: 0;
    width: 100%;
}

/* Both range inputs need to be overlapped */
.dual-range-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 32px;
    background: transparent;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    z-index: 5;
}

/* Style native slider thumb directly - matching Figma design */
.dual-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 3px solid #D4C4B0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    margin-top: -8px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.dual-range-input::-webkit-slider-thumb:hover,
.dual-range-input::-webkit-slider-thumb:active {
    border-color: #C4B4A0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dual-range-input::-moz-range-thumb {
    pointer-events: auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 3px solid #D4C4B0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.dual-range-input::-moz-range-thumb:hover,
.dual-range-input::-moz-range-thumb:active {
    border-color: #C4B4A0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Hide the default track for both inputs - we use custom track */
.dual-range-input::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: transparent;
    border: none;
}

.dual-range-input::-moz-range-track {
    width: 100%;
    height: 4px;
    background: transparent;
    border: none;
}

/* Focus states */
.dual-range-input:focus {
    outline: none;
}

/* Z-index for proper layering */
.dual-range-input-min {
    z-index: 5;
}

.dual-range-input-max {
    z-index: 6;
}

/* Hide custom handle divs - no longer needed */
.price-range-handle {
    display: none;
}

/**
 * END Dual Range Slider Styles
 */

/**
 * Filter Drawer Button Styles
 */
.btn-filter-apply {
    background-color: #ddc194 !important;
    border-color: #ddc194 !important;
}

.btn-filter-apply:hover {
    background-color: #d4b480 !important;
    border-color: #d4b480 !important;
}
/**
 * END Filter Drawer Button Styles
 */

/**
 * Property Description Content Styles
 * For rich text content from WYSIWYG editor on property details pages
 * Restores default styling for headings, lists, bold, italic, etc.
 * Uses !important to override Tailwind's base reset styles
 */
.property-description-content {
    line-height: 1.7 !important;
}

/* Headings */
.property-description-content h1 {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0.75em 0 0.5em !important;
    color: #3A3A3C !important;
    display: block !important;
}
.property-description-content h2 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    margin: 0.75em 0 0.5em !important;
    color: #3A3A3C !important;
    display: block !important;
}
.property-description-content h3 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0.75em 0 0.5em !important;
    color: #3A3A3C !important;
    display: block !important;
}
.property-description-content h4,
.property-description-content h5,
.property-description-content h6 {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 0.75em 0 0.5em !important;
    color: #3A3A3C !important;
    display: block !important;
}

/* Paragraphs */
.property-description-content p {
    margin: 0.6em 0 !important;
    line-height: 1.7 !important;
    display: block !important;
}

/* Bold and italic */
.property-description-content strong,
.property-description-content b {
    font-weight: 700 !important;
}
.property-description-content em,
.property-description-content i {
    font-style: italic !important;
}
.property-description-content u {
    text-decoration: underline !important;
}

/* Lists - override Tailwind resets with high specificity */
.property-description-content ul {
    display: block !important;
    list-style-type: disc !important;
    margin: 0.6em 0 0.6em 0 !important;
    padding-left: 1.5em !important;
    padding-inline-start: 1.5em !important;
    list-style-position: outside !important;
}
.property-description-content ol {
    display: block !important;
    list-style-type: decimal !important;
    margin: 0.6em 0 0.6em 0 !important;
    padding-left: 1.5em !important;
    padding-inline-start: 1.5em !important;
    list-style-position: outside !important;
}
.property-description-content li {
    display: list-item !important;
    margin: 0.25em 0 !important;
    padding-left: 0.25em !important;
    list-style: inherit !important;
}
.property-description-content ul > li {
    list-style-type: disc !important;
}
.property-description-content ol > li {
    list-style-type: decimal !important;
}

/* Nested lists */
.property-description-content ul ul,
.property-description-content ol ul {
    list-style-type: circle !important;
    margin: 0.25em 0 0.25em 0 !important;
}
.property-description-content ul ul ul,
.property-description-content ol ul ul {
    list-style-type: square !important;
}
.property-description-content ul ol,
.property-description-content ol ol {
    list-style-type: decimal !important;
    margin: 0.25em 0 0.25em 0 !important;
}

/* Blockquote */
.property-description-content blockquote {
    display: block !important;
    margin: 1em 0 !important;
    padding: 0.5em 1em !important;
    border-left: 4px solid #D4C4B0 !important;
    background-color: #F9FAFB !important;
    font-style: italic !important;
}

/* Links in description */
.property-description-content a {
    color: #B98A59 !important;
    text-decoration: underline !important;
}
.property-description-content a:hover {
    color: #8B6844 !important;
}

/* Tables */
.property-description-content table {
    border-collapse: collapse !important;
    width: 100% !important;
    margin: 0.75em 0 !important;
    display: table !important;
}
.property-description-content td,
.property-description-content th {
    border: 1px solid #E5E7EB !important;
    padding: 0.5em 0.75em !important;
    display: table-cell !important;
}
.property-description-content th {
    background-color: #F3F4F6 !important;
    font-weight: 600 !important;
}
.property-description-content tr {
    display: table-row !important;
}
.property-description-content thead {
    display: table-header-group !important;
}
.property-description-content tbody {
    display: table-row-group !important;
}

/* Images */
.property-description-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0.75em 0 !important;
    border-radius: 0.5rem !important;
}

/**
 * END Property Description Content Styles
 */

/**
 * Chat Widget Styles
 * Responsive chat widget - centered on mobile, bottom-right on desktop
 */
 #chatWidget {
    bottom: 8px;
    right: 8px;
    max-width: 420px;
}
#chatWidget .chat-window {
    width: 95vw;
    height: calc(100dvh - 32px);
}

@media (min-width: 768px) {
    #chatWidget .chat-window {
        width: 380px;
        max-height: 500px;
    }
}
 @media (orientation: landscape) and (min-width: 280px) and (max-width: 1280px) {
        #chatWidget .chat-window {
        width: 380px;
        height: calc(100dvh - 32px);
    }
    }
/**
 * END Chat Widget Styles
 */
