/* ===============================
   頭像尺寸統一樣式
   =============================== */

.avatar-xs {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-md {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
	margin-left: 10px;
    margin-right: 10px;
}

.avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-xl {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===============================
   聊天訊息格式（泡泡排版）
   =============================== */

.msg {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    width: 100%;
	margin-top: 10px;
}

.msg.left {
    justify-content: flex-start;
}

.msg.right {
    justify-content: flex-end;
}

.bubble {
    background: #f0f0f0;
    border-radius: 12px;
    padding: 10px 14px;
    max-width: 80%;
    width: fit-content;
    word-break: break-word;
    line-height: 1.6;
}

.msg.right .bubble {
    background: #e0e0e0;
}

/* ===============================
   上方固定的會員頭像欄位
   =============================== */

.head img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

/* ===============================
   圖片預覽（未來上傳時用）
   =============================== */

.avatar-preview {
	border-radius: 6px;
    object-fit: cover;
    display: inline-block;
    width: 80px;
    height: 80px;
    margin-top: 1em;
}
.avatar-profile {
    max-height: 300px;
    width: auto;
    border-radius: 8px;
    object-fit: cover;
}
.chat-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.chat-item:hover {
    background-color: #f0f0f0;
}

.chat-item .avatar-md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    flex-shrink: 0;
}

.chat-item .meta {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.chat-item .meta strong {
    font-size: 16px;
    margin-bottom: 4px;
}

.chat-item .meta small {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.chat-item > small:last-child {
    color: #999;
    font-size: 12px;
    margin-left: 10px;
}
.member-sidebar {
  position: absolute;
  top: 10px;
  right: 10px;
  text-align: right;
  z-index: 999;
}
.member-sidebar .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  vertical-align: middle;
}
.member-sidebar .username {
  margin-left: 5px;
  font-weight: bold;
}
.member-sidebar .member-links a {
  display: inline-block;
  margin: 3px 2px;
}
.region-selector {
    clear: both; /* 添加這行以確保不受浮動元素影響 */
}
.function-bar {
    margin: 1em 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8em;
}
.function-bar .button {
    flex: 1 1 30%;
    min-width: 120px;
    text-align: center;
}
/* assets/css/create.css */
.create-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: start;
}
.create-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: start;
}

.create-button {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  border-radius: 0.5rem;
}

.team-info h1 {
    font-size: 1.5em;
    margin-bottom: 1em;
}
/* 共用：建立功能大按鈕橫排區塊 */
.create-buttons-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.button-xl {
  width: 320px;
  font-size: 1.6rem;
  border-radius: 8px;
  text-align: center;
}
.suggest-box {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    z-index: 99;
    width: 300px;
    display: none;
}
.achievement-card {
	flex: 1 1 calc(25% - 1em);
    box-sizing: border-box;
    width: 240px;
    border: 2px solid #aaa;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.achievement-rank {
  font-weight: bold;
  font-size: 24px;
  padding: 10px;
  margin-right: 15px;
  border-radius: 6px;
  color: #fff;
  min-width: 50px;
  text-align: center;
}

.rank-a { background-color: #d9534f; border-left-color: #d9534f; } /* 紅：最高 */
.rank-b { background-color: #f0ad4e; border-left-color: #f0ad4e; }
.rank-c { background-color: #5bc0de; border-left-color: #5bc0de; }
.rank-d { background-color: #5cb85c; border-left-color: #5cb85c; }
.rank-e { background-color: #999;     border-left-color: #999; }
.rank-1 { background-color: #ffcc00; border-left-color: #ffcc00; }
.rank-2 { background-color: #aaa;     border-left-color: #aaa; }
.rank-3 { background-color: #cd7f32;  border-left-color: #cd7f32; }

.achievement-title {
  margin: 0;
  font-size: 18px;
}

.achievement-description {
  font-size: 14px;
  color: #333;
  margin: 6px 0;
}

.achievement-time {
  font-size: 12px;
  color: #777;
}
.achievement-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
}


/* 平板與手機斷點：兩欄 */
@media (max-width: 768px) {
    .achievement-card {
        flex: 1 1 calc(50% - 1em);
    }
}

.edit_finished{
	color: #000;
    background: #ffcc00;
    line-height: 3em;
    margin: 1em;
    padding-left: 1em;
    font-weight: bold;
    font-size: 1em;
	}
.avatar{
	object-fit: cover;
    border-radius: 50%;
    width: 40px;
    aspect-ratio: 1 / 1;
    border: 1px solid #eee;
    vertical-align: middle;
	}