/**
 * SpaceList Detail Slideout Styles
 * Modern, clean design for listing details
 * ISOLATED: Styles scoped to prevent theme/plugin conflicts
 */

/* CSS Variables for brand colors - Royal Blue Theme */
:root {
    --spacelist-primary-color: #2563EB; /* Royal Blue */
    --spacelist-primary-hover: #1E40AF; /* Deep Royal Blue */
}

/* =================================================================
   CSS RESET for Slideout - Prevents theme/plugin style conflicts
   ================================================================= */
.spacelist-slideout,
.spacelist-slideout *,
.spacelist-slideout *::before,
.spacelist-slideout *::after {
    box-sizing: border-box !important;
}

.spacelist-slideout input,
.spacelist-slideout select,
.spacelist-slideout textarea,
.spacelist-slideout button {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
}

/* Slideout Container - Maximum z-index to be above EVERYTHING */
.spacelist-slideout {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 550px !important;
    max-width: 100vw !important;
    height: 100vh !important;
    background: white !important;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15) !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease-out !important;
    z-index: 2147483647 !important; /* Maximum 32-bit integer - above EVERYTHING including admin bars and sticky headers */
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
}

.spacelist-slideout.open {
    transform: translateX(0) !important;
}

/* Smooth content loading transition */
.spacelist-slideout.content-loading {
    opacity: 0.5 !important;
    pointer-events: none !important;
}

/* Inner wrapper for proper structure */
.spacelist-slideout-inner {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
    position: relative !important;
    background: #f9fafb !important;
}

/* Header */
.spacelist-slideout-header {
    position: sticky !important;
    top: 0 !important;
    background: white !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 12px 24px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    z-index: 100 !important;
    min-height: 50px !important;
    flex-shrink: 0 !important;
}

.spacelist-slideout-title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    padding-right: 20px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: calc(100% - 100px) !important;
    flex: 1 !important;
}

