/* KTC shapes: buttons, borders and rounding only, layered on top of every theme's own colours and fonts.
   Pages load this right after the theme (control/head_load.php and the call pages), with the ?v= version
   like every other stylesheet. Selectors carry an extra `html` so they win over the theme's own rules.
   A theme with different button colours sets the --ktc-* variables below on its own :root; these defaults
   use :where(:root), which counts for nothing, so the theme's values win even though this loads later. */
:where(:root) {
	--ktc-edge-theme: #027fa0;
	--ktc-edge-default: #1c1c1c;
	--ktc-edge-ok: #4d7a12;
	--ktc-edge-warn: #b37400;
	--ktc-edge-delete: #7a0000;
	--ktc-edge-login: #7d2a78;
	--ktc-drop: 0 4px 8px rgba(0, 0, 0, 0.35);
	--ktc-border: #333333;   /* border colour; themes with their own border tint override it */
	--ktc-focus: #03add8;    /* input border while focused */
}

/* ── Buttons: sticker style, a bottom edge that collapses on press ── */
html .theme_btn, html .default_btn, html .defaultd_btn, html .ok_btn, html .warn_btn, html .delete_btn {
	border-radius: 12px;
	cursor: pointer;
	transition: transform .08s, box-shadow .08s, filter .15s;
}
html .theme_btn:hover, html .default_btn:hover, html .defaultd_btn:hover, html .ok_btn:hover, html .warn_btn:hover, html .delete_btn:hover { filter: brightness(1.1); }
html .theme_btn:active, html .default_btn:active, html .defaultd_btn:active, html .ok_btn:active, html .warn_btn:active, html .delete_btn:active, html body #loginControls .theme_btn:active, html body .modal_in .theme_btn:active { transform: translateY(3px); box-shadow: none; }
/* a solid edge one shade darker than each button colour, plus the soft drop shadow */
/* the KTC gradient is for buttons: this is where it lives outside the casino */
html .theme_btn { background: linear-gradient(135deg, #fc00ff, #7a5cff 50%, #00dbde); color: #ffffff; text-shadow: 0 1px 0 #14061f; box-shadow: 0 3px 0 #14061f, var(--ktc-drop); }
html .default_btn, html .defaultd_btn { box-shadow: 0 3px 0 var(--ktc-edge-default), var(--ktc-drop); }
html .ok_btn { box-shadow: 0 3px 0 var(--ktc-edge-ok), var(--ktc-drop); }
html .warn_btn { box-shadow: 0 3px 0 var(--ktc-edge-warn), var(--ktc-drop); }
html .delete_btn { box-shadow: 0 3px 0 var(--ktc-edge-delete), var(--ktc-drop); }
/* the login page paints its buttons purple in an inline style */
html body #loginControls .theme_btn, html body .modal_in .theme_btn { box-shadow: 0 3px 0 var(--ktc-edge-login), var(--ktc-drop); }
/* a button that can't be pressed yet (the shop's Buy when you're short) looks it: greyed, flat, no press */
html body :is(.theme_btn, .default_btn, .defaultd_btn, .ok_btn, .warn_btn, .delete_btn):disabled { filter: grayscale(0.85) brightness(0.7); box-shadow: none; transform: none; cursor: not-allowed; }
/* tiny inline buttons stay flat; an edge on an 18px button reads as a glitch */
html .macro_button, html .micro_button, html .count_button { box-shadow: none !important; }
html .large_button, html .small_button, html .reg_button, html .mod_button, html .modr_button, html .button, html .tbutton, html .tiny_button, html .thin_button, html .card_button { border-radius: 12px; }
html .large_button_rounded, html .small_button_rounded, html .rounded_button { border-radius: 999px; }

/* ── Borders and rounding: inputs ── */
html input, html textarea, html .post_input_container, html .full_input, html .full_textarea { border: 1px solid var(--ktc-border) !important; border-radius: 12px; }
html input:focus, html textarea:focus, html .full_input:focus, html .full_textarea:focus { border-color: var(--ktc-focus) !important; }
html input[type="checkbox"], html input[type="radio"] { border-radius: 4px; }
html .selectboxit-btn, html .selectboxit-list { border: 1px solid var(--ktc-border); border-radius: 12px; }
html .selectboxit-options { border-radius: 12px; }

/* ── Borders and rounding: floating surfaces ── */
html .float_menu { border: 1px solid var(--ktc-border); border-radius: 12px; }
/* No overflow: hidden here: it cut off dropdown lists (SelectBoxIt draws them inside the
   modal). The corners stay round without it: the modal's own background follows the radius,
   and the pieces that reach an edge, like the profile header (.modal_wrap_top), round
   themselves in main.css. */
html .modal_in { border: 1px solid var(--ktc-border); border-radius: 20px; }
html body #loginControls { border: 1px solid var(--ktc-border); border-radius: 20px; }
html .bbackb { border-radius: 12px; }

/* ── Rounding: everything else ── */
html .tab_menu ul li { border-radius: 8px; }
html .pag_btn { border-radius: 8px; }
html .gtag, html .plikes, html .bprogress { border-radius: 999px; }
html .mbubble { border-radius: 16px; border-top-left-radius: 4px; }
html .target_private, html .hunter_private, html .hunt_quote, html .targ_quote { border-radius: 16px; }
html .cquote { border-radius: 8px; }
html .topic_log, html .my_notice, html .system_text { border-radius: 12px; }
html .modal_close, html .cancel_modal { border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
html .theme_btn, html .default_btn, html .defaultd_btn, html .ok_btn, html .warn_btn, html .delete_btn { transition: none; }
}
/* ── A video in chat or a private message: a frame from it with a play button (uploadProcess() in
   system/ktc/function_all.php). The frame sets the size and the picture fills it, so the button stays
   centred and inside the picture whatever the video's shape: a tall phone video, a wide one, or the
   small copy in a reply. Messages from before keep their old markup (.video-thumb) and are drawn the
   same way. With no picture (it couldn't be made) the frame keeps a 16:9 shape ── */
html :is(.ktc_vthumb, .video-thumb) { --vt-h: 100px; position: relative; display: inline-block; height: var(--vt-h); min-width: calc(var(--vt-h) * .8); max-width: 100%; margin-top: 5px; overflow: hidden; border-radius: 10px; background: #000; line-height: 0; vertical-align: top; cursor: pointer; }
html .private_logs :is(.ktc_vthumb, .video-thumb) { --vt-h: 70px; }
html .cqmess :is(.ktc_vthumb, .video-thumb) { --vt-h: 50px; margin-top: 3px; }
html .ktc_vthumb img.ktc_vthumb_img, html .video-thumb img.chat_image { display: block; width: auto; min-width: 100%; max-width: 100%; height: 100%; margin: 0; border-radius: 0; object-fit: cover; }
html .ktc_vthumb.is_blank { width: calc(var(--vt-h) * 16 / 9); }
html :is(.ktc_vthumb_play, .video-thumb .play-button-circle) {
	position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center;
	width: min(calc(var(--vt-h) * .44), 46%); aspect-ratio: 1; box-sizing: border-box; transform: translate(-50%, -50%);
	border: 2px solid rgba(255, 255, 255, .85); border-radius: 50%; background: rgba(20, 6, 31, .72); color: #ffffff;
	font-size: calc(var(--vt-h) * .16); line-height: 1; pointer-events: none; transition: transform .15s ease-out, background-color .15s ease-out;
}
/* the play triangle sits a little right of centre, where the eye expects it */
html .ktc_vthumb_play i { transform: translateX(8%); }
html .video-thumb .play-triangle { display: none; }
html .video-thumb .play-button-circle::before { content: "\f04b"; font-family: "Font Awesome 6 Free"; font-weight: 900; transform: translateX(8%); }
@media (hover: hover) and (pointer: fine) {
	html :is(.ktc_vthumb, .video-thumb):hover :is(.ktc_vthumb_play, .play-button-circle) { transform: translate(-50%, -50%) scale(1.08); background: rgba(20, 6, 31, .85); }
}
@media (prefers-reduced-motion: reduce) {
	html :is(.ktc_vthumb_play, .video-thumb .play-button-circle) { transition: none; }
}
