/* Mieszkania Plugin Styles */
#mieszkania-results {
	margin-bottom: 100px;
}

@media screen and (max-width: 1000px) {
	#mieszkania-results {
		padding: 0 0;
	}
}

#mieszkania-search-container {
    margin: 0 auto;
    padding: 50px 0;
	background: #f6f6f6;
}

#mieszkania-search-container.radio {
	padding: 0 0;
	background: unset;
}

/* Search Form Styles */
#mieszkania-search-form {
    background: #f6f6f6;
}

.radio #mieszkania-search-form {
	padding: 0;
	background: unset;
}

.search-row {
    display: grid;
    gap: 50px;
    align-items: end;
    grid-auto-columns: 1fr;
    grid-template-columns: 14% 14% 14% 14% 22% 155px;
    gap: 0px 2%;
}

/* Radio buildings container */
.radio-buildings-container {
}

/* Radio style layout adjustment - now that radio field is separate, adjust grid for remaining fields */
#mieszkania-search-container.radio .search-row {
	background: rgba(0, 0, 0, 0.7);
	grid-template-columns: 18% 18% 18% 25% 155px;
	padding: 30px 25px;
	box-sizing: border-box;
	border-radius: 0 10px 10px 10px;
}

@media screen and (max-width: 1300px) {
	#mieszkania-search-container .search-row {
		grid-template-columns: 17% 17% 17% 17% 24%; 
		gap: 20px 2%; 
	}
	
	#mieszkania-search-container .search-field.button {
		grid-column: span 5;
		width: 100%;
		text-align: center;
	}
	
	#mieszkania-search-container.radio .search-row {
		grid-template-columns: 22% 22% 22% 28%; 
		grid-template-rows: auto auto; 
		gap: 20px 2%; 
	}
	
	#mieszkania-search-container.radio .search-field.button {
		grid-column: span 4;
		width: 100%;
		text-align: center;
	}
	
	
	#search-button {
		margin: 0 auto;
	}
}

@media screen and (max-width: 1000px) {
	#mieszkania-search-container .search-row {
		grid-template-columns: 32% 32% 32%; 
		gap: 20px 2%; 
	}
	
	#mieszkania-search-container .search-field.button {
		grid-column: span 1;
	}
	
	#mieszkania-search-container .search-field.button button {
		width: 100%;
	}
}

@media screen and (max-width: 800px) {
	#mieszkania-search-container .search-row {
		grid-template-columns: 48% 48%; 
		gap: 20px 2%; 
	}
	
	#mieszkania-search-container .search-field.range,
	#mieszkania-search-container .search-field.button {
		grid-column: span 2;
	}
	
	#mieszkania-search-container .search-field.button button {
		width: 100%;
	}
}

@media screen and (max-width: 450px) {
	#mieszkania-search-container .search-row {
		grid-template-columns: 100%; 
		gap: 20px 2%; 
	}
	
	#mieszkania-search-container .search-field.range,
	#mieszkania-search-container .search-field.button {
		grid-column: span 1;
	}
	
	#mieszkania-search-container .search-field.button button {
		width: 100%;
	}
}


.search-field {
	
}

.search-field label {
    display: block;
    margin-bottom: 5px;
}

.radio .search-field label {
	color: #fff;
}

.search-field input,
.search-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
	box-sizing: border-box;
}

.search-field button {
    padding: 18px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
	transition: all 0.2s ease;
}

.search-field button[type="submit"] {
    color: white;
	transition: all 0.2s ease;
}

.search-field button[type="submit"]:hover {
    background: #000;
	transition: all 0.2s ease;
}

.search-field button[type="button"] {
    background: #5FA171;
    color: white;
	transition: all 0.2s ease;
}

.search-field button[type="button"]:hover {
    background: #000;
	transition: all 0.2s ease;
}

/* Search button with count */
#search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

#search-button-count {
    font-weight: normal;
    opacity: 0.8;
    font-size: 16px;
}

