/**
 * Modern Frontend Styles für incoding Atlas Plugin
 * Inspiriert von professionellem Immobilien-Design
 * 
 * @package Incoding\Atlas
 * @since 1.0.0
 */

/* ==========================================
   CSS Variables (Dynamisch aus Backend)
   ========================================== */

:root {
	--atlas-primary-color: #005A4E;
	--atlas-secondary-color: #333333;
	--atlas-hover-color: #007A68;
	--atlas-highlight-color: #FFE066;
	--atlas-font-family: system-ui, -apple-system, sans-serif;
	--atlas-heading-size: 32px;
	--atlas-text-size: 16px;
	--atlas-spacing: 20px;
	--atlas-border-radius: 8px;
	--atlas-transition: all 0.3s ease;
}

/* ==========================================
   Wrapper & Container
   ========================================== */

.atlas-isometrie-wrapper {
	max-width: 100%;
    margin: 0 auto;
    font-size: var(--atlas-text-size);
    line-height: 1.6;
}

/* ==========================================
   Header - Modern Design
   ========================================== */

.atlas-title {
        font-family: 'Nexa Heavy';
          font-size: 40px;
          line-height: 50px;
          color: #404040;
          letter-spacing: 1px;
          max-width: 65%;
          
          
                            
}



.atlas-intro {
	font-family: "Nexa";
    font-size: 24px;
    line-height: 36px;
    color: #404040;
	width: 65%;
}

@media (max-width: 991px) {
        .atlas-intro {
	width: 80%;
}
      }

@media (max-width: 756px) {
	.atlas-title {
                              font-size: 30px;
                              max-width: 100%;
                            }
	.atlas-intro{
                    font-size: 15px;
                    line-height: 23px;
	}
	.atlas-intro {
	width: 100%;
}
	}

.atlas-stand {
	display: inline-block;
	font-size: 13px;
	color: #666;
	padding: 6px 14px;
	background: #f5f5f5;
	border-radius: 4px;
	font-weight: 500;
	margin: 0;
}

/* ==========================================
   Content Layout - 2-Spalten
   ========================================== */

/* ==========================================
   SVG Container - Rechts fixiert
   ========================================== */

.atlas-svg-container {
	padding: 150px 20px 20px 20px;
}

.atlas-svg-container svg {
	max-width: 100%;
	height: auto;
	display: block;
	overflow: visible !important;
}

/* SVG Interaktivität */
.atlas-svg-container svg [id] {
	cursor: pointer;
	transition: all 0.3s ease;
	outline: none !important;
}

.atlas-svg-container svg [id].atlas-svg-hover,
.atlas-svg-container svg [id]:hover {
	opacity: 1;
	filter: brightness(1.05);
}

.atlas-svg-container svg [id]:focus {
	outline: none !important;
}

.atlas-svg-container svg *:focus {
	outline: none !important;
}

/* Permanente Auswahl (Klick) - Grüne Färbung + Glow */
.atlas-svg-container svg [id].atlas-svg-selected {
	filter: drop-shadow(0 0 15px rgba(210,217,25, 0.8));
	transform: scale(1.08);
	transform-origin: center;
	z-index: 100;
	transition: all 0.3s ease;
}

.atlas-svg-container svg [id].atlas-svg-selected * {
	fill: #d2d919 !important;
	opacity: 1 !important;
	transition: all 0.3s ease;
}

/* Alle Elemente behalten volle Opacity */
.atlas-svg-container svg [id] {
	opacity: 1 !important;
	transition: filter 0.3s ease, transform 0.3s ease;
}

.atlas-svg-container svg [id] * {
	opacity: 1 !important;
	stroke: #c9c9c9;
}

/* Angehobene Geschosse */
.atlas-svg-container svg [id].atlas-floor-lifted {
	transform-origin: center;
}

@media (max-width: 1200px) {
	.atlas-svg-container {
		position: relative;
		top: 0;
		max-height: 600px;
		order: 1;
		margin-bottom: 30px;
	}
}

/* ==========================================
   Table Container
   ========================================== */

.atlas-table-container {
	order: 1;
}

/* ==========================================
   Gebäude-Accordion - Modern Tabs Style
   ========================================== */

.atlas-building-accordion {
	margin-bottom: 0px;
	overflow: hidden;
}

