/**
* contact-us.css
* 留言css
* 作者：莫哥
* 日期：2026/06/01 
* 版本：1.0.0
*/
.contact-us-page {
    padding-top: 90px !important;
    min-height: 100vh; 
}

.contact-us-page .page-title {
    font-size: 26px !important;
    font-weight: 700;
}

.contact-us-page .label-title {
    font-size: 18px !important;
    font-weight: 600;
}

.contact-us-page .label-title-qr {
    font-size: 16px !important;
    margin-bottom: 4px;
}

.contact-us-page .body-text {
    font-size: 14px !important;
    line-height: 1.8 !important;
    color: #333;
}

.contact-us-page .link-text {
    font-size: 12px !important;
}

.contact-us-page .form-label,
.contact-us-page .form-control,
.contact-us-page .btn {
    font-size: 14px !important;
}

.contact-us-page .meta-small {
    font-size: 10px !important;
}

/* =========================================
   ★ 水平表单样式
   ========================================= */
.contact-us-page .guestbook-form {
    /* 改为水平布局后，无需强制限制高度，防止出现多余滚动条 */
    padding: 20px !important;
}

.contact-us-page .col-form-label {
    font-weight: 500;
    color: #444;
}

.contact-us-page .guestbook-form .mb-3 {
    margin-bottom: 15px !important;
}

/* 留言输入框缩小高度，禁止拉伸 */
.contact-us-page #content {
    height: 100px;
    resize: none;
}

/* 滚动条美化（只针对留言列表面板） */
.contact-us-page .guestbook-module::-webkit-scrollbar {
    width: 5px;
}
.contact-us-page .guestbook-module::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.contact-us-page .guestbook-module::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* 左侧公司信息边框 */
.contact-us-page .contact-info {
    border-left: 4px solid #4A90D9;
}
.contact-us-page .contact-info p {
    margin-bottom: 0.5rem;
}
.contact-us-page .guestbook-item:last-child {
    border-bottom: none !important;
}

/* =========================================
   ★ 验证码与提交按钮同行布局
   ========================================= */
.contact-us-page .captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-us-page .captcha-input {
    width: 120px !important;
    flex: 0 0 120px; 
}

.contact-us-page .captcha-img {
    width: 110px !important;
    height: 38px !important;
    object-fit: cover;
    flex-shrink: 0; 
    border-radius: 4px;
    cursor: pointer;
}

.contact-us-page .captcha-submit {
    flex: 1; 
    height: 38px;
    margin-top: 0 !important; 
    padding: 0; 
    line-height: 36px; 
}

/* =========================================
   ★ 留言面板两列三行固定布局与滚动
   ========================================= */
.contact-us-page .guestbook-scroll-wrapper {
    overflow: hidden;
    /* 高度：160px(卡片) * 3行 + 12px(间距) * 2个 = 504px */
    height: 504px; 
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
}

.contact-us-page .guestbook-module {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    transition: transform 0.6s ease;
    will-change: transform;
    padding: 0 4px; 
}

.contact-us-page .guestbook-item {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px 14px;
    border-left: 3px solid #4A90D9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    height: 160px; 
    overflow-y: auto;
    word-break: break-word;
}

.contact-us-page .guestbook-item .meta-info {
    font-size: 11px !important;
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px dashed #ddd;
}

.contact-us-page .guestbook-item .reply {
    font-size: 12px !important;
    background: #e9ecef;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 4px;
}

.contact-us-page .guestbook-item::-webkit-scrollbar {
    width: 4px;
}
.contact-us-page .guestbook-item::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.contact-us-page .guestbook-item::-webkit-scrollbar-track {
    background: transparent;
}

/* 留言数量 <= 6 时不滚动 */
.contact-us-page .guestbook-scroll-wrapper.no-scroll {
    height: auto !important;
    overflow: visible;
}
.contact-us-page .guestbook-scroll-wrapper.no-scroll .guestbook-module {
    transform: translateY(0) !important;
    transition: none !important;
}
/* =========================================
   ★ 手机端适配：标题与表单标签全部居左
   ========================================= */
@media (max-width: 768px) {
    /* 1. 页面主标题居左 */
    .contact-us-page .page-title,
    .contact-us-page .label-title,
    .contact-us-page .label-title-qr,
    .contact-us-page .text-center,
    .contact-us-page h1,
    .contact-us-page h2,
    .contact-us-page h3,
    .contact-us-page h4,
    .contact-us-page h5 {
        text-align: left !important;
    }
    
    /* 2. 表单标签（姓名、电话、邮箱、验证码）居左 */
    .contact-us-page label,
    .contact-us-page .form-label,
    .contact-us-page .col-form-label {
        text-align: left !important;
        display: block !important; /* 确保标签独占一行或者正常排布 */
        width: 100%;
    }

    /* 覆盖可能存在的 Bootstrap 靠右对齐类 */
    .contact-us-page .text-end, 
    .contact-us-page .text-right,
    .contact-us-page .text-sm-end,
    .contact-us-page .text-md-end {
        text-align: left !important;
    }
    
    /* 3. 留言列表在手机端改为单列，更易阅读 */
    .contact-us-page .guestbook-module {
        grid-template-columns: 1fr; 
    }
    
    /* 因为变成了单列，3行的高度保持不变 */
    .contact-us-page .guestbook-scroll-wrapper {
        height: 504px; 
    }
}