/* Dual Range Slider Styles */
.range-slider-container {
    padding: 0;
}

.range-values {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.range-values span {
    color: #5FA171;
    font-weight: bold;
}

.range-slider-wrapper {
    position: relative;
    height: 30px;
    margin: 0;
    padding: 0;
}

.range-slider-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    height: 6px;
    background: #ccc;
    border-radius: 3px;
    z-index: 1;
}

.radio .range-slider-track {
	background: #333;
}

.range-slider-progress {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: #5FA171;
    border-radius: 3px;
    z-index: 2;
    min-width: 2px;
}

.range-slider {
    position: absolute;
    width: 100%;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 6px;
    outline: none;
    z-index: 3;
    margin: 0;
	border: 0 !important;
    padding: 0 !important;
}


/* WebKit (Chrome, Safari, Edge) */
.range-slider::-webkit-slider-track {
    background: transparent;
    border: none;
    height: 6px;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #5FA171;
    cursor: pointer;
    pointer-events: all;
    border: 1px solid #5FA171;
    transition: all 0.2s ease;
    position: relative;
    z-index: 4;
    margin-top: 0px;
}

.range-slider:hover::-webkit-slider-thumb {
    transform: scale(1.1);
    background: #5FA171;
}

.range-slider:active::-webkit-slider-thumb {
    transform: scale(1.1);
    box-shadow: 0 0 0 8px rgba(95, 161, 113, 0.1);
}

/* Firefox */
.range-slider::-moz-range-track {
    background: transparent;
    border: none;
    height: 6px;
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #5FA171;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
    transition: all 0.2s ease;
    -moz-appearance: none;
    appearance: none;
}

.range-slider:hover::-moz-range-thumb {
    transform: scale(1.1);
    background: #000;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.range-slider:active::-moz-range-thumb {
    transform: scale(1.2);
}

/* Range labels */
.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

.radio .range-labels {
	color: #ccc;
}

.range-label-min {
    text-align: left;
}

.range-label-max {
    text-align: right;
}

/* Tom Select Arrow Styles */
.ts-control {
    position: relative;
}

.ts-control::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #666;
    transform: translateY(-50%);
    pointer-events: none;
    transition: transform 0.2s ease;
}

.ts-wrapper.dropdown-active .ts-control::after {
    transform: translateY(-50%) rotate(180deg);
}

.radio .ts-control::after {
    border-top: 6px solid #fff;
}

/* Single apartment page styles */
.mieszkanie-single-container {
    margin: 0 auto;
	max-width: 1300px;
    padding: 50px 20px;
}

.back-to-list {
    margin-bottom: 30px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: #5FA171;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #000;
    text-decoration: none;
}

.back-link .dashicons {
    margin-right: 8px;
    font-size: 18px;
}

.mieszkanie-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px 40px;
    align-items: start;
    padding: 0;
}

.mieszkanie-image {
	grid-row: span 2;
    position: sticky;
    top: 100px;
}

.mieszkanie-image-wrapper {
	width: 100%;
	max-width: 400px;
    border-radius: 8px;
	margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.0);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mieszkanie-image-wrapper:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.mieszkanie-floor-plan {
    width: 100%;
    height: auto;
    display: block;
}

.mieszkanie-details-column {
    padding: 0 20px 0 0;
}

.mieszkanie-title {
    font-size: 28px;
    font-weight: bold;
    color: #000;
    line-height: 1.3;
}

.mieszkanie-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