/* Header Actions Container */
.spacelist-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Reset all buttons inside header actions to prevent theme interference */
.spacelist-header-actions button {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: normal !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.spacelist-slideout-close {
    background: none !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #6b7280 !important;
    border-radius: 8px !important;
    transition: all 0.2s !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    font-size: 0 !important; /* Hide text content if any */
    line-height: 1 !important;
}

.spacelist-slideout-close:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

/* SVG inside close button - explicit styling to override theme interference */
.spacelist-slideout-close svg {
    width: 24px !important;
    height: 24px !important;
    stroke: currentColor !important;
    fill: none !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.spacelist-slideout-close svg path {
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
}

/* Body */
.spacelist-slideout-body {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 0 24px 0 !important;
    background: #f9fafb !important;
}

/* Sections */
.spacelist-detail-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    margin-top: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.spacelist-detail-section:first-child {
    margin-top: 24px;
}

.spacelist-detail-section:last-child {
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.spacelist-section-title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

/* Documents/Brochures/Floorplans List - Defensive styling */
.spacelist-documents-list {
    list-style: disc !important;
    list-style-position: outside !important;
    margin: 0 !important;
    padding: 0 0 0 20px !important;
    line-height: 1.8 !important;
}

.spacelist-documents-list li {
    display: list-item !important;
    list-style: disc !important;
    list-style-position: outside !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    line-height: 1.8 !important;
}

.spacelist-documents-list li::marker {
    color: currentColor !important;
    font-size: 1em !important;
}

.spacelist-documents-list a {
    text-decoration: none !important;
    color: inherit !important;
    transition: opacity 0.2s !important;
    display: inline !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
}

.spacelist-documents-list a:hover {
    opacity: 0.7 !important;
    text-decoration: underline !important;
}

/* Gallery Slider */
.spacelist-detail-gallery {
    padding: 0;
    margin-top: 0;
    background: transparent;
    box-shadow: none;
}

.spacelist-gallery-slider {
    position: relative;
    width: 100%;
    height: 350px;
    background: #111827;
    border-radius: 12px;
    overflow: hidden;
}

/* Gallery Share Overlay - Share button in top right of gallery */
.spacelist-gallery-share-overlay {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* Share button in gallery - same style as header but with shadow for visibility */
.spacelist-gallery-share-overlay .spacelist-share-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    background: rgba(17, 24, 39, 0.85) !important; /* Semi-transparent dark background */
    backdrop-filter: blur(8px) !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important; /* More prominent shadow */
    text-decoration: none !important;
    font-size: 0 !important;
    line-height: 1 !important;
    position: relative !important;
    transition: all 0.2s ease !important;
}

.spacelist-gallery-share-overlay .spacelist-share-button:hover,
.spacelist-gallery-share-overlay .spacelist-share-button:focus,
.spacelist-gallery-share-overlay .spacelist-share-button:active {
    background: rgba(31, 41, 55, 0.95) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
    outline: none !important;
    border: none !important;
}

/* SVG inside gallery share button */
.spacelist-gallery-share-overlay .spacelist-share-button svg {
    width: 20px !important;
    height: 20px !important;
    fill: white !important;
    stroke: none !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.spacelist-gallery-share-overlay .spacelist-share-button svg path {
    fill: white !important;
    stroke: none !important;
}

/* Share dropdown in gallery - position relative to share button */
.spacelist-gallery-share-overlay .spacelist-share-dropdown {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    background: white !important;
    border-radius: 12px !important;
    padding: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important; /* Stronger shadow for gallery overlay */
    display: flex !important;
    gap: 8px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s !important;
    z-index: 11 !important;
    border: none !important;
    margin: 0 !important;
}

/* Social Share Button in Header */
.spacelist-header-actions .spacelist-share-button {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    background: #111827 !important; /* Dark gray instead of pure black */
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    font-size: 0 !important;
    line-height: 1 !important;
    position: relative !important;
}

.spacelist-header-actions .spacelist-share-button:hover,
.spacelist-header-actions .spacelist-share-button:focus,
.spacelist-header-actions .spacelist-share-button:active {
    background: #1f2937 !important; /* Slightly lighter on hover */
    transform: none !important;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* SVG inside share button - explicit styling to override theme interference */
.spacelist-header-actions .spacelist-share-button svg {
    width: 18px !important;
    height: 18px !important;
    fill: white !important;
    stroke: none !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.spacelist-header-actions .spacelist-share-button svg path {
    fill: white !important;
    stroke: none !important;
}

/* Share Dropdown - Defensive styling */
.spacelist-header-actions .spacelist-share-dropdown {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 48px !important;
    background: white !important;
    border-radius: 12px !important;
    padding: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    gap: 8px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s !important;
    z-index: 11 !important;
    border: none !important;
    margin: 0 !important;
}

.spacelist-share-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Social Icons - Defensive styling to prevent theme interference */
.spacelist-share-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    cursor: pointer !important;
    text-decoration: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    line-height: 1 !important;
}

.spacelist-share-icon:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    text-decoration: none !important;
}

.spacelist-share-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.spacelist-share-icon svg path {
    fill: white !important;
    stroke: none !important;
}

/* LinkedIn */
.spacelist-share-linkedin {
    background: #0077B5 !important;
}

.spacelist-share-linkedin:hover {
    background: #005885 !important;
}

/* Facebook */
.spacelist-share-facebook {
    background: #1877F2 !important;
}

.spacelist-share-facebook:hover {
    background: #0C63D4 !important;
}

/* X/Twitter */
.spacelist-share-x {
    background: #000000 !important;
}

.spacelist-share-x:hover {
    background: #1a1a1a !important;
}

/* Email */
.spacelist-share-email {
    background: #EA4335 !important;
}

.spacelist-share-email:hover {
    background: #D33B2C !important;
}

/* Copy Link */
.spacelist-share-copy {
    background: #9333ea !important;
    border: none !important;
    outline: none !important;
    position: relative !important;
}

.spacelist-share-copy:hover {
    background: #7e22ce !important;
}

/* Copy Tooltip */
.spacelist-copy-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
}

.spacelist-copy-tooltip.show {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
}

.spacelist-copy-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #1f2937;
}

.spacelist-gallery-track {
    position: relative;
    height: 100%;
    display: flex;
    transition: transform 0.4s ease;
}

.spacelist-gallery-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none; /* Prevent inactive slides from blocking clicks */
}

.spacelist-gallery-slide.active {
    opacity: 1;
    pointer-events: auto; /* Allow clicks on active slide */
}

.spacelist-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gallery Navigation */
.spacelist-gallery-nav {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    opacity: 0 !important;
    transition: all 0.3s !important;
    color: #111827 !important;
    pointer-events: none !important; /* Allow clicks to pass through when invisible */
    z-index: 10 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.spacelist-gallery-nav svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    color: #111827 !important;
}

.spacelist-gallery-nav path {
    stroke: currentColor !important;
}

.spacelist-gallery-slider:hover .spacelist-gallery-nav {
    opacity: 1 !important;
    pointer-events: auto !important; /* Enable clicks when visible */
}

.spacelist-gallery-prev {
    left: 16px !important;
}

.spacelist-gallery-next {
    right: 16px !important;
}

.spacelist-gallery-nav:hover {
    background: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.spacelist-gallery-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    pointer-events: none; /* Allow clicks to pass through counter */
    z-index: 10;
    font-size: 13px;
    font-weight: 500;
}

/* NEW: Swiper-based Gallery Slider */
.spacelist-gallery-swiper-container[data-spacelist-scope] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 350px !important;
    background: #111827 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-wrapper {
    height: 100% !important;
    width: 100% !important;
    display: flex !important;
}

