/* =====================================================================
   Cairoflow Working Hours — public styles (v3 — week-strip layout)
   ===================================================================== */

.cfwh-grid {
	--cfwh-accent:      #eab308;          /* gold */
	--cfwh-accent-2:    #f59e0b;
	--cfwh-accent-soft: #fef3c7;
	--cfwh-accent-ink:  #b45309;
	--cfwh-ink:         #1f2937;
	--cfwh-muted:       #94a3b8;
	--cfwh-faint:       #cbd5e1;
	--cfwh-line:        #c4cad1;
	display: grid;
	gap: 50px;
	direction: rtl;
	margin: 28px 0;
	font-family: "Cairo", "Tajawal", -apple-system, "Segoe UI", Tahoma, sans-serif;
}
.cfwh-cols-1 { grid-template-columns: 1fr; }
.cfwh-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cfwh-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cfwh-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 880px) {
	.cfwh-grid { grid-template-columns: 1fr !important; }
}

/* ------------------- Shared week-days card (above) ----------------- */
.cfwh-week-card {
	--cfwh-accent: #eab308;
	--cfwh-ink:    #1f2937;
	--cfwh-muted:  #94a3b8;
	--cfwh-faint:  #cbd5e1;
	--cfwh-line:   #c4cad1;
	direction: rtl;
	font-family: "Cairo", "Tajawal", -apple-system, "Segoe UI", Tahoma, sans-serif;
	background: #fff;
	border: 1px solid var(--cfwh-line);
	border-right: 0;
	border-left: 0;
	padding: 0;
	margin: 0 0 80px;
}

