@import '/css/reset.css';
@import '/css/base.css';
@import '/css/utils.css';


@import '/css/index.css';
@import '/css/register.css';
@import '/css/forget.css';
@import '/css/time.css';
@import '/css/news.css';

/* news_detail page overrides */
.newsCenter{
	width: 100%;
	max-width: 980px; /* 控制中欄最大寬度 */
	display: flex;
	flex-direction: column;
	align-items: center; /* 讓整體仍置中 */
}
.newsCenter #newsTitle{ width: 100%; text-align: center; }
.newsCenter #newsBody{ width: 100%; }
.newsCenter #newsImages{ width: 100%; }
/* 讓特定區塊在置中容器內靠左 */
.newsCenter .leftAligned{ align-self: flex-start; width: 100%; }

/* 多附件圖示（簡化版） */
.file-icon{ display:inline-block; width:18px; height:18px; vertical-align:-3px; margin-right:6px; }
.file-icon.pdf{ background:#E11D48; mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"/></svg>') no-repeat center/contain; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"/></svg>') no-repeat center/contain; }
.file-icon.word{ background:#2563EB; mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"/></svg>') no-repeat center/contain; -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"/></svg>') no-repeat center/contain; }
.file-icon.excel{ background:#16a34a; mask:inherit; -webkit-mask:inherit; }
.file-icon.ppt{ background:#ea580c; mask:inherit; -webkit-mask:inherit; }
.file-icon.image{ background:#64748b; mask:inherit; -webkit-mask:inherit; }
.file-icon.file{ background:#6b7280; mask:inherit; -webkit-mask:inherit; }

/* Lightbox */
#lightboxOverlay{ position:fixed; inset:0; background:rgba(0,0,0,.85); display:none; align-items:center; justify-content:center; z-index:10000; }
#lightboxOverlay .lb-content{ position:relative; width:90%; max-width:960px; height:80%; display:flex; align-items:center; justify-content:center; }
#lightboxOverlay .lb-img{ max-width:100%; max-height:100%; box-shadow:0 12px 40px rgba(0,0,0,.5); border-radius:8px; }
#lightboxOverlay .lb-prev, #lightboxOverlay .lb-next, #lightboxOverlay .lb-close{ position:absolute; background:rgba(0,0,0,.4); color:#fff; border:none; width:44px; height:44px; border-radius:22px; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:24px; }
#lightboxOverlay .lb-prev{ left:8px; }
#lightboxOverlay .lb-next{ right:8px; }
#lightboxOverlay .lb-close{ top:8px; right:8px; font-size:28px; }

/* Back to Top */
#backToTop{ position:fixed; right:16px; bottom:16px; width:44px; height:44px; border-radius:22px; background:var(--primary-700); color:#fff; display:none; align-items:center; justify-content:center; cursor:pointer; box-shadow:0 6px 16px rgba(0,0,0,.25); z-index:9999; }
#backToTop:hover{ background:var(--primary-900); }
/* === textarea 自適應與 RWD for time_add content field === */
textarea#content.textarea-auto {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
  padding: 12px 14px;
}
@media (max-width: 767px) {
  textarea#content.textarea-auto {
    min-height: 140px; /* 手機給多一點高度方便輸入 */
    font-size: 14px;
  }
  #contentHint { font-size: 12px; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  textarea#content.textarea-auto { min-height: 130px; }
}
@media (min-width: 1200px) {
  textarea#content.textarea-auto { max-width: 640px; }
}
/* subtle placeholder color to avoid confusion with filled text */
input.keyin_default::placeholder,
textarea.keyin_default::placeholder{ color: rgba(0,0,0,0.35); }
input.keyin_default:focus::placeholder,
textarea.keyin_default:focus::placeholder{ color: rgba(0,0,0,0.25); }
/* WebKit */
input.keyin_default::-webkit-input-placeholder,
textarea.keyin_default::-webkit-input-placeholder{ color: rgba(0,0,0,0.35); }
/* Firefox */
input.keyin_default::-moz-placeholder,
textarea.keyin_default::-moz-placeholder{ color: rgba(0,0,0,0.35); opacity:1; }
/* IE/Edge */
input.keyin_default:-ms-input-placeholder,
textarea.keyin_default:-ms-input-placeholder{ color: rgba(0,0,0,0.35); }
input.keyin_default::-ms-input-placeholder,
textarea.keyin_default::-ms-input-placeholder{ color: rgba(0,0,0,0.35); }