/* ==========================================================================
   Theme tokens for the public GUI.
   Driven by the `dc-gui.theme` property -> body class `theme-default` /
   `theme-memorial` (see GlobalControllerAdvice + fragments/layout.html).

   DEFAULT  : original light slate look.
   MEMORIAL : warm dark gold/sepia memorial look.

   Components consume these variables only — do not hard-code colors in
   component stylesheets so a new theme is just a new token block.
   ========================================================================== */

/* ---- DEFAULT (light slate) --------------------------------------------- */

:root,
body.theme-default {
	/* navbar */
	--nav-bg: rgba(45, 52, 54, 0.95);
	--nav-text: #ffffff;
	--nav-text-hover: #6C757D;
	--nav-active: #aab5bf;
	--nav-brand: #ffffff;
	--nav-border: transparent;
	--nav-dropdown-bg: #ffffff;
	--nav-dropdown-text: #2D3436;
	--nav-dropdown-hover-bg: #f1f3f4;
	--nav-dropdown-border: rgba(0, 0, 0, 0.12);

	/* generic modals (contact + Kontakt i pomoć) */
	--modal-bg: #f7f7f7;
	--modal-surface: #ffffff;
	--modal-text: #2D3436;
	--modal-muted: #6c757d;
	--modal-border: #dee2e6;
	--modal-link: #0a58ca;

	/* shared "outline-dc" button */
	--btn-dc-bg: #6C7A89;
	--btn-dc-text: #ffffff;
	--btn-dc-border: transparent;
	--btn-dc-hover-bg: #BDC3C7;
	--btn-dc-hover-text: #2D3436;

	/* grave details panel */
	--gd-bg: rgba(247, 247, 247, 0.97);
	--gd-bg-2: #ffffff;
	--gd-surface: #ffffff;
	--gd-surface-hover: #eef1f3;
	--gd-border: #e2e6ea;
	--gd-border-strong: #c3cbd1;
	--gd-gold: #5f6f7a;
	--gd-gold-soft: #46555f;
	--gd-gold-muted: #8a949c;
	--gd-text: #2D3436;
	--gd-text-muted: #6c757d;
	--gd-serif: 'Open Sans', sans-serif;
	--gd-title-color: #2D3436;
	--gd-name-color: #2D3436;
	--gd-image-bg: #eef1f3;
	--gd-footer-bg: #f0f2f4;
	--gd-scroll-thumb: rgba(108, 122, 137, 0.4);
	--gd-panel-shadow: -18px 0 48px rgba(0, 0, 0, 0.18);
	--gd-btn-primary-bg: #6C7A89;
	--gd-btn-primary-text: #ffffff;
	--gd-btn-primary-border: #6C7A89;
	--gd-btn-primary-hover-bg: #5a6671;
	--gd-btn-primary-hover-text: #ffffff;
}

/* ---- MEMORIAL (dark gold) ---------------------------------------------- */

