/* Нощен режим на bungala.bg – зарежда се само когато телефонът/компютърът е в тъмен режим
   (<link media="(prefers-color-scheme: dark)"> в base.html). Пренаписва светлите цветове на Tailwind класовете.
   Всяко правило започва с „html “, за да е по-силно от класовете и от <style> в шаблоните. */
:root { --dk-bg: #0b1220; --dk-card: #111a2b; --dk-card2: #172236; --dk-line: #263247; --dk-text: #e5e7eb; --dk-muted: #9aa4b2; }

html, html body, html body.bg-cyan-50 { background: var(--dk-bg); color: var(--dk-text); }

/* фонове */
html .bg-white, html .card, html .btn-light, html .btn-outline, html .btn-danger { background-color: var(--dk-card); }
html .bg-white\/90, html .bg-white\/95 { background-color: rgba(17, 26, 43, .92); }
html .bg-gray-50 { background-color: #141e30; }
html .bg-gray-100, html .disabled\:bg-gray-100:disabled { background-color: var(--dk-card2); }
html .bg-cyan-50, html .hover\:bg-cyan-50:hover { background-color: #0c2a35; }
html .bg-orange-50 { background-color: #2a1a0e; }
html .bg-orange-100 { background-color: #3a2310; }
html .bg-red-50 { background-color: #2b1214; }
html .bg-green-50 { background-color: #0f2a1a; }
html .bg-amber-50 { background-color: #2a2210; }

/* текст */
html .text-gray-800 { color: var(--dk-text); }
html .text-gray-700, html .hover\:text-gray-700:hover { color: #d1d5db; }
html .text-gray-600, html .label { color: #b6bec9; }
html .text-gray-500 { color: var(--dk-muted); }
html .text-gray-400 { color: #7c8796; }
html .text-gray-300 { color: #5b6573; }
html .text-cyan-600, html .hover\:text-cyan-600:hover { color: #38d3f7; }
html .text-cyan-700 { color: #5fdcfa; }
html .text-orange-700 { color: #fdba74; }
html .text-red-600, html .text-red-700, html .field-error { color: #f87171; }
html .text-green-700, html .text-green-600 { color: #4ade80; }
html .peer:checked ~ .peer-checked\:text-white { color: #fff; }

/* рамки */
html .border-gray-200, html .btn-light, html .field { border-color: var(--dk-line); }
html .border-gray-100 { border-color: #1e293b; }
html .border-gray-300, html .hover\:border-gray-400:hover { border-color: #334155; }
html .border-cyan-100, html .border-cyan-200, html .border-cyan-300 { border-color: #155e75; }
html .border-orange-200, html .border-orange-300 { border-color: #5a3410; }
html .border-red-200, html .border-red-300 { border-color: #5c1d22; }
html .border-green-200 { border-color: #1f5132; }
html .border-amber-100, html .border-amber-200, html .border-amber-300 { border-color: #4a3a12; }
html .hover\:border-cyan-500:hover, html .peer:checked ~ .peer-checked\:border-cyan-500, html .border-cyan-500 { border-color: #00c2f2; }
html .peer:checked ~ .peer-checked\:bg-cyan-500 { background-color: #00c2f2; }

/* полета във формите */
html .field, html .fld input:not([type=checkbox]):not([type=radio]), html .fld select, html .fld textarea,
html input[type=text], html input[type=email], html input[type=url], html input[type=number], html input[type=date],
html input[type=password], html input[type=tel], html select, html textarea {
  background-color: var(--dk-card2); color: var(--dk-text); border-color: var(--dk-line);
}
html ::placeholder { color: #6b7686; }
/* търсачката: полетата са без фон и рамка, както на светло (само етикет и текст) */
html input.bg-transparent, html select.bg-transparent, html textarea.bg-transparent { background-color: transparent; border-color: transparent; }
html select.bg-transparent option { background-color: var(--dk-card); color: var(--dk-text); }
html .shadow-md, html .shadow-lg, html .shadow-2xl { --tw-shadow-color: rgba(0, 0, 0, .5); }

/* собствените елементи от шаблоните */
html .sh-box { background: var(--dk-card); color: var(--dk-text); }
html .sh-x { background: var(--dk-card2); color: var(--dk-text); }
html .sh-it { color: #d1d5db; }
html .rp-list { background: var(--dk-card); border-color: var(--dk-line); }
html .rp-it { background: var(--dk-card); color: var(--dk-text); }
html .rp-it:hover, html .rp-it.on { background: #0c2a35; }
html .af-tab { background: var(--dk-card); border-color: var(--dk-line); }
html .af-tab b { color: var(--dk-text); }
html .af-tab.on { background: #0c2a35; border-color: #00c2f2; }
html .dc-nav { background: var(--dk-card); border-color: var(--dk-line); color: var(--dk-text); }
html .dc-day { background: #0c2a35; color: #7dd3fc; }
html .dc-day.priced { background: #155e75; color: #e0f7ff; }
html .dc-day.off { background: #141e30; color: #4b5563; }
html #oc-grid .oc-d { background: var(--dk-card2); color: #6b7686; }
html #oc-grid .oc-d.on { background: #00c2f2; color: #fff; }
html #gp .gp-d.closed { background: #141e30; color: #4b5563; }
html #gp .gp-m { background: var(--dk-card); border-color: var(--dk-line); color: #d1d5db; }
html #gp .gp-m.on { background: #00c2f2; border-color: #00c2f2; color: #fff; }
html #price-cal .pc-d.nop { background: var(--dk-card2); }
html .article-body h2, html .article-body strong { color: var(--dk-text); }
