/* OpenNow Widget – Design v1.0.0.1
   Optimisé sidebar / footer, responsive, léger */

.opennow-widget {
	--opennow-green: #22c55e;
	--opennow-green-bg: #f0fdf4;
	--opennow-closed: #94a3b8;
	--opennow-closed-bg: #f8fafc;
	--opennow-text: #0f172a;
	--opennow-muted: #64748b;
	--opennow-radius: 10px;
	--opennow-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	font-family: var(--opennow-font);
	font-size: 14px;
	line-height: 1.4;
	color: var(--opennow-text);
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

.opennow-widget *,
.opennow-widget *::before,
.opennow-widget *::after {
	box-sizing: border-box;
}

/* ===== Style Carte (défaut) ===== */
.opennow-style-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: var(--opennow-radius);
	padding: 12px 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.opennow-style-card.opennow-open {
	background: var(--opennow-green-bg);
	border-color: #bbf7d0;
}

.opennow-style-card.opennow-closed {
	background: var(--opennow-closed-bg);
	border-color: #e2e8f0;
}

/* ===== Style Badge (plus compact) ===== */
.opennow-style-badge {
	background: transparent;
	border: none;
	padding: 6px 0;
	box-shadow: none;
}

.opennow-inner {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

/* Ligne statut */
.opennow-status-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.opennow-indicator {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex-shrink: 0;
}

.opennow-open .opennow-indicator {
	background: var(--opennow-green);
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.opennow-closed .opennow-indicator {
	background: var(--opennow-closed);
	box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}

.opennow-status-text {
	font-weight: 600;
	font-size: 14px;
	letter-spacing: -0.01em;
}

.opennow-open .opennow-status-text {
	color: #15803d;
}

.opennow-closed .opennow-status-text {
	color: #475569;
}

/* Détails (jusqu’à / réouvre) */
.opennow-detail {
	font-size: 13px;
	color: var(--opennow-muted);
	padding-left: 17px; /* aligné avec le texte après l’indicateur */
}

.opennow-timezone-label {
	display: inline;
	font-size: 12px;
	opacity: 0.85;
}

.opennow-visitor-time {
	font-size: 12px;
	color: var(--opennow-muted);
	padding-left: 17px;
	margin-top: 1px;
}

/* Nom du lieu (en tête) */
.opennow-location-name {
	font-size: 13px;
	color: var(--opennow-text);
	font-weight: 600;
	margin-bottom: 4px;
	letter-spacing: -0.01em;
}

/* ===== Responsive ===== */
@media (max-width: 400px) {
	.opennow-style-card {
		padding: 10px 12px;
	}
	.opennow-status-text {
		font-size: 13px;
	}
	.opennow-detail {
		font-size: 12px;
	}
}

/* Dark mode basique (si le thème le supporte) */
@media (prefers-color-scheme: dark) {
	.opennow-style-card {
		background: #1e293b;
		border-color: #334155;
		color: #f1f5f9;
	}
	.opennow-style-card.opennow-open {
		background: #14532d;
		border-color: #166534;
	}
	.opennow-style-card.opennow-closed {
		background: #1e293b;
		border-color: #334155;
	}
	.opennow-status-text {
		color: #f1f5f9;
	}
	.opennow-open .opennow-status-text {
		color: #86efac;
	}
	.opennow-detail,
	.opennow-location-name,
	.opennow-visitor-time {
		color: #94a3b8;
	}
}

/* ===== Horaires du jour ===== */
.opennow-today-hours {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	padding-left: 17px;
	margin-top: 6px;
	font-size: 12px;
	color: var(--opennow-muted);
}

.opennow-schedule-label {
	font-weight: 600;
	color: var(--opennow-text);
}

.opennow-schedule-label::after {
	content: " :";
}

/* ===== Horaires de la semaine ===== */
.opennow-week-hours {
	margin-top: 8px;
	padding-left: 17px;
	font-size: 12px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.opennow-week-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	color: var(--opennow-muted);
}

.opennow-week-day {
	font-weight: 500;
	min-width: 70px;
	color: var(--opennow-text);
}

.opennow-week-times {
	text-align: right;
}

/* ===== Contact ===== */
.opennow-contact {
	margin-top: 8px;
	padding-left: 17px;
	font-size: 12px;
}

.opennow-contact-title {
	font-weight: 600;
	color: var(--opennow-text);
	margin-bottom: 2px;
}

.opennow-contact-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.opennow-contact-icon {
	display: inline-block;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	opacity: 0.75;
}

.opennow-icon-phone {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.3 1.2.4 2.5.6 3.8.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1C10.6 21 3 13.4 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.6.6 3.8.1.4 0 .8-.3 1.1L6.6 10.8z'/%3E%3C/svg%3E");
}

.opennow-icon-email {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

.opennow-icon-postbox {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V8l8 5 8-5v10zm-8-7L4 6h16l-8 5z'/%3E%3C/svg%3E");
}

.opennow-contact-value {
	color: var(--opennow-muted);
	text-decoration: none;
}

a.opennow-contact-value:hover {
	color: var(--opennow-text);
	text-decoration: underline;
}

.opennow-contacts {
	margin-top: 8px;
	padding-left: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.opennow-contacts .opennow-contact-title {
	font-weight: 600;
	font-size: 12px;
	color: var(--opennow-text);
	margin-bottom: 2px;
}
.opennow-contacts .opennow-contact-row {
	padding-left: 0;
}