body.theme-memorial {
	/* navbar */
	--nav-bg: rgba(21, 19, 15, 0.96);
	--nav-text: #e8e4dc;
	--nav-text-hover: #c9a86a;
	--nav-active: #c9a86a;
	--nav-brand: #c9a86a;
	--nav-border: rgba(201, 168, 106, 0.22);
	--nav-dropdown-bg: #1c1915;
	--nav-dropdown-text: #e8e4dc;
	--nav-dropdown-hover-bg: rgba(201, 168, 106, 0.12);
	--nav-dropdown-border: rgba(201, 168, 106, 0.2);

	/* generic modals */
	--modal-bg: #1a1712;
	--modal-surface: rgba(255, 255, 255, 0.035);
	--modal-text: #e8e4dc;
	--modal-muted: #8d877b;
	--modal-border: rgba(201, 168, 106, 0.18);
	--modal-link: #d9bd86;

	/* shared "outline-dc" button */
	--btn-dc-bg: rgba(201, 168, 106, 0.07);
	--btn-dc-text: #d9bd86;
	--btn-dc-border: rgba(201, 168, 106, 0.42);
	--btn-dc-hover-bg: rgba(201, 168, 106, 0.16);
	--btn-dc-hover-text: #ffffff;

	/* grave details panel */
	--gd-bg: #15130f;
	--gd-bg-2: #1c1915;
	--gd-surface: rgba(255, 255, 255, 0.035);
	--gd-surface-hover: rgba(201, 168, 106, 0.08);
	--gd-border: rgba(201, 168, 106, 0.18);
	--gd-border-strong: rgba(201, 168, 106, 0.42);
	--gd-gold: #c9a86a;
	--gd-gold-soft: #d9bd86;
	--gd-gold-muted: #9c875b;
	--gd-text: #e8e4dc;
	--gd-text-muted: #8d877b;
	--gd-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--gd-title-color: #ffffff;
	--gd-name-color: #ffffff;
	--gd-image-bg: rgba(255, 255, 255, 0.035);
	--gd-footer-bg: rgba(0, 0, 0, 0.25);
	--gd-scroll-thumb: rgba(201, 168, 106, 0.28);
	--gd-panel-shadow: -18px 0 48px rgba(0, 0, 0, 0.55);
	--gd-btn-primary-bg: rgba(201, 168, 106, 0.07);
	--gd-btn-primary-text: #d9bd86;
	--gd-btn-primary-border: rgba(201, 168, 106, 0.42);
	--gd-btn-primary-hover-bg: rgba(201, 168, 106, 0.16);
	--gd-btn-primary-hover-text: #ffffff;
}

/* ---- MEMORIAL component refinements ------------------------------------ */
/* Tweaks that can't be expressed purely through the shared tokens above.    */

body.theme-memorial {
	background: #15130f;
}

body.theme-memorial .navbar {
	border-bottom: 1px solid var(--nav-border);
}

body.theme-memorial .navbar-brand {
	font-family: 'Playfair Display', Georgia, serif;
	letter-spacing: 0.02em;
}

body.theme-memorial .navbar-brand .text-muted {
	color: var(--gd-gold-muted) !important;
}

/* Search + logout buttons -> gold outline */
body.theme-memorial .navbar .btn-outline-info,
body.theme-memorial .navbar .btn-outline-light {
	color: var(--gd-gold-soft);
	border-color: var(--gd-border-strong);
	background: transparent;
}

body.theme-memorial .navbar .btn-outline-info:hover,
body.theme-memorial .navbar .btn-outline-light:hover {
	color: #ffffff;
	border-color: var(--gd-gold);
	background: rgba(201, 168, 106, 0.16);
}

body.theme-memorial .navbar .form-control {
	color: var(--gd-text);
	background: rgba(255, 255, 255, 0.04);
	border-color: var(--gd-border);
}

body.theme-memorial .navbar .form-control::placeholder {
	color: var(--gd-text-muted);
}

/* Modal close icon + dividers */
body.theme-memorial .modal-content .close {
	color: var(--gd-gold) !important;
	text-shadow: none;
	opacity: 0.9;
}

body.theme-memorial .modal-content hr {
	border-color: var(--modal-border);
	background-color: var(--modal-border) !important;
}

/* Contact form fields inside dark modals */
body.theme-memorial .modal-content .form-control {
	color: var(--gd-text);
	background: rgba(255, 255, 255, 0.04);
	border-color: var(--modal-border);
}

body.theme-memorial .modal-content .form-control:focus {
	color: var(--gd-text);
	background: rgba(255, 255, 255, 0.06);
	border-color: var(--gd-border-strong);
	box-shadow: 0 0 0 0.2rem rgba(201, 168, 106, 0.18);
}

body.theme-memorial .modal-content .form-control::placeholder {
	color: var(--gd-text-muted);
}

body.theme-memorial .modal-content .col-form-label,
body.theme-memorial .modal-content label {
	color: var(--gd-text);
}

body.theme-memorial .modal-content a {
	color: var(--modal-link);
}