.atlas-building-header {
	    color: #ff7600;
    font-size: 26px;
    line-height: 36px;
	padding: 16px 24px;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	transition: var(--atlas-transition);
	font-weight: 500;
	border: none;
	    border-top: 1px solid #dbdbdb;
}

.atlas-building-header:hover {
	transform: none;
}

.atlas-building-header .atlas-accordion-icon {
	transition: transform 0.3s ease;
	font-size: 20px;
	font-weight: bold;
}

.atlas-building-header.active .atlas-accordion-icon {
	transform: rotate(180deg);
}

.atlas-building-content {
	display: none;
	background: #fff;
	animation: fadeIn 0.3s ease;
}

.atlas-building-content.active {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* ==========================================
   Tabelle - Modernes Design
   ========================================== */

.atlas-apartments-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	font-size: 14px;
}

.atlas-apartments-table thead th {
	padding: 14px 16px;
	text-align: left;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border: none;
}

.atlas-apartments-table thead th:first-child {
	padding-left: 24px;
}

.atlas-apartments-table tbody tr {
	border-bottom: 1px solid #e9ecef;
	transition: var(--atlas-transition);
	cursor: pointer;
}

.atlas-apartments-table tbody tr:nth-child(odd) {
	background: var(--atlas-row-odd-color, #ffffff);
}

.atlas-apartments-table tbody tr:nth-child(even) {
	background: var(--atlas-row-even-color, #f8f9fa);
}

.atlas-apartments-table tbody tr:hover {
	background: #fdffcb !important;
	transform: translateX(4px);
	box-shadow: 0 2px 8px rgba(0, 90, 78, 0.1);
}

/* Permanente Hervorhebung (Klick) */
.atlas-apartments-table tbody tr.atlas-row-selected,
.atlas-apartments-table tbody tr.atlas-table-selected {
	background: #d2d919 !important;
	box-shadow: 0 4px 12px rgba(210,217,25, 0.4);
	position: relative;
	color: black !important;
	z-index: 10;
}

.atlas-apartments-table tbody tr.atlas-table-selected td,
.atlas-apartments-table tbody tr.atlas-table-selected td * {
	color: black !important;
}

.atlas-apartments-table tbody tr.atlas-table-selected td.atlas-table-actions,
.atlas-apartments-table tbody tr.atlas-table-selected td.atlas-table-actions *{
	color: black !important;
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
		transform: translateX(0);
	}
	50% {
		opacity: 0.5;
		transform: translateX(-5px);
	}
}

.atlas-apartments-table tbody td {
	padding: 16px;
	color: #333;
	vertical-align: middle;
	border: none;
}

.atlas-apartments-table tbody td:first-child {
	padding-left: 24px;
	font-weight: 600;
	color: var(--atlas-primary-color);
}


/* ==========================================
   Grundriss PDF Button
   ========================================== */

.atlas-grundriss-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	color: #374151;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.atlas-grundriss-btn:hover {
	background: #f9fafb;
	border-color: #9ca3af;
	color: #111827;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.atlas-grundriss-btn svg {
	flex-shrink: 0;
}

.atlas-no-pdf {
	color: #9ca3af;
	font-size: 14px;
}

/* ==========================================
   Status Badges - Modern Pills
   ========================================== */