.mieszkanie-details-table {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

@media screen and (max-width: 1000px) {
	.mieszkanie-details-table {
		padding: 5px 15px;
	}
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #000;
    flex: 0 0 120px;
}

.detail-value {
    font-weight: bold;
    color: #000;
    text-align: right;
}

.mieszkanie-actions {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.btn {
	position: relative;
    display: inline-block;
    padding: 15px 40px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
	box-sizing: border-box;
    font-size: 16px;
}

.btn-primary {
    background-color: #5FA171;
    color: white;
    padding: 15px 55px 15px 40px;
}

.btn-primary:after {
	content: "";
	position: absolute;
	right: 30px;
	top: 24px;
	border: solid #fff;
	border-width: 0 3px 3px 0;
	display: inline-block;
	padding: 3px;
	transform: rotate(-45deg);
	transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #000;
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
	border: 1px solid #5FA171;
    color: #5FA171;
}

.btn-secondary:hover {
    background-color: #000;
	border: 1px solid #000;
    color: white;
    text-decoration: none;
}


.btn.pdf {
    padding: 15px 70px 15px 40px;	
}

.btn.pdf:after {
	display: none;
}

.btn.pdf:before {
	content: "";
	position: absolute;
	top: 13px;
	right: 30px;
	
	width: 28px;
	height: 28px;
	background-image: url(../graf/icoPDF.svg);
	background-size: contain;
	background-position: 50% 50%;
	background-repeat: no-repeat;
	
	filter: brightness(0) saturate(100%) invert(100%) sepia(5%) saturate(50%) hue-rotate(299deg) brightness(108%) contrast(100%);
	
	transition: all 0.2s ease;
}

.btn.pdf:hover:before {
	transition: all 0.2s ease;
}

@media screen and (max-width: 1000px) {
	.mieszkanie-actions {
		width: 100%;
		gap: 2%;
	}
	
	.mieszkanie-actions a {
		flex-basis: 49%;
	}
}

@media screen and (max-width: 500px) {
	.mieszkanie-actions {
		flex-direction: column;
		gap: 15px;
	}
	
	.mieszkanie-actions a {
		flex-basis: unset;
		width: 100%;
	}
}

	
/* Lightbox styles */
.lightbox {
    display: flex;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0);
    justify-content: center;
    align-items: center;
    padding: 1vw;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
    background-color: rgba(0,0,0,0.7);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.lightbox.show .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: fixed;
    top: 0;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10000;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ccc;
    background: rgba(0,0,0,0.8);
}

#lightbox-image {
    max-width: 60vw !important;
    max-height: 50vh !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    display: block !important;
    opacity: 0;
    transition: opacity 0.2s ease 0.1s;
}

.lightbox.show #lightbox-image {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 1000px) {
	.mieszkanie-content {
		display: flex;
		flex-direction: column;
		gap: 35px;
		padding: 0;
	}
	
	.mieszkanie-title {
		order: 1;
		width: 100%;
	}

	.mieszkanie-image {
		order: 2;
		text-align: center;
		width: 100%;
		
		position: relative;
		top: unset;
	}
		
	.mieszkanie-details {
		order: 3;
		width: 100%;
	}
}

/* Ensure max slider is above min slider */
.range-slider-max {
    z-index: 5;
}

/* Manual input fields */
.range-inputs-manual {
	visibility: hidden;
	position: absolute;
	
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.range-input-field {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.range-input-field:focus {
    outline: none;
    border-color: #5FA171;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.range-separator {
    color: #666;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {    
    .range-values {
        font-size: 14px;
    }
    
    .range-input-field {
        width: 70px;
        font-size: 13px;
    }
}

/* Radio Group Styles */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: color 0.2s ease;
}

.radio-option:hover {
    color: #5FA171;
}

.radio-option input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #5FA171;
}

.radio-option .radio-label {
    font-weight: 500;
    user-select: none;
}

/* Radio style for buildings field */
.search-field.budynki.radio-style {
	grid-column: span 5;
}

.search-field.budynki.radio-style .radio-group {
    justify-content: flex-start;
    gap: 5px;
}

