/* KDF - ankety v príspevkoch (ako WhatsApp). Okno "Hlasy" používa .kdf-modal z kdf-social.css. */

/* ==========================================================================
   1) EDITOR ANKETY VO FORMULÁRI PRÍSPEVKU
   ========================================================================== */
/* Téma (style.css) dáva všetkým #buddypress button bielu farbu s !important, oranžový hover a posun -
   tlačidlá ankety sú textové, preto to tu vraciame. */
body #buddypress .kdf-pe button:hover, body #buddypress .kdf-poll button:hover { transform: none; }
body #buddypress .kdf-poll-pick, body #buddypress .kdf-pe-add, body #buddypress .kdf-pe-toggle { justify-content: flex-start; } /* Betheme centruje obsah tlačidiel */
body #buddypress .kdf-pe-toggle, body #buddypress .kdf-pe-remove, body #buddypress .kdf-pe-del { color: var(--kdf-muted, #65676b) !important; }
body #buddypress .kdf-pe-add, body #buddypress .kdf-poll-all, body #buddypress .kdf-pe-toggle:hover { color: #0097b2 !important; }
body #buddypress .kdf-poll-pick { color: var(--kdf-text, #1b1d1f) !important; }
body #buddypress .kdf-poll-count { color: var(--kdf-muted, #65676b) !important; }
body #buddypress .kdf-pe-remove:hover, body #buddypress .kdf-pe-add:hover, body #buddypress .kdf-poll-pick:hover, body #buddypress .kdf-poll-all:hover { background: none; }