.atlas-status-badge {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 14px;
	font-size: 11px;
	line-height:14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.atlas-status-badge.atlas-status-frei,
.atlas-status-frei .atlas-status-badge,
.atlas-apartment-row.atlas-status-frei .atlas-status-badge {
	background: var(--atlas-status-frei, #28A745);
	color: white;
}

.atlas-status-badge.atlas-status-reserviert,
.atlas-status-reserviert .atlas-status-badge,
.atlas-apartment-row.atlas-status-reserviert .atlas-status-badge {
	background: var(--atlas-status-reserviert, #FFA500);
	color: white;
}

.atlas-status-badge.atlas-status-verkauft,
.atlas-status-verkauft .atlas-status-badge,
.atlas-apartment-row.atlas-status-verkauft .atlas-status-badge {
	background: var(--atlas-status-verkauft, #DC3545);
	color: white;
}

/* ==========================================
   Preis-Anzeige - Professional
   ========================================== */

.atlas-price {
	font-weight: 600;
	color: var(--atlas-primary-color);
}

.atlas-price-breakdown {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.atlas-price-item {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
}

.atlas-price-label {
	color: #666;
	font-weight: 400;
}

.atlas-price-value {
	font-weight: 600;
	color: #333;
}

.atlas-price-total {
	padding-top: 4px;
	border-top: 1px solid #e9ecef;
	margin-top: 4px;
}

.atlas-price-total .atlas-price-value {
	color: var(--atlas-primary-color);
	font-size: 14px;
}

/* ==========================================
   Responsive - Mobile First
   ========================================== */

@media (max-width: 768px) {
	.atlas-header {
		padding: 24px 20px;
	}
	
	.atlas-content {
		padding: 20px;
		gap: 20px;
	}
	
	/* Mobile Card Layout - Tabelle wird zu Karten */
	.atlas-apartments-table {
		display: block;
		font-size: 14px;
	}
	
	.atlas-apartments-table thead {
		display: none; /* Header ausblenden */
	}
	
	.atlas-apartments-table tbody {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}
	
	.atlas-apartments-table tbody tr {
		display: flex;
		flex-direction: column;
		background: #fff;
		border: 1px solid #e9ecef;
		border-radius: 12px;
		padding: 0;
		margin: 0;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
		overflow: hidden;
	}
	
	.atlas-apartments-table tbody tr:hover {
		transform: none;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	}
	
	.atlas-apartments-table tbody tr.atlas-table-selected {
		border-color: #d2d919;
		box-shadow: 0 4px 16px rgba(210, 217, 25, 0.4);
	}
	
	.atlas-apartments-table tbody td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 12px 16px;
		border-bottom: 1px solid #f0f0f0;
		text-align: right;
	}
	
	.atlas-apartments-table tbody td:last-child {
		border-bottom: none;
	}
	
	/* Label vor dem Wert anzeigen */
	.atlas-apartments-table tbody td::before {
		content: attr(data-label);
		font-weight: 600;
		color: #666;
		text-align: left;
		flex-shrink: 0;
		margin-right: 16px;
	}
	
	/* Wohnungsnummer als Header der Card */
	.atlas-apartments-table tbody td:first-child {
		background: var(--atlas-primary-color);
		color: white;
		padding: 14px 16px;
	}
	
	.atlas-apartments-table tbody td:first-child::before {
		color: rgba(255, 255, 255, 0.8);
	}
	
	.atlas-apartments-table tbody td:first-child strong {
		font-size: 18px;
		color: white;
	}
	
	/* Preis-Bereich */
	.atlas-apartments-table tbody td.atlas-price {
		flex-direction: column;
		align-items: stretch;
		text-align: left;
	}
	
	.atlas-apartments-table tbody td.atlas-price::before {
		margin-bottom: 8px;
	}
	
	.atlas-price-breakdown {
		width: 100%;
	}
	
	.atlas-price-item {
		justify-content: space-between;
	}
	
	/* Status Badge zentriert */
	.atlas-apartments-table tbody td:last-child {
		justify-content: space-between;
		background: #f8f9fa;
		padding: 14px 16px;
	}
	
	/* Grundriss Button */
	.atlas-apartments-table tbody td.atlas-table-actions {
		flex-direction: column;
		align-items: stretch;
	}
	
	.atlas-apartments-table tbody td.atlas-table-actions::before {
		margin-bottom: 8px;
	}
	
	.atlas-grundriss-btn {
		justify-content: center;
		width: 100%;
	}
}

/* ==========================================
   Loading & Empty States
   ========================================== */

.atlas-no-apartments {
	text-align: center;
	padding: 60px 20px;
	color: #999;
	font-size: 16px;
	background: #f8f9fa;
	border-radius: var(--atlas-border-radius);
	border: 2px dashed #dee2e6;
}

/* ==========================================
   Logo Branding
   ========================================== */

.atlas-logo {
	position: absolute;
	z-index: 10;
	padding: 12px;
}

.atlas-logo-top-left {
	top: 10px;
	left: 10px;
}

.atlas-logo-top-right {
	top: 10px;
	right: 10px;
}

.atlas-logo-bottom-left {
	bottom: 10px;
	left: 10px;
}

.atlas-logo-bottom-right {
	bottom: 10px;
	right: 10px;
}

.atlas-logo img {
	max-width: 100%;
	height: auto;
	display: block;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* ==========================================
   Detail Modal - Modern Slide-In
   ========================================== */

.atlas-detail-modal {
	position: fixed;
	top: 0;
	right: -100%;
	width: 100%;
	max-width: 600px;
	height: 100vh;
	background: white;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
	z-index: 9999;
	transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

.atlas-detail-modal.active {
	right: 0;
}

.atlas-detail-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	backdrop-filter: blur(4px);
}

.atlas-detail-overlay.active {
	opacity: 1;
	visibility: visible;
}

.atlas-detail-header {
	background: var(--atlas-primary-color);
	color: white;
	padding: 24px 32px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: sticky;
	top: 0;
	z-index: 10;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.atlas-detail-title {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
}

.atlas-detail-close {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	transition: all 0.3s ease;
	line-height: 1;
}

.atlas-detail-close:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(90deg);
}

.atlas-detail-content {
	padding: 32px;
	flex: 1;
}

.atlas-detail-section {
	margin-bottom: 32px;
}

.atlas-detail-section-title {
	font-size: 18px;
	font-weight: 600;
	color: var(--atlas-primary-color);
	margin: 0 0 16px 0;
	padding-bottom: 8px;
	border-bottom: 2px solid #e9ecef;
}

.atlas-detail-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.atlas-detail-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.atlas-detail-label {
	font-size: 13px;
	color: #666;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.atlas-detail-value {
	font-size: 16px;
	color: #333;
	font-weight: 600;
}

.atlas-detail-price-section {
	background: #f8f9fa;
	padding: 20px;
	border-radius: var(--atlas-border-radius);
	border: 2px solid #e9ecef;
}

.atlas-detail-price-item {
	display: flex;
	justify-content: space-between;
	padding: 12px 0;
	border-bottom: 1px solid #dee2e6;
}

.atlas-detail-price-item:last-child {
	border-bottom: none;
	padding-top: 16px;
	margin-top: 8px;
	border-top: 2px solid var(--atlas-primary-color);
}

.atlas-detail-price-label {
	font-size: 14px;
	color: #666;
}

.atlas-detail-price-value {
	font-size: 16px;
	font-weight: 600;
	color: var(--atlas-primary-color);
}

.atlas-detail-actions {
	display: flex;
	gap: 12px;
	margin-top: 24px;
}

.atlas-detail-btn {
	flex: 1;
	padding: 14px 24px;
	border: none;
	border-radius: var(--atlas-border-radius);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.atlas-detail-btn-primary {
	background: var(--atlas-primary-color);
	color: white;
}

.atlas-detail-btn-primary:hover {
	background: var(--atlas-hover-color);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 90, 78, 0.3);
}

.atlas-detail-btn-secondary {
	background: #fff;
	color: var(--atlas-primary-color);
	border: 2px solid var(--atlas-primary-color);
}

.atlas-detail-btn-secondary:hover {
	background: #f8f9fa;
}

.atlas-contact-form {
	margin-top: 32px;
	padding: 24px;
	background: #f8f9fa;
	border-radius: var(--atlas-border-radius);
}

.atlas-form-group {
	margin-bottom: 20px;
}

.atlas-form-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #333;
	margin-bottom: 8px;
}

.atlas-form-input,
.atlas-form-textarea,
.atlas-form-select {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #dee2e6;
	border-radius: var(--atlas-border-radius);
	font-size: 14px;
	font-family: inherit;
	transition: all 0.3s ease;
}

.atlas-form-input:focus,
.atlas-form-textarea:focus,
.atlas-form-select:focus {
	outline: none;
	border-color: var(--atlas-primary-color);
	box-shadow: 0 0 0 3px rgba(0, 90, 78, 0.1);
}

.atlas-form-textarea {
	min-height: 120px;
	resize: vertical;
}

.atlas-form-submit {
	width: 100%;
	padding: 14px 24px;
	background: var(--atlas-primary-color);
	color: white;
	border: none;
	border-radius: var(--atlas-border-radius);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.atlas-form-submit:hover {
	background: var(--atlas-hover-color);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 90, 78, 0.3);
}

.atlas-form-submit:disabled {
	background: #ccc;
	cursor: not-allowed;
	transform: none;
}

@media (max-width: 768px) {
	.atlas-detail-modal {
		max-width: 100%;
	}
	
	.atlas-detail-header,
	.atlas-detail-content {
		padding: 20px;
	}
	
	.atlas-detail-grid {
		grid-template-columns: 1fr;
	}
	
	.atlas-detail-actions {
		flex-direction: column;
	}

	.atlas-building-header {
		font-size: 20px;
		line-height: 30px;
		padding: 10px 10px;
	}
	.atlas-building-header .atlas-accordion-icon{
		font-size: 12px;
	}
}