.search-field.budynki.radio-style .radio-option {
	background: rgba(0 0 0 / 0.5);
	color: #999;
	border-radius: 6px 6px 0 0;
    padding: 12px 20px;
	border: 0;
	font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.search-field.budynki.radio-style .radio-option:hover {
    background: #5FA171;
    color: #fff;
}

.search-field.budynki.radio-style .radio-option input[type="radio"] {
	position: absolute;
	visibility: hidden;
}

.search-field.budynki.radio-style .radio-option input[type="radio"]:checked + .radio-label {
    color: #fff;
}

.search-field.budynki.radio-style .radio-option:has(input[type="radio"]:checked) {
	background: rgba(0 0 0 / 0.7);
	color: #fff;
}

.radio-group label {
    display: flex;
    align-items: center;
    background: white;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
    transition: all 0.3s ease;
}

.radio-group label:hover {
    background: #f0f0f0;
    border-color: #5FA171;
}

.radio-group label.selected {
    background: #5FA171;
    color: white;
    border-color: #5FA171;
}

.radio-group input[type="radio"] {
    margin-right: 8px;
    width: auto;
}

/* Range Input Styles */
.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-inputs input {
    flex: 1;
}

.range-inputs span {
    font-weight: bold;
    color: #666;
}

/* Results Grid */
.mieszkania-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Card Styles */
.mieszkanie-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mieszkanie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.mieszkanie-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mieszkanie-content h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #000;
}

.mieszkanie-details {
    margin-bottom: 15px;
}

