/**
 * Frontend Styles für Öffnungszeiten & Standorte
 * Modernes, ansprechendes Flat-Design mit HSL-Unterstützung und Animationen.
 */

.ot-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #2d3748;
	max-width: 550px;
	margin: 1.5rem 0;
	box-sizing: border-box;
}

.ot-wrap *, .ot-wrap *::before, .ot-wrap *::after {
	box-sizing: inherit;
}

.ot-error {
	color: #e53e3e;
	background-color: #fff5f5;
	border: 1px solid #fed7d7;
	padding: 12px 15px;
	border-radius: 6px;
	font-size: 14px;
	margin: 1rem 0;
}

/* Ausnahme Badge */
.ot-exc-badge {
	display: inline-block;
	background-color: rgba(49, 130, 206, 0.1);
	color: #2b6cb0;
	font-size: 11px;
	padding: 2px 6px;
	border-radius: 4px;
	margin-left: 6px;
	vertical-align: middle;
	font-weight: 500;
	cursor: help;
}

/* Stacked Layout für die Stunden-Spalte (Übereinander) */
.ot-hours-stack {
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-align: right;
	align-items: flex-end;
	width: 100%;
}

.ot-stack-top {
	font-weight: 600;
}

.ot-stack-middle.ot-strike-hours del {
	color: #a0aec0;
	text-decoration: line-through;
	font-size: 0.9em;
}

.ot-stack-bottom {
	display: inline-block;
	background-color: rgba(49, 130, 206, 0.1);
	color: #2b6cb0;
	font-size: 11px;
	padding: 4px 8px;
	border-radius: 4px;
	font-weight: 500;
	margin-top: 4px;
	white-space: nowrap;
}


/* ==========================================================================
   1. Standard-Tabelle (table)
   ========================================================================== */

.ot-table-view {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	background-color: #fff;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.ot-table-frontend {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.ot-table-frontend tr {
	border-bottom: 1px solid #edf2f7;
	transition: background-color 0.2s ease;
}

.ot-table-frontend tr:last-child {
	border-bottom: none;
}

.ot-table-frontend td {
	padding: 14px 20px;
	vertical-align: top;
}

.ot-day-cell {
	width: 40%;
	text-align: left;
}

.ot-day-title {
	display: block;
	font-weight: 600;
	font-size: 14px;
	color: #4a5568;
}

.ot-day-date {
	display: block;
	font-size: 11px;
	color: #a0aec0;
	margin-top: 2px;
}

.ot-hours-cell {
	width: 60%;
	text-align: right;
	font-size: 14px;
	color: #2d3748;
	font-variant-numeric: tabular-nums;
}

/* Heute Geöffnet Highlight (Grün) */
.ot-table-frontend tr.ot-today.ot-today-open {
	background-color: rgba(46, 204, 113, 0.07);
	border-left: 4px solid var(--ot-primary, #2ecc71);
}

.ot-table-frontend tr.ot-today.ot-today-open .ot-day-title {
	color: #1e7e34;
	font-weight: 700;
}

.ot-table-frontend tr.ot-today.ot-today-open .ot-hours-cell {
	color: #1e7e34;
	font-weight: 700;
}

.ot-table-frontend tr.ot-today.ot-today-open .ot-day-date {
	color: #28a745;
	opacity: 0.8;
}

/* Heute Geschlossen Highlight (Rot) */
.ot-table-frontend tr.ot-today.ot-today-closed {
	background-color: rgba(231, 76, 60, 0.07);
	border-left: 4px solid #e74c3c;
}

.ot-table-frontend tr.ot-today.ot-today-closed .ot-day-title {
	color: #c82333;
	font-weight: 700;
}

.ot-table-frontend tr.ot-today.ot-today-closed .ot-hours-cell {
	color: #c82333;
	font-weight: 700;
}

.ot-table-frontend tr.ot-today.ot-today-closed .ot-day-date {
	color: #dc3545;
	opacity: 0.8;
}


/* ==========================================================================
   2. Kompakte Liste (compact)
   ========================================================================== */

.ot-compact-view {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	background-color: #fff;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.ot-compact-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ot-compact-list li {
	padding: 14px 20px;
	border-bottom: 1px solid #edf2f7;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin: 0;
	font-size: 14px;
	transition: background-color 0.2s ease;
}

.ot-compact-list li:last-child {
	border-bottom: none;
}

.ot-day-label {
	font-weight: 600;
	color: #4a5568;
}

.ot-hours-val {
	color: #2d3748;
	font-variant-numeric: tabular-nums;
}

/* Heute Geöffnet Highlight */
.ot-compact-list li.ot-today.ot-today-open {
	background-color: rgba(46, 204, 113, 0.07);
	border-left: 4px solid var(--ot-primary, #2ecc71);
}

.ot-compact-list li.ot-today.ot-today-open .ot-day-label,
.ot-compact-list li.ot-today.ot-today-open .ot-hours-val {
	color: #1e7e34;
	font-weight: 700;
}

/* Heute Geschlossen Highlight */
.ot-compact-list li.ot-today.ot-today-closed {
	background-color: rgba(231, 76, 60, 0.07);
	border-left: 4px solid #e74c3c;
}

.ot-compact-list li.ot-today.ot-today-closed .ot-day-label,
.ot-compact-list li.ot-today.ot-today-closed .ot-hours-val {
	color: #c82333;
	font-weight: 700;
}


/* ==========================================================================
   3. Status & Heute (status)
   ========================================================================== */

.ot-status-card {
	background-color: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 22px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ot-status-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

.ot-status-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #f7fafc;
	padding-bottom: 15px;
	margin-bottom: 15px;
}

.ot-location-title {
	font-weight: 700;
	font-size: 16px;
	color: #1a202c;
}

.ot-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
}

.ot-badge-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

/* Status: Geöffnet */
.ot-status-open .ot-status-badge {
	background-color: rgba(46, 204, 113, 0.12);
	color: #1e7e34;
}

.ot-status-open .ot-badge-dot {
	background-color: var(--ot-primary, #2ecc71);
	animation: otPulseGreen 2s infinite;
}

/* Status: Geschlossen */
.ot-status-closed .ot-status-badge {
	background-color: rgba(231, 76, 60, 0.12);
	color: #c82333;
}

.ot-status-closed .ot-badge-dot {
	background-color: #e74c3c;
	animation: otPulseRed 2s infinite;
}

/* Body / Heute Zeiten */
.ot-status-body {
	margin-top: 5px;
}

.ot-today-hours {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 14px;
}

.ot-today-label {
	font-weight: 600;
	color: #718096;
}

.ot-today-value {
	font-weight: 700;
	color: #2d3748;
}

/* Puls-Animationen */
@keyframes otPulseGreen {
	0% {
		box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
	}
	70% {
		box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
	}
}

@keyframes otPulseRed {
	0% {
		box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
	}
	70% {
		box-shadow: 0 0 0 6px rgba(231, 76, 60, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
	}
}
