:root {
  --bg-color: #f8f9fa;
  --text-color: #212529;
  --text-color: black;
  --card-bg: #fff;
}
[data-bs-theme=dark] {
  --bg-color: #121212;
  --text-color: #f1f1f1;
  --card-bg: #1e1e1e;
}
[data-bs-theme=dark] 
:is(.btn-outline-dark, 
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-other
) {
    --bs-btn-color: #fff;
}

[data-bs-theme=dark] .btn-dark {
    --bs-btn-color: #000;
    --bs-btn-bg: #f8f9fa;
}

[data-bs-theme=dark] .btn-outline-dark {
    --bs-btn-color: #f8f9fa;
    --bs-btn-border-color: #f8f9fa;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #f8f9fa;
    --bs-btn-hover-border-color: #f8f9fa;
}
html, body, iframe {
  touch-action: manipulation;
}
body {
  background: var(--bg-color);
  color: var(--text-color);
  transition: 0.3s;
}
.card {
  background-color: var(--card-bg);
  color: var(--text-color);
}

.avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;cursor:pointer;}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
.post-img {
    max-height: 500px;
    object-fit: contain;
    border-radius: 10px;
    margin: auto;
    display: block;
	width: 100%;
	user-drag: none; /* For Safari */
	-webkit-user-drag: none; /* For Chrome, Safari, Opera */
	user-select: none; /* Optional: prevents selection highlight */
	pointer-events: auto;
}
/*#themeToggle{position:absolute;top:10px;right:10px;z-index:1000;}*/

.delete-comment-btn {
  padding: 6px 6px;
  line-height: 1;
  border-radius: 6px;
  font-size: 14px;
}
.delete-comment-btn:hover {
  transform: scale(1.1);
}
input, textarea, select {
  font-size: 16px !important;
}
.comment-avatar {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}
.comment-user {
  text-decoration: none;
  color: var(--text-color);
}
.comment-user:hover {
  text-decoration: underline;
  opacity: 0.8;
}
.post-user {
  color: var(--text-color);
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}
.post-user:hover {
  text-decoration: underline;
  opacity: 0.8;
}
.post-user:hover .post-count {
  text-decoration: none;
}
#backHomeBtn {
  display: block;
  margin: 10px auto;
}
.post-content {
    position: relative;
    max-height: 9rem;
    overflow: hidden;
    transition: max-height 0.3s ease;
    line-height: 1.4;
	white-space: pre-line; /* preserves newlines */
}

.post-content.expanded {
  max-height: none;
}

.see-toggle {
  display: inline-block;
  cursor: pointer;
  font-weight: 500;
  margin-top: 5px;
  font-size: 0.7rem;
  margin-bottom: 5px;
}

.like-btn{
	cursor:pointer;color:#dc3545;
	color: var(--text-color);
}
.like-btn.liked{
	color:#e63946;
	font-weight:bold;
	color:black;
}
@media (hover: none) {
  /* fixing ios after click */
  .see-toggle:hover,
  .btn:hover {
    background-color: inherit !important;
    color: inherit !important;
    box-shadow: none !important;
  }
  .like-btn.liked:hover {
	background-color: var(--bs-btn-bg) !important;
  }
}
.post-count {
	border-width: 2px;
	color: var(--text-color);
    border-color: darkslategrey;
    border-style: dashed;
    margin-left: 10px;
	margin-top: -3px;
}
#userLabel {
	margin: 0;
}
.comment-box:not(:last-child) {
  position: relative;
  padding-bottom: 4px; /* space for underline */
}

.comment-box:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 7%;
    width: 80%;
    height: 1px;
    background: currentColor;
    opacity: 0.2;
}
.logo {
	    height: 60px;
    margin: auto;
    display: block;
    border-radius: 10%;
	margin-bottom: 20px;
	margin-top: 20px;
}
footer {
    margin-bottom: 150px;
}

#postsWrapper {
  position: relative;
  overflow: hidden; /* за да не мърда съдържанието извън рамките */
  perspective: 1000px;
}

#postsContainer {
  transform-origin: center bottom; /* 🎯 върти се около долния ръб */
  transition: transform 0.3s ease;
  will-change: transform;
}

#postsContainer, #postForm {
	max-width: 800px;
    margin: auto;
}