.mieszkanie-details .detail {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.mieszkanie-details .detail strong {
    color: #000;
    min-width: 80px;
    display: inline-block;
}

/* Status Styles */
.mieszkanie-status {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.mieszkanie-status.status-wolne {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mieszkanie-status.status-sprzedane {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mieszkanie-status.status-zarezerwowane {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Link Styles */
.mieszkanie-link {
    display: inline-block;
    padding: 10px 20px;
    background: #5FA171;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mieszkanie-link:hover {
    background: #000;
    color: white;
    text-decoration: none;
}

/* Pagination */
.mieszkania-pagination {
    text-align: center;
    margin-top: 30px;
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 0;
}

.mieszkania-pagination .page-numbers {
    display: inline-block;
    padding: 5px 5px;
	box-sizing: border-box;
	width: 55px;
    margin: 0 0;
    background: white;
    border: 1px solid #5FA171;
    border-right: 0px solid #5FA171;
    color: #5FA171;
    text-decoration: none;
}

.mieszkania-pagination .page-numbers:first-child {
	border-radius: 5px 0 0 5px;
}

.mieszkania-pagination .page-numbers:last-child {
    border-right: 1px solid #5FA171;
	border-radius: 0 5px 5px 0;
}
	
.mieszkania-pagination .page-numbers:hover,
.mieszkania-pagination .page-numbers.current {
    background: #5FA171;
    color: white !important;
    border-color: #5FA171;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.loading:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #5FA171;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

.no-results {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
    }
    
    .search-field {
        min-width: 100%;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .mieszkania-grid {
        grid-template-columns: 1fr;
    }
    
    .range-inputs {
        flex-direction: column;
        gap: 5px;
    }
    
    .range-inputs span {
        display: none;
    }
}

/* Apartments Table Styles */
.apartments-table {
    /* overflow: hidden; */
    margin: 50px 0;
}

.apartments-table-header {
    display: grid;
    /* grid-template-columns dynamically generated by PHP */
    gap: 1px;
    background-color: #f6f6f6;
    font-weight: bold;
}

.apartments-table-header > div {
    background-color: #f6f6f6;
	text-align: center;
	padding: 15px 5px;
	box-sizing: border-box;
	height: 65px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.apartments-table-header > div a {
	color: #1D1D1B;
	font-weight: 700;
}

.apartments-table-row {
    display: grid;
    /* grid-template-columns dynamically generated by PHP */
    gap: 1px;
    padding: 0 0;
    align-items: center;
	transition: all 0.2s ease;
}

.apartments-table-row > div {
	text-align: center;
	padding: 15px 5px;
	box-sizing: border-box;
	height: 65px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}
	
.apartments-table-row:nth-child(even) {
    background-color: #fff;
}

.apartments-table-row:nth-child(even) > div {
	background: #fff;
}

.apartments-table-row:nth-child(odd) {
    background-color: #f6f6f6;
}

.apartments-table-row:nth-child(odd) > div {
	background: #f6f6f6;
}

.col-floor {
	
}

.col-status {
    font-weight: bold;
}

.col-status.status-wolne {
    color: #28a745;
}

.col-status.status-sprzedane {
    color: #dc3545;
}

.col-status.status-zarezerwowane {
    color: #ffc107;
}

.col-details {
    text-align: center;
	
	box-shadow: -3px 0 3px rgba(0 0 0 / 0.05)
}

.col-price-history {
    text-align: center;
}

.col-benefits {
    text-align: center;
    font-size: 0.9em;
}

.col-related-rooms {
    text-align: center;
    font-size: 0.9em;
}

.price-history-trigger {
	display: flex;
	justify-content: center;
	background-color: unset;
	width: 100%;
	font-size: 16px;
    cursor: pointer;
	font-weight: bold;
    transition: color 0.2s ease;
}

.price-history-text {
	display: block;
	width: 100%;
}

.price-history-trigger:hover {
    color: #5FA171;
}

.blueprint-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #1D1D1B;
	text-decoration: none;
	transition: all 0.2s ease;
	font-size: 14px;
}

.blueprint-icon {
	display: inline-block;
	width: 25px;
	height: 25px;
	background-image: url(../graf/icoPDF.svg);
	background-size: contain;
	background-position: 50% 50%;
	background-repeat: no-repeat;
	transition: all 0.2s ease;
}
.blueprint-text {
	white-space: nowrap;
}
	
.blueprint-link:hover {
	color: #5FA171;
}

.blueprint-link:hover .blueprint-icon {
	transition: all 0.2s ease;
}
	
.details-link {
	color: #000;
	transition: all 0.2s ease;
}

	.details-link:hover {
		color: #5FA171;
		text-decoration: none;
	}

/* Widoczne paski przewijania - dla wszystkich ekranów */
.scroll-bar-top,
.scroll-bar-bottom {
    overflow-x: auto;
    overflow-y: hidden;
    background-color: #F6F6F6;
	
    border: 0 solid #ddd;
    margin-bottom: 10px;
}

.scroll-bar-bottom {
    margin-top: 10px;
    margin-bottom: 0;
}

.scroll-content-dummy {
    height: 1px;
    min-width: 800px; /* Dopasowane do min-width tabeli */
    background: transparent;
}

/* Stylowanie pasków przewijania - widoczne na wszystkich ekranach */
.scroll-bar-top::-webkit-scrollbar,
.scroll-bar-bottom::-webkit-scrollbar {
    height: 18px;
}

.scroll-bar-top::-webkit-scrollbar-track,
.scroll-bar-bottom::-webkit-scrollbar-track {
    background: #F6F6F6;
    border-radius: 0;
}

.scroll-bar-top::-webkit-scrollbar-thumb,
.scroll-bar-bottom::-webkit-scrollbar-thumb {
    background: #e1e1e1;
    border-radius: 4px;
    border: 0px solid #F6F6F6;
}

.scroll-bar-top::-webkit-scrollbar-thumb:hover,
.scroll-bar-bottom::-webkit-scrollbar-thumb:hover {
    background: #d0d0d0;
}

/* Firefox scrollbar styling - dla wszystkich ekranów */
.scroll-bar-top,
.scroll-bar-bottom {
    scrollbar-width: auto;
    scrollbar-color: #e1e1e1 #F6F6F6;
}

/* Horizontal scrolling for all screens - always enable when needed */
.apartments-table {
    position: relative;
    overflow: hidden;
}

/* Tooltip Styles */
.tooltip-trigger {
    position: relative;
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
    color: #0073aa;
    transition: color 0.2s ease;
}

.tooltip-trigger:hover {
    color: #005a87;
}

.tooltip {
    position: absolute;
    background: #fff;
    padding: 15px 15px;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    max-width: 300px;
    white-space: normal;
}

.tooltip.show {
    opacity: 1;
    visibility: visible;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.tooltip.tooltip-top::before {
    top: 100%;
    border-color: #fff transparent transparent transparent;
}

.tooltip.tooltip-bottom {
    transform: translateY(-100%);
    margin-top: -10px;
}

.tooltip.tooltip-bottom::before {
    top: -10px;
    border-color: transparent transparent #333 transparent;
}

.tooltip strong {
	display: block;
	padding-bottom: 5px;
}

.tooltip em {
	display: block;
	padding: 2px 0;
	font-style: normal;
}

/* Scrollable container - for all screen sizes */
.apartments-table-scrollable {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    position: relative;
    cursor: grab;
}

.apartments-table-scrollable:active {
    cursor: grabbing;
}

/* Hide native scrollbar completely */
.apartments-table-scrollable {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.apartments-table-scrollable::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
    background: transparent;
}

.apartments-table-scrollable::-webkit-scrollbar-track,
.apartments-table-scrollable::-webkit-scrollbar-thumb,
.apartments-table-scrollable::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

.apartments-table-header,
.apartments-table-row {
    display: grid;
    min-width: 1000px; /* Minimum width to trigger horizontal scroll */
    gap: 1px;
}

/* First column (Piętro) - pinned left */
.col-floor {
}

/* Last column (Szczegóły) - pinned right */
.col-details {
	
}

/* Additional responsive adjustments */
@media (max-width: 1500px) {
    /* Any specific adjustments for smaller screens can go here */
}

@media (max-width: 900px) {
	.apartments-table-header, .apartments-table-row {
		min-width: 1000px;
		/* grid-template-columns dynamically generated by PHP */
	}
	
    .apartments-table-scrollable {
        margin: 0 -10px; /* Extend to screen edges on mobile */
        padding: 0 10px;
    }
}

/* YOAST SEO Breadcrumbs styles */
.yoast-breadcrumbs {
    margin-bottom: 20px;
    padding: 10px 0;
}

.yoast-breadcrumbs p#breadcrumbs {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.yoast-breadcrumbs a {
    color: #5FA171;
    text-decoration: none;
}

.yoast-breadcrumbs a:hover {
    color: #000;
}

/* Price History Popup Styles */
.price-history-popup {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 10000;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
	text-align: left;
    display: none;
    
    /* Custom scrollbar styles */
    scrollbar-width: thin;
    scrollbar-color: #e1e1e1 #fff;
}

/* Webkit scrollbar styles for price history popup */
.price-history-popup::-webkit-scrollbar {
    width: 8px;
}

.price-history-popup::-webkit-scrollbar-track {
    background: #fff;
    border-radius: 4px;
}

.price-history-popup::-webkit-scrollbar-thumb {
    background: #e1e1e1;
    border-radius: 4px;
}

.price-history-popup::-webkit-scrollbar-thumb:hover {
    background: #e1e1e1;
}

.price-history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
}

.price-history-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid #eaeaea;
}

.current-price {
    margin-bottom: 20px;
}

.historyPrice {
    font-size: 14px;
	font-weight: 700;
}

.no-history {
	padding: 2px 0 !important;
	margin: 10px 0 !important;
}

.current-price .price {
    font-size: 18px;
    font-weight: bold;
}

.price-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.price-history-table th,
.price-history-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.price-history-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.price-history-table tr:hover {
    background: #f8f9fa;
}

.price-history-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-history-close:hover {
    color: #333;
}

.price-history-trigger {
    cursor: pointer;
	display: flex;
	align-items: center;
	gap: 5px;
}

.price-history-trigger:hover {
    color: #5FA171;
}

.price-history-trigger span {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 5px;
}

.price-history-trigger span:before {
	content: "";
	display: block;
	width: 20px;
	height: 20px;
	
	background-image: url(../graf/icoPriceHistory.svg);
	background-size: contain;
	background-repeat: no-repeat;
}

.no-history {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 20px 0;
}

.col-price-history {
    position: relative;
}

.price-history-hover {
    position: fixed !important;
    max-width: 400px;
    width: auto;
    min-width: 300px;
    padding: 15px;
    font-size: 14px;
    max-height: 400px;
    z-index: 99999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.1s ease-out;
    pointer-events: auto;
}

/* Image Lightbox Styles */
.image-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
}

.image-lightbox-container {
    position: relative;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
	align-items: center;
}

.image-lightbox-header {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
	width: 100%;
    justify-content: space-between;
    align-items: center;
	box-sizing: border-box;
}

.image-lightbox-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-lightbox-close:hover {
    color: #ccc;
}

.image-lightbox-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.image-lightbox-image {
    max-width: 100%;
    max-height: calc(95vh - 60px);
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Price info icon styles */
.price-info-icon {
    margin-left: 5px;
    cursor: help;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: inline-block;
	width: 16px;
	height: 16px;
    position: relative;
	
	background-image: url(../graf/icoPriceInfo.svg);
	background-size: contain;
	background-repeat: no-repeat;
}

.price-info-icon:hover {
    opacity: 1;
}

/* JavaScript tooltip styling - matching price history popup style */
.price-info-tooltip {
    background: white;
    color: #333;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    text-align: center;
    display: none;
    position: absolute;
    z-index: 99999;
}

.price-info-tooltip::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-bottom-color: #ddd;
    z-index: 1;
}

.price-info-tooltip::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: white;
    z-index: 2;
}

/* Sortowanie tabeli */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable:hover {
    background-color: rgba(95, 161, 113, 0.1);
}

.sort-arrows {
    display: inline-block;
    margin-left: 5px;
    font-size: 10px;
    line-height: 1;
}

.sort-up,
.sort-down {
    display: block;
    color: #ccc;
    transition: color 0.2s;
}

.sort-up.active,
.sort-down.active {
    color: #5FA171;
}

.sortable.active-sort .sort-up,
.sortable.active-sort .sort-down {
    color: #ccc;
}

.sortable.active-sort .sort-up.active,
.sortable.active-sort .sort-down.active {
    color: #5FA171;
}


.optional-services-content {
}

.optional-services-content-inner {
	background: #F6F6F6;
	padding: 40px;
	box-sizing: border-box;
	margin-bottom: 100px;
}

	.optional-services-content-inner h2 {
		font-size: 30px;
	}

	.optional-services-content-inner ol {
		list-style: none;
		padding: 20px 0;
	}

		.optional-services-content-inner ol li {
			position: relative;
			padding: 5px 0 5px 25px;
		}
		
			.optional-services-content-inner ol li:before {
				content: "";
				display: block;
				width: 16px;
				height: 16px;
				
				position: absolute;
				left: 0;
				top: 8px;
				
				background-image: url(../graf/icoCheck.svg);
				background-size: contain;
				background-position: 50% 50%;
				background-repeat: no-repeat;
				
				filter: brightness(0) saturate(100%) invert(59%) sepia(33%) saturate(472%) hue-rotate(84deg) brightness(90%) contrast(86%);
			}

	.optional-services-content-inner ul {
		list-style: none;
		padding: 10px 0 10px 25px;
	}

		.optional-services-content-inner ul li {
			padding: 5px 0;
			list-style: disc;
		}
		
	.optional-services-content-inner .tooltip-trigger {
		display: inline-block;
		margin-left: 5px;
		width: 18px;
		height: 18px;
		
		background-image: url(../graf/icoPriceInfo.svg);
		background-size: contain;
		background-position: 50% 50%;
		background-repeat: no-repeat;
	}