/* "يوم عمل / يوم اجازة" label under each day */
.cfwh-dlabel {
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	margin-top: 5px;
	color: var(--cfwh-faint);
}
.cfwh-day.is-work .cfwh-dlabel { color: var(--cfwh-accent); }
.cfwh-day.is-today .cfwh-dlabel { color: #fff; }

/* Holiday day in the strip */
.cfwh-day.is-holiday .cfwh-dname,
.cfwh-day.is-holiday .cfwh-dnum,
.cfwh-day.is-holiday .cfwh-dlabel { color: #2563eb; }
.cfwh-day.is-holiday.is-today {
	background: #2563eb;
	box-shadow: 0 8px 18px rgba(37, 99, 235, .32);
}
.cfwh-day.is-holiday.is-today::after { border-bottom-color: #fff; }
.cfwh-day.is-holiday.is-today .cfwh-dname,
.cfwh-day.is-holiday.is-today .cfwh-dnum,
.cfwh-day.is-holiday.is-today .cfwh-dlabel { color: #fff; }

/* Holiday status badge on cards */
.cfwh-card.is-holiday .cfwh-status {
	background: #dbeafe;
	color: #1d4ed8;
}
.cfwh-card.is-holiday .cfwh-dot { color: #1d4ed8; }

/* ----------------------------- Filter ------------------------------ */
.cfwh-filter {
	direction: rtl;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
    margin-top: 6px;
	font-family: "Cairo", "Tajawal", -apple-system, "Segoe UI", Tahoma, sans-serif;
}
.cfwh-filter-select {
	flex: 1 1 200px;
	min-width: 160px;
	padding: 12px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: #fff;
	color: #1f2937;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.cfwh-filter-select:focus {
	outline: none;
	border-color: #16a34a;
	box-shadow: 0 0 0 3px rgba(22, 163, 74, .15);
}

/* ------------------------------ Card ------------------------------- */
.cfwh-card {
	background: #fff;
	border: 1px solid var(--cfwh-line);
	border-radius: 18px;
	padding: 24px 26px;
	box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
	transition: box-shadow .28s ease, transform .28s ease;
}
.cfwh-card:hover {
	box-shadow: 0 16px 40px rgba(15, 23, 42, .11);
	transform: translateY(-4px);
}

/* ------------------------------ Top row ---------------------------- */
.cfwh-top {
	display: flex;
	flex-direction: column-reverse;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 18px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--cfwh-line);
	text-align: center;
}
.cfwh-titles { min-width: 0; }
.cfwh-title {
	margin: 0;
	font-size: 19px;
	font-weight: 800;
	color: var(--cfwh-ink);
	line-height: 1.4;
}
h3.cfwh-title {
	margin-bottom: 0 !important;
}
.cfwh-subtitle {
	margin: 0;
	margin-top: 1px;
	font-size: 13px;
	font-weight: 800;
	color: #626262;
	background-color: beige;
	border-radius: 5px;
	padding-right: 10px;
	padding-left: 10px;
}

.cfwh-flags {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 9px;
	margin-top: 10px;
}
.cfwh-flag.fi {
	width: 32px;
	height: 24px;
	line-height: 24px;
	border-radius: 4px;
	box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
}

/* ----------------------- Hours row + status ------------------------ */
.cfwh-hours {
	display: flex;
	align-items: center;
	gap: 11px;
	margin-bottom: 22px;
}
.cfwh-clock {
	font-size: 26px;
	width: 26px;
	height: 26px;
	color: var(--cfwh-ink);
	flex: 0 0 auto;
}
.cfwh-hours-text {
	font-size: 18px;
	font-weight: 700;
	color: var(--cfwh-ink);
	line-height: 1.3;
	flex: 1 1 auto;
}

.cfwh-status {
	display: block;
	margin-top: -50px;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .3px;
	white-space: nowrap;
	flex: 0 0 auto;
}
.cfwh-card.is-open .cfwh-status {
	background: #8ac506;
	color: #fff;
	box-shadow: 0 6px 14px rgba(23, 171, 78, .28);
}
.cfwh-card.is-closed .cfwh-status {
	background: #f1f5f9;
	color: #94a3b8;
}

/* Pulsing clock icon inside the badge */
.cfwh-dot {
	flex: 0 0 auto;
	display: inline-block;
	vertical-align: middle;
	margin-inline-end: 20px;
	font-size: 31px;
	width: 17px;
	height: 17px;
	line-height: 13px;
}
.cfwh-card.is-open .cfwh-dot {
	color: #fff;
	animation: cfwh-pulse 1.2s ease-in-out infinite;
}
.cfwh-card.is-closed .cfwh-dot { color: #94a3b8; }

@keyframes cfwh-pulse {
	0%, 100% { transform: scale(1);    opacity: 1; }
	50%      { transform: scale(1.22); opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
	.cfwh-card.is-open .cfwh-dot { animation: none; }
}

/* --------------------------- Week strip ---------------------------- */
.cfwh-week {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	align-items: start;
}
.cfwh-day {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 8px 2px;
	border-radius: 4px;
}
.cfwh-dname {
	font-size: 12px;
	font-weight: 700;
	color: var(--cfwh-faint);       /* off day */
	line-height: 1;
}
.cfwh-dnum {
	font-size: 26px;
	font-weight: 700;
	color: var(--cfwh-faint);
	line-height: 1;
}
/* Working days */
.cfwh-day.is-work .cfwh-dname { color: var(--cfwh-accent); }
.cfwh-day.is-work .cfwh-dnum  { color: var(--cfwh-muted); }

/* Today — highlighted tab with a downward notch */
.cfwh-day.is-today {
	position: relative;
	background: var(--cfwh-accent);
	padding: 28px 0px 28px;
	margin: -20px 0;
	box-shadow: 0 8px 18px rgba(234, 179, 8, .32);
}
.cfwh-day.is-today::after {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	border-inline: 8px solid transparent;
	border-top: 8px solid #fff;
}
.cfwh-day.is-today .cfwh-dname,
.cfwh-day.is-today .cfwh-dnum { color: #fff; }

/* ----------------------------- Note -------------------------------- */
.cfwh-note {
	display: none;
	margin: 22px 0 0;
	font-size: 14px;
	font-weight: 500;
	color: #1aac4f;
	line-height: 1.6;
	text-align: center;
}
.cfwh-card.is-open .cfwh-note { display: block; }

/* --------------------------- WhatsApp ------------------------------ */
.cfwh-wa {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	margin: 22px auto 0;
	width: max-content;
	max-width: 100%;
	box-sizing: border-box;
	background: linear-gradient(135deg, #25d366, #15a34a);
	color: #fff !important;
	text-decoration: none;
	padding: 13px 34px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 15px;
	box-shadow: 0 8px 18px rgba(37, 211, 102, .28);
	transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.cfwh-wa:hover {
	transform: translateY(-2px);
	filter: brightness(1.04);
	box-shadow: 0 12px 26px rgba(37, 211, 102, .38);
}
.cfwh-wa:active { transform: translateY(0); }
.cfwh-wa .dashicons {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* ----------------- Offline message (shown when closed) ------------- */
.cfwh-offline-msg {
	display: none;
	margin: 16px 0 0;
	padding: 12px 16px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 12px;
	color: #b91c1c;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
	text-align: center;
}
.cfwh-card.is-closed .cfwh-offline-msg {
	display: block;
	font-size: 12px;
	background-color: unset;
	border: none;
	color: #5f5f5f;
	padding: unset;
	border-top: 0.5px solid #e0e0e0;
	border-radius: unset;
	padding-top: 10px;
}

@media (max-width: 480px) {
	.cfwh-card { padding: 20px; }
	.cfwh-hours { flex-wrap: wrap; }
	.cfwh-hours-text { font-size: 16px; }
}

/* ===================== Header contacts list ======================= */
.cfwh-contacts {
	direction: rtl;
	text-align: center;
	font-family: "Cairo", "Tajawal", -apple-system, "Segoe UI", Tahoma, sans-serif;
	margin: 0 auto;
}
/* Multi-column layouts */
.cfwh-contacts--cols2,
.cfwh-contacts--cols3,
.cfwh-contacts--cols4 {
	display: grid;
	gap: 0 28px;
	align-items: start;
}
.cfwh-contacts--cols2 { grid-template-columns: repeat(2, 1fr); }
.cfwh-contacts--cols3 { grid-template-columns: repeat(3, 1fr); }
.cfwh-contacts--cols4 { grid-template-columns: repeat(4, 1fr); }
.cfwh-contacts[class*="--cols"] .cfwh-contacts-head,
.cfwh-contacts[class*="--cols"] .cfwh-contacts-intro { grid-column: 1 / -1; }
@media (max-width: 680px) {
	.cfwh-contacts--cols2,
	.cfwh-contacts--cols3,
	.cfwh-contacts--cols4 { grid-template-columns: 1fr; }
}
p.cfwh-contacts-intro {
    margin-bottom: 11px !important;
    background-color: #033868;
    margin-top: -19px;
    padding-bottom: 6px;
    padding-top: 4px;
    width: 100%;
}
.cfwh-contacts-intro {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 600;
	text-align: right;
	padding-right: 12px;
}
/* Title row + "official hours" button */
.cfwh-contacts-head {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.cfwh-wh-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	text-decoration: none;
	font-size: 13px;
	font-weight: 700;
	padding: 5px 13px;
	border-radius: 0px;
	background: #27d366;
	color: #fff !important;
	transition: filter .2s ease;
	margin-top: -32px;
	position: absolute;
	left: 0;
}
.cfwh-wh-btn:hover { filter: brightness(1.06); }
.cfwh-wh-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }
.cfwh-contact {
	display: block;
	text-decoration: none;
	padding: 4px 10px 0 0;
	text-align: right;
	border-bottom: 1px solid rgba(148, 163, 184, .25);
	transition: background-color .2s ease, border-color .2s ease;
}
.cfwh-contact:last-child { border-bottom: 0; }

/* Hover — dark theme */
.cfwh-contacts--dark .cfwh-contact:hover {
	background-color: hsl(0deg 0% 0% / 12%);
	border-right: 8px solid #27d366;
	margin-right: -8px;
}
.cfwh-contacts--dark .cfwh-contact:hover .cfwh-contact-num { color: #fff; }
/* Hover — light theme */
.cfwh-contacts--light .cfwh-contact:hover {
	background-color: rgba(15, 23, 42, .04);
	border-right: 8px solid #27d366;
	margin-right: -8px;
}

/* Status icon before each department — gray (offline) / pulsing green (online) */
.cfwh-online-dot {
	display: inline-block;
	color: #94a3b8;
	font-size: 17px;
	width: 17px;
	height: 17px;
	line-height: 17px;
	vertical-align: middle;
	margin-inline-end: 0;
	transform: scaleX(-1);
}
.cfwh-contact.is-online .cfwh-online-dot {
	color: #27d366;
}
@keyframes cfwh-online-pulse {
	0%, 100% { transform: scaleX(-1) scale(1);    opacity: 1; }
	50%      { transform: scaleX(-1) scale(1.25); opacity: .5; }
}
@media (prefers-reduced-motion: reduce) {
	.cfwh-online-dot { animation: none; }
}
.cfwh-contact-name {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	align-items: center;
	gap: 6px;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.5;
	color: #e0a93f;
}
.cfwh-contact-sub {
	display: block;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.5;
	margin-top: 0;
	width: fit-content;
}
.cfwh-contact-num {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
	font-size: 15px;
	font-weight: 600;
	direction: rtl;
}
.cfwh-contact-digits { unicode-bidi: plaintext; }
.cfwh-contact-num .dashicons {
	color: #ffffff;
	font-size: 20px;
	width: 20px;
	height: 20px;
}

/* Dark background (light text) */
.cfwh-contacts--dark .cfwh-contacts-intro { color: #fff; }
.cfwh-contacts--dark .cfwh-contact-name { color: #ffb182; }
.cfwh-contacts--dark .cfwh-contact-sub { color: #e2e8f0; }
.cfwh-contacts--dark .cfwh-contact-num { color: #fff; }

/* White background (dark text) */
.cfwh-contacts--light .cfwh-contacts-intro { color: #1f2937; }
.cfwh-contacts--light .cfwh-contact-name { color: #b45309; }
.cfwh-contacts--light .cfwh-contact-sub { color: #626262; }
.cfwh-contacts--light .cfwh-contact-num { color: #1f2937; }

/* ===================== Floating departments widget ===================== */
.cfwh-float {
	position: fixed;
	bottom: 22px;
	z-index: 99999;
	direction: rtl;
	font-family: "Cairo", "Tajawal", -apple-system, "Segoe UI", Tahoma, sans-serif;
}
.cfwh-float--right { right: 22px; }
.cfwh-float--left  { left: 22px; }

/* Toggle — white pill when closed */
.cfwh-float-toggle {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: #fff;
	color: #1f2937;
	border: 0;
	cursor: pointer;
	padding: 8px 14px 8px 0px;
	border-radius: 50px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
	height: 0;
}
.cfwh-float-toggle-text { white-space: nowrap; transition: opacity .2s ease; }
.cfwh-float-circle {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: #27d366;
	display: inline-grid;
	place-items: center;
	flex: 0 0 auto;
	box-shadow: 0 4px 12px rgba(39, 211, 102, .45);
}
.cfwh-float-circle .dashicons {
	grid-area: 1 / 1;
	color: #fff;
	font-size: 30px;
	width: 30px;
	height: 30px;
	transition: transform .25s ease, opacity .2s ease;
}
.cfwh-float-circle .dashicons-no-alt { opacity: 0; transform: rotate(-90deg); }

/* Open state — pill collapses to just the green circle showing ✕ */
.cfwh-float.is-open .cfwh-float-toggle {
	background: transparent;
	box-shadow: none;
	padding: 0;
}
.cfwh-float.is-open .cfwh-float-toggle-text {
	opacity: 0;
	width: 0;
	overflow: hidden;
}
.cfwh-float.is-open .cfwh-float-circle .dashicons-whatsapp { opacity: 0; transform: rotate(90deg); }
.cfwh-float.is-open .cfwh-float-circle .dashicons-no-alt { opacity: 1; transform: rotate(0); }

/* Panel — animated open/close */
.cfwh-float-panel {
	position: absolute;
	bottom: 72px;
	width: 370px;
	max-width: calc(100vw - 44px);
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 20px 55px rgba(0, 0, 0, .28);
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 100px);
	opacity: 0;
	visibility: hidden;
	transform: translateY(16px) scale(.96);
	transform-origin: bottom center;
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.cfwh-float.is-open .cfwh-float-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}
.cfwh-float--right .cfwh-float-panel { right: 0; transform-origin: bottom right; }
.cfwh-float--left  .cfwh-float-panel { left: 0; transform-origin: bottom left; }

.cfwh-float-head {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #4caf50;
	color: #fff;
	padding: 8px 16px;
}
.cfwh-float-head-icon { font-size: 30px; width: 30px; height: 30px; flex: 0 0 auto; }
.cfwh-float-head-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cfwh-float-head-txt strong { font-size: 17px; font-weight: 800; color: #fff; }
.cfwh-float-head-txt span { font-size: 12px; opacity: .92; }
.cfwh-float-close {
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 40px;
	line-height: 1;
	cursor: pointer;
	flex: 0 0 auto;
}
.cfwh-float-noterow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 18px 4px;
}
.cfwh-float-note { margin: 0; color: #94a3b8; font-size: 13px; flex: 1; }
.cfwh-float-hours {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	flex: 0 0 auto;
	background: #eafaf0;
	color: #1e8e4e;
	text-decoration: none;
	font-size: 12px;
	font-weight: 700;
	padding: 5px 10px;
	border-radius: 6px;
	white-space: nowrap;
}
.cfwh-float-hours .dashicons { font-size: 15px; width: 15px; height: 15px; }

.cfwh-float-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 14px 14px; }
.cfwh-float-item {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	background: #f6f7f9;
	border-radius: 12px;
	padding: 10px 12px;
	margin-bottom: 10px;
	border-inline-start: 4px solid #4caf50;
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .35s ease, transform .35s ease, background-color .2s ease;
}
.cfwh-float-item:hover { background: #eef0f3; }
/* Staggered reveal when the panel opens */
.cfwh-float.is-open .cfwh-float-item { opacity: 1; transform: translateY(0); }
.cfwh-float.is-open .cfwh-float-item:nth-child(1)  { transition-delay: .05s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(2)  { transition-delay: .10s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(3)  { transition-delay: .15s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(4)  { transition-delay: .20s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(5)  { transition-delay: .25s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(6)  { transition-delay: .30s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(7)  { transition-delay: .35s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(8)  { transition-delay: .40s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(9)  { transition-delay: .45s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(10) { transition-delay: .50s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(11) { transition-delay: .55s; }
.cfwh-float.is-open .cfwh-float-item:nth-child(n+12) { transition-delay: .60s; }
@media (prefers-reduced-motion: reduce) {
	.cfwh-float-item { opacity: 1; transform: none; transition: background-color .2s ease; }
}
.cfwh-float-icon {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #94a3b8;
	color: #fff;
	display: inline-grid;
	place-items: center;
	font-size: 24px;
	flex: 0 0 auto;
	transition: background-color .25s ease;
}
.cfwh-float-item.is-online .cfwh-float-icon { background: #27d366; }
.cfwh-float-info { flex: 1; min-width: 0; text-align: right; }
.cfwh-float-name { display: block; font-weight: 800; font-size: 15px; color: #1f2937; line-height: 1.4; }
.cfwh-float-desc { display: block; font-size: 12px; color: #94a3b8; line-height: 1.4; }
.cfwh-float-wa { color: #27d366; font-size: 24px; width: 24px; height: 24px; flex: 0 0 auto; }

@media (max-width: 480px) {
	.cfwh-float-toggle-text { font-size: 14px; }
}
/* Keep the footer clear of the floating button on mobile */
@media (max-width: 768px) {
	.dima-footer { padding-bottom: 91px !important; }
}