.kdf-pe { margin: 8px 0 4px; }
#buddypress .kdf-pe button { box-shadow: none; }
#buddypress .kdf-pe-toggle {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 6px 12px; min-height: 0; margin: 0;
	border: 1px solid #e5e9ea; border-radius: 18px;
	background: #fff; color: var(--kdf-muted, #65676b);
	font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer;
}
#buddypress .kdf-pe-toggle:hover { background: #f0fafa; color: #0097b2; border-color: #0097b2; }
.kdf-pe-toggle .dashicons { color: #0097b2; font-size: 18px; width: 18px; height: 18px; }

.kdf-pe-box { padding: 12px; border: 1px solid #e5e9ea; border-radius: 12px; background: #f6f8f9; }
.kdf-pe-box[hidden], .kdf-pe-toggle[hidden], .kdf-pe-del[hidden], .kdf-pe-add[hidden] { display: none !important; }
.kdf-pe-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kdf-pe-head strong { font-size: 15px; color: var(--kdf-dark, #1b1d1f); }
#buddypress .kdf-pe-remove { padding: 0; margin: 0; min-height: 0; border: 0; background: none; color: var(--kdf-muted, #65676b); font-size: 13px; text-decoration: underline; cursor: pointer; }

#buddypress .kdf-pe input[type="text"] {
	width: 100%; box-sizing: border-box; margin: 0;
	padding: 9px 12px; border: 1px solid #d8dde0; border-radius: 10px;
	background: #fff; font-size: 16px; line-height: 1.3;
}
#buddypress .kdf-pe input[type="text"]:focus { border-color: #0097b2; outline: none; box-shadow: 0 0 0 2px rgba(0, 151, 178, .2); }
#buddypress .kdf-pe .kdf-pe-q { font-weight: 600; margin-bottom: 8px; }

.kdf-pe-opts { list-style: none; margin: 0 0 6px !important; padding: 0 !important; }
.kdf-pe-opt { display: flex; align-items: center; gap: 6px; margin: 0 0 6px !important; }
#buddypress .kdf-pe-del {
	flex: 0 0 34px; width: 34px; height: 34px; padding: 0; margin: 0; min-height: 0;
	border: 0; border-radius: 50%; background: transparent; color: var(--kdf-muted, #65676b); cursor: pointer;
}
#buddypress .kdf-pe-del:hover { background: #e5e9ea; }
#buddypress .kdf-pe-add {
	display: inline-flex; align-items: center; gap: 4px; padding: 4px 0; margin: 0 0 8px; min-height: 0;
	border: 0; background: none; color: #0097b2; font-weight: 600; font-size: 14px; cursor: pointer;
}
.kdf-pe-check { display: flex; align-items: center; gap: 6px; margin: 2px 0; font-size: 14px; color: var(--kdf-text, #1b1d1f); cursor: pointer; }

/* ==========================================================================
   2) ANKETA V PRÍSPEVKU
   ========================================================================== */
.kdf-poll {
	margin: 10px 0 4px; padding: 12px 14px;
	border: 1px solid #e5e9ea; border-radius: 14px; background: #fff;
	font-size: 15px;
}
.kdf-poll.is-busy { opacity: .6; pointer-events: none; }
.kdf-poll .kdf-poll-q { margin: 0 0 4px !important; font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--kdf-dark, #1b1d1f); }
.kdf-poll .kdf-poll-hint { display: flex; align-items: center; gap: 4px; margin: 0 0 10px !important; font-size: 13px; color: var(--kdf-muted, #65676b); }
.kdf-poll-hint .dashicons { font-size: 16px; width: 16px; height: 16px; color: #0097b2; }

.kdf-poll-opts { list-style: none; margin: 0 !important; padding: 0 !important; }
.kdf-poll-opt {
	position: relative; display: flex; align-items: center; gap: 8px;
	margin: 0 0 12px !important; padding: 0 0 8px !important;
}
#buddypress .kdf-poll-pick {
	flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
	padding: 4px 0; margin: 0; min-height: 0; border: 0; background: none; box-shadow: none;
	color: var(--kdf-text, #1b1d1f); font: inherit; text-align: left; cursor: pointer;
}
#buddypress .kdf-poll-pick:disabled { cursor: default; }
.kdf-poll-check {
	flex: 0 0 22px; width: 22px; height: 22px; box-sizing: border-box;
	border: 2px solid #b8c1c4; border-radius: 50%; transition: background .15s, border-color .15s;
}
.kdf-poll.is-multi .kdf-poll-check { border-radius: 6px; }
.kdf-poll-opt.is-mine .kdf-poll-check {
	border-color: #0097b2;
	background: #0097b2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.kdf-poll-label { overflow-wrap: anywhere; line-height: 1.35; }

#buddypress .kdf-poll-count {
	display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
	padding: 2px 4px; margin: 0; min-height: 0; border: 0; border-radius: 12px; background: none; box-shadow: none;
	color: var(--kdf-muted, #65676b); font-size: 14px; font-weight: 600; cursor: pointer;
}
#buddypress .kdf-poll-count:hover { background: #f0f2f5; }
.kdf-poll-avs { display: inline-flex; }
.kdf-poll-avs img { width: 22px !important; height: 22px !important; margin: 0 0 0 -7px !important; border: 2px solid #fff; border-radius: 50%; }
.kdf-poll-avs img:first-child { margin-left: 0 !important; }

/* lišta s pomerom pod možnosťou */
.kdf-poll-bar {
	position: absolute; left: 32px; right: 0; bottom: 0; height: 6px;
	border-radius: 3px; background: #e9eef0; overflow: hidden;
}
.kdf-poll-bar::after {
	content: ""; position: absolute; inset: 0 auto 0 0; width: var(--kdf-poll-p, 0%);
	border-radius: 3px; background: #0097b2; transition: width .35s ease;
}
.kdf-poll:not(.has-results) .kdf-poll-bar { display: none; }
.kdf-poll:not(.has-results) .kdf-poll-opt { padding-bottom: 0 !important; margin-bottom: 6px !important; }

#buddypress .kdf-poll-all {
	display: block; width: 100%; margin: 4px 0 0; padding: 10px 0 2px; min-height: 0;
	border: 0; border-top: 1px solid #eef1f2; border-radius: 0; background: none; box-shadow: none;
	color: #0097b2; font-size: 14px; font-weight: 600; text-align: center; cursor: pointer;
}

/* ==========================================================================
   3) OKNO "HLASY"
   ========================================================================== */
.kdf-poll-modal .kdf-poll-modal-q { margin: 0 0 14px !important; font-weight: 700; font-size: 17px; color: var(--kdf-dark, #1b1d1f); }
.kdf-poll-sec { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #f6f8f9; scroll-margin-top: 8px; }
.kdf-poll-sec.is-focus { box-shadow: inset 0 0 0 2px #0097b2; }
.kdf-poll-sec-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.kdf-poll-sec-head strong { overflow-wrap: anywhere; }
.kdf-poll-sec-head span { flex: 0 0 auto; color: var(--kdf-muted, #65676b); font-size: 14px; }
.kdf-poll-people { list-style: none; margin: 0 !important; padding: 0 !important; }
.kdf-poll-people li { margin: 0 !important; }
.kdf-poll-people a { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: inherit !important; text-decoration: none !important; }
.kdf-poll-people img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.kdf-poll-person { display: flex; flex-direction: column; min-width: 0; }
.kdf-poll-person small { color: var(--kdf-muted, #65676b); font-size: 12px; }
.kdf-poll-none, .kdf-poll-loading { margin: 0 !important; color: var(--kdf-muted, #65676b); font-size: 14px; }
