/* Tierra Nava Community – front-end styles. Built on the theme's Bootstrap 5 variables. */

.tno-account, .tno-chat, .tno-directory, .tno-store-page, .tno-register, .tno-login {
	--tno-brand: var(--bs-primary, #744d2a);
	--tno-brand-rgb: var(--bs-primary-rgb, 116, 77, 42);
	--tno-accent: var(--cst-accent, #fb9119);
	--tno-accent-text: #a85a08;
	--tno-green: #cddc05;
	--tno-cream: #fbf6ee;
	--tno-line: var(--bs-border-color, #ede3d5);
	--tno-radius: 14px;
	--tno-shadow: 0 6px 24px rgba(46, 31, 18, .07);
}

/* ---------- Cards, forms, notices ---------- */

.tno-card { background: #fff; border-radius: var(--tno-radius, 14px); box-shadow: var(--tno-shadow, 0 6px 24px rgba(46,31,18,.07)); padding: 1.75rem; color: var(--bs-body-color); }
.tno-alert { border-radius: 10px; }
.tno-form .form-label { font-weight: 600; }
.tno-form .form-control, .tno-form .form-select { border-color: var(--tno-line, #ede3d5); }
.tno-form .form-control:focus, .tno-form .form-select:focus { border-color: var(--tno-accent, #fb9119); box-shadow: 0 0 0 .2rem rgba(251, 145, 25, .25); }
.tno-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tno-gate { max-width: 560px; margin: 0 auto; }
.tno-login form p { margin-bottom: 1rem; }
.tno-login label { display: block; font-weight: 600; margin-bottom: .35rem; }
.tno-login input[type="text"], .tno-login input[type="password"] { display: block; width: 100%; padding: .55rem .75rem; border: 1px solid var(--tno-line, #ede3d5); border-radius: var(--bs-border-radius, 8px); }
.tno-login .login-remember label { display: inline; font-weight: 400; }
.tno-login input[type="submit"] { background: var(--tno-brand, #744d2a); color: #fff; border: 0; border-radius: var(--bs-border-radius, 6px); padding: .6rem 1.5rem; font-weight: 600; text-transform: uppercase; }
.tno-details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.tno-details > summary::after { content: "\f282"; font-family: "bootstrap-icons"; transition: transform .2s; }
.tno-details[open] > summary::after { transform: rotate(180deg); }
.tno-list .list-group-item { background: transparent; }

/* ---------- Avatars ---------- */

.tno-avatar { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; font-weight: 700; font-size: .95rem; color: #fff; background: linear-gradient(135deg, var(--tno-brand, #744d2a), var(--tno-accent, #fb9119)); }
.tno-avatar.is-official { background: linear-gradient(135deg, #6b7a10, var(--tno-green, #cddc05)); font-size: 1.15rem; }
.tno-avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.tno-avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; box-shadow: 0 0 0 4px rgba(205, 220, 5, .35); }

/* ---------- Account ---------- */

.tno-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--tno-line, #ede3d5); }
.tno-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--bs-heading-color, #2e1f12); background: var(--tno-cream, #fbf6ee); }
.tno-tab:hover { color: var(--tno-accent-text, #a85a08); }
.tno-tab.is-active { background: var(--tno-brand, #744d2a); color: #fff; }
.tno-tab-logout { margin-left: auto; background: transparent; color: var(--bs-secondary-color, #807972); }
.tno-link-card { color: var(--bs-body-color); transition: transform .2s, box-shadow .2s; }
.tno-link-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(46, 31, 18, .12); color: var(--bs-body-color); }
.tno-link-card strong { color: var(--bs-heading-color, #2e1f12); }
.tno-link-card-icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: rgba(251, 145, 25, .12); color: var(--tno-accent-text, #a85a08); font-size: 1.3rem; }

/* ---------- Marketplace ---------- */

.tno-chip { display: inline-block; align-self: flex-start; padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--tno-accent-text, #a85a08); background: rgba(251, 145, 25, .12); }
.tno-chip-float { position: absolute; top: .75rem; left: .75rem; background: rgba(255, 255, 255, .92); }
.tno-store-card-media, .tno-listing-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, rgba(205, 220, 5, .22), rgba(251, 145, 25, .18)); display: flex; align-items: center; justify-content: center; }
.tno-store-card-media img, .tno-listing-media img { width: 100%; height: 100%; object-fit: cover; }
.tno-initials { font-family: var(--cst-heading-font, inherit); font-size: 2.6rem; font-weight: 700; color: var(--tno-brand, #744d2a); }
.tno-img-ph { font-size: 2.5rem; color: var(--tno-brand, #744d2a); opacity: .7; }
.tno-store-logo { width: 72px; height: 72px; border-radius: 16px; overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(205, 220, 5, .25), rgba(251, 145, 25, .2)); }
.tno-store-logo img { width: 100%; height: 100%; object-fit: cover; }
.tno-store-logo .tno-initials { font-size: 1.6rem; }
.tno-store-logo-lg { width: 140px; height: 140px; border-radius: 20px; }
.tno-store-logo-lg .tno-initials { font-size: 3rem; }
.tno-thumb-sm { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: var(--tno-cream, #fbf6ee); }
.tno-thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.tno-thumb-sm .tno-img-ph { font-size: 1.3rem; }
.tno-facts li { display: inline-flex; align-items: center; gap: .4rem; margin: 0 1.25rem .4rem 0; font-size: .95rem; }
.tno-facts .bi { color: var(--tno-accent-text, #a85a08); }
.tno-price { font-weight: 800; color: var(--tno-brand, #744d2a); font-size: 1.05rem; }
.tno-price-ask { font-weight: 600; font-size: .95rem; color: var(--tno-accent-text, #a85a08); }
.tno-price-note { font-size: .85rem; color: var(--bs-secondary-color, #807972); }
.tno-listing-card.is-sold-out .tno-listing-media img { filter: grayscale(.8); opacity: .7; }
.tno-soldout { position: absolute; top: .75rem; right: .75rem; padding: .2rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; color: #fff; background: rgba(46, 31, 18, .8); }
.tno-empty { padding: 3rem 1.5rem; }
.tno-empty > .bi { display: block; font-size: 2.5rem; color: var(--tno-accent, #fb9119); margin-bottom: .75rem; }
.tno-filter .form-control, .tno-filter .form-select { padding: .7rem 1rem; }

/* ---------- Chat ---------- */

.tno-chat { position: relative; }
.tno-chat-loading { padding: 3rem; text-align: center; color: var(--bs-secondary-color); }
.tno-chat-flash { position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 5; min-width: 260px; max-width: 90%; box-shadow: var(--tno-shadow); }
.tno-chat-shell { display: grid; grid-template-columns: 320px 1fr; height: min(78vh, 760px); min-height: 480px; background: #fff; border-radius: var(--tno-radius, 14px); box-shadow: var(--tno-shadow); overflow: hidden; border: 1px solid var(--tno-line, #ede3d5); }
.tno-chat-side { display: flex; flex-direction: column; border-right: 1px solid var(--tno-line, #ede3d5); background: var(--tno-cream, #fbf6ee); min-height: 0; }
.tno-chat-side-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem 1rem .75rem; border-bottom: 1px solid var(--tno-line, #ede3d5); }
.tno-chat-list { overflow-y: auto; flex: 1 1 auto; padding: .5rem; }
.tno-chat-list-empty { padding: 1.5rem 1rem; text-align: center; }
.tno-chat-item { display: flex; align-items: center; gap: .75rem; width: 100%; padding: .65rem .75rem; border: 0; border-radius: 12px; background: transparent; text-align: left; color: inherit; }
.tno-chat-item:hover { background: rgba(var(--tno-brand-rgb, 116, 77, 42), .07); }
.tno-chat-item.is-active { background: #fff; box-shadow: 0 2px 10px rgba(46, 31, 18, .08); }
.tno-chat-item-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.tno-chat-item-name { font-weight: 700; color: var(--bs-heading-color, #2e1f12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tno-chat-item-last { font-size: .85rem; color: var(--bs-secondary-color, #807972); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tno-unread { background: var(--tno-accent, #fb9119); color: #2e1f12; }
.tno-chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tno-chat-head { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--tno-line, #ede3d5); }
.tno-chat-head .min-w-0 { min-width: 0; }
.tno-chat-back { display: none; font-size: 1.2rem; color: var(--tno-brand, #744d2a); }
.tno-chat-sub { font-size: .8rem; color: var(--bs-secondary-color, #807972); text-decoration: none; }
.tno-chat-pane { padding: 1.5rem; overflow-y: auto; flex: 1 1 auto; }
.tno-chat-welcome { margin: auto; padding: 2rem; text-align: center; color: var(--bs-secondary-color, #807972); }
.tno-chat-welcome > .bi { display: block; font-size: 2.5rem; color: var(--tno-accent, #fb9119); margin-bottom: .75rem; }
.tno-group-card { height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--tno-line, #ede3d5); border-radius: 12px; }
.tno-chat-msgs { flex: 1 1 auto; overflow-y: auto; padding: 1rem 1.25rem; background: linear-gradient(180deg, #fff, var(--tno-cream, #fbf6ee)); display: flex; flex-direction: column; }
.tno-chat-msgs > :first-child { margin-top: auto; }
.tno-day { align-self: center; margin: 1rem 0 .5rem; padding: .15rem .75rem; font-size: .75rem; font-weight: 700; color: var(--bs-secondary-color, #807972); background: #fff; border: 1px solid var(--tno-line, #ede3d5); border-radius: 999px; }
.tno-msg { display: flex; align-items: flex-end; gap: .5rem; max-width: 78%; margin-top: .75rem; }
.tno-msg.is-grouped { margin-top: .2rem; }
.tno-msg.is-grouped .tno-avatar { visibility: hidden; }
.tno-msg.is-mine { align-self: flex-end; flex-direction: row-reverse; }
.tno-msg-body { display: flex; flex-direction: column; min-width: 0; }
.tno-msg.is-mine .tno-msg-body { align-items: flex-end; }
.tno-msg-meta { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: var(--bs-secondary-color, #807972); margin: 0 .25rem .2rem; }
.tno-msg-meta strong { color: var(--bs-heading-color, #2e1f12); }
.tno-msg-del { border: 0; background: none; padding: 0; color: inherit; opacity: 0; transition: opacity .15s; }
.tno-msg:hover .tno-msg-del, .tno-msg-del:focus { opacity: 1; }
.tno-bubble { padding: .55rem .9rem; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid var(--tno-line, #ede3d5); white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; line-height: 1.45; }
.tno-msg.is-mine .tno-bubble { background: var(--tno-brand, #744d2a); border-color: var(--tno-brand, #744d2a); color: #fff; border-radius: 16px 16px 4px 16px; }
.tno-msg.is-mine .tno-bubble a { color: #ffe2bd; }
.tno-bubble.is-deleted { background: transparent !important; color: var(--bs-secondary-color, #807972) !important; border-style: dashed !important; border-color: var(--tno-line, #ede3d5) !important; }
.tno-chat-compose { display: flex; align-items: flex-end; gap: .5rem; padding: .75rem 1rem; border-top: 1px solid var(--tno-line, #ede3d5); background: #fff; }
.tno-chat-compose textarea { resize: none; max-height: 140px; border-radius: 20px; padding: .55rem 1rem; }
.tno-chat-compose .btn { border-radius: 50%; width: 42px; height: 42px; padding: 0; flex: 0 0 auto; }

@media (max-width: 767.98px) {
	.tno-chat-shell { grid-template-columns: 1fr; height: 75vh; }
	.tno-chat-main { display: none; }
	.tno-chat-shell.is-thread .tno-chat-side { display: none; }
	.tno-chat-shell.is-thread .tno-chat-main { display: flex; }
	.tno-chat-back { display: inline-flex; }
	.tno-msg { max-width: 92%; }
	.tno-card { padding: 1.25rem; }
	.tno-tab-logout { margin-left: 0; }
}