.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-slide {
    width: 100% !important;
    height: 100% !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #111827 !important;
}

.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    cursor: pointer !important;
}

.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-button-prev,
.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-button-next {
    width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    color: #111827 !important;
    opacity: 0 !important;
    transition: all 0.3s !important;
}

.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper:hover .swiper-button-prev,
.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper:hover .swiper-button-next {
    opacity: 1 !important;
}

.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-button-prev:hover,
.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-button-next:hover {
    background: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-button-prev::after,
.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-button-next::after {
    font-size: 16px !important;
    font-weight: bold !important;
}

.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-pagination {
    bottom: 16px !important;
}

.spacelist-gallery-swiper-container[data-spacelist-scope] .swiper-pagination-fraction {
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    width: auto !important;
    left: auto !important;
    right: 16px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .spacelist-gallery-swiper-container[data-spacelist-scope] .swiper {
        height: 250px !important;
    }
}

/* Header Section (Property Info) */
.spacelist-detail-header {
    background: transparent;
    padding: 0;
    margin-top: 24px;
    box-shadow: none;
}

.spacelist-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.spacelist-detail-address {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 20px;
}

/* Metrics Row */
.spacelist-detail-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.spacelist-metric {
    display: flex;
    flex-direction: column;
}

.spacelist-metric-label {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.spacelist-metric-value {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

/* Details Grid */
.spacelist-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.spacelist-detail-item {
    display: flex;
    flex-direction: column;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.spacelist-detail-label {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 4px;
}

.spacelist-detail-value {
    font-size: 15px;
    font-weight: 500;
    color: #111827;
}

/* Description */
.spacelist-description-content {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

/* Features List */
.spacelist-features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.spacelist-features-list li {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #4b5563;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 6px;
}

.spacelist-features-list li:before {
    content: '✓';
    color: #10b981;
    font-weight: bold;
    margin-right: 8px;
}

/* Map Container */
.spacelist-detail-map-container {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}

/* Contact Section */
.spacelist-agent-info {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.spacelist-agent-name {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.spacelist-agent-company {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.spacelist-agent-phone,
.spacelist-agent-email {
    margin-bottom: 8px;
}

.spacelist-agent-phone a,
.spacelist-agent-email a {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

.spacelist-agent-phone a:hover,
.spacelist-agent-email a:hover {
    text-decoration: underline;
}

/* Contact Cards Grid */
.spacelist-contacts-grid {
    display: block;
    margin-bottom: 30px;
}

.spacelist-contact-card {
    background: transparent;
    padding: 12px 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.spacelist-contact-photo {
    flex-shrink: 0;
}

.spacelist-contact-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f3f4f6;
}

.spacelist-contact-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.spacelist-contact-avatar-placeholder svg {
    width: 60px;
    height: 60px;
}

.spacelist-contact-info {
    flex: 1;
    min-width: 0; /* Allow text to wrap */
}

.spacelist-contact-name {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
    /* Truncate long names to fit on one line */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spacelist-contact-company {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.spacelist-contact-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.spacelist-contact-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #FFFFFF;
    color: #2563EB;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid #2563EB;
}

.spacelist-contact-action:hover {
    background: #2563EB;
    text-decoration: none;
    color: #FFFFFF;
    border-color: #2563EB;
}

.spacelist-contact-phone-btn {
    background: #FFFFFF;
    color: #2563EB;
    border-color: #2563EB;
}

.spacelist-contact-phone-btn:hover {
    background: #2563EB;
    border-color: #2563EB;
    color: #FFFFFF;
}

.spacelist-contact-email-btn {
    background: #FFFFFF;
    color: #2563EB;
    border-color: #2563EB;
}

.spacelist-contact-email-btn:hover {
    background: #2563EB;
    border-color: #2563EB;
    color: #FFFFFF;
}

.spacelist-contact-icon {
    font-size: 14px;
    line-height: 1;
}

/* Contact Form */
.spacelist-contact-form {
    display: grid;
    gap: 16px;
}

/* Specific overrides for inline contact form in slideout */
#spacelist-inline-contact-form.spacelist-contact-form {
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    max-width: 100% !important;
}

#spacelist-inline-contact-form .spacelist-form-group,
#spacelist-inline-contact-form .form-group {
    margin-bottom: 16px !important;
}

#spacelist-inline-contact-form .spacelist-form-group:last-child {
    margin-bottom: 0 !important;
}

.spacelist-form-group,
.spacelist-contact-form .form-group,
.spacelist-contact-form .spacelist-form-group {
    margin-bottom: 16px !important;
}

.spacelist-form-group input,
.spacelist-form-group textarea,
.spacelist-form-group select {
    width: 100% !important;
    padding: 12px 16px !important;
    margin: 0 !important; /* Prevent theme margins */
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    line-height: normal !important;
    height: auto !important;
    transition: all 0.2s !important;
    background: white !important;
    color: #333 !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

.spacelist-form-group input:focus,
.spacelist-form-group textarea:focus,
.spacelist-form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Checkbox styling */
.spacelist-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: normal;
    cursor: pointer;
    margin-bottom: 0;
    padding: 8px 0;
}

.spacelist-checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
    transform: scale(1.2);
}

.spacelist-btn {
    padding: 12px 24px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: normal !important;
    height: auto !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
    text-transform: none !important;
}

.spacelist-btn-primary {
    background: #2563eb !important;
    color: white !important;
}

.spacelist-btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Floating Request Info Button */
.spacelist-request-info-btn {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: calc(550px - 48px) !important;
    max-width: calc(95vw - 48px) !important;
    padding: 14px 24px !important;
    margin: 0 !important;
    /* Background and color will be set by inline styles from settings */
    border: none !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: normal !important;
    height: auto !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 100 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    text-transform: none !important;
}

.spacelist-request-info-btn:hover {
    /* Hover background will be set by inline styles from settings */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* Overlay - Just below slideout */
.spacelist-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s !important;
    z-index: 2147483646 !important; /* Just below slideout (max - 1) */
    margin: 0 !important;
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Override WordPress theme layout flow margins */
:root :where(.is-layout-flow) > .spacelist-overlay {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

.spacelist-overlay.open {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Lightbox Styles - Above slideout */
.spacelist-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483648 !important; /* Higher than slideout */
    display: none !important;
}

.spacelist-lightbox.open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.spacelist-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
}

.spacelist-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spacelist-lightbox-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spacelist-lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.spacelist-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 1001;
    line-height: 1;
}

.spacelist-lightbox-close:hover {
    opacity: 1;
}

.spacelist-lightbox-prev,
.spacelist-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    z-index: 1001;
    border-radius: 50%;
}

.spacelist-lightbox-prev {
    left: 30px;
}

.spacelist-lightbox-next {
    right: 30px;
}

.spacelist-lightbox-prev:hover,
.spacelist-lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.spacelist-lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
}

/* Make gallery images clickable */
.spacelist-gallery-slide img {
    cursor: zoom-in;
    position: relative;
    z-index: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .spacelist-slideout {
        width: 100%;
        max-width: 100%;
    }

    .spacelist-slideout-body {
        padding: 0 16px 0;
    }

    .spacelist-detail-section {
        padding: 20px;
    }

    .spacelist-gallery-slider {
        height: 250px;
    }

    .spacelist-detail-grid,
    .spacelist-features-list {
        grid-template-columns: 1fr;
    }

    .spacelist-detail-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Scrollbar Styling */
.spacelist-slideout-body::-webkit-scrollbar {
    width: 6px;
}

.spacelist-slideout-body::-webkit-scrollbar-track {
    background: #f9fafb;
}

.spacelist-slideout-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.spacelist-slideout-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Loading State */
.spacelist-detail-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #6b7280;
}

.spacelist-detail-loading:after {
    content: '';
    width: 32px;
    height: 32px;
    margin-left: 12px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Form Response Messages */
.spacelist-form-response {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
}

.spacelist-form-response.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.spacelist-form-response.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Disabled button state */
.spacelist-contact-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
