/* 河湖公示牌主样式文件 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #fafbff;
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.container {
    width: calc(100vw - 20px);
    max-width: 480px; /* 设置最大宽度为手机端宽度 */
    min-height: calc(100vh - 20px);
    margin: 10px auto; /* 居中显示 */
    /*background: #ffffff;*/
    /*border: 4px solid #d4af37;*/
    border-radius: 0;
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.1),
        inset 0 0 0 1px rgba(212, 175, 55, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.8);
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background-image: url('../images/bg.png');
    background-size: 100% 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: local;
}

.container::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    pointer-events: none;
    z-index: -1;
}





.header {
    background: transparent;
    color: rgba(0, 0, 0, 0);
    padding: 8px 15px;
    text-align: center;
    border: 2px solid transparent;
    margin: 10px 15px 25px 15px;
    position: relative;
    flex-shrink: 0;
}

/* 蓝色标题装饰 - 已设置为透明 */
.header::before,
.header::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    opacity: 0;
}

.header::before {
    left: -15px;
    border-right: 15px solid transparent;
}

.header::after {
    right: -15px;
    border-left: 15px solid transparent;
}

.notice-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    letter-spacing: 2px;
    color: transparent;
    height: 30px;
}

.time {
    font-size: 14px;
    opacity: 0.9;
}

.content {
    padding: 5px 15px;
    flex-shrink: 0; /* 不再占用所有剩余空间 */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.info-row {
    display: flex;
    margin-bottom: 8px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-left: 15px; /* 增加更大的左边距，避免与黄色边框压盖 */
    margin-right: 12px; /* 增加更大的右边距，避免与黄色边框压盖 */
}

/* 强制应用所有info-row的边距设置 */
.container .info-row {
    margin-left: 15px;
    margin-right: 12px;
}

/* 第一个info-row需要额外的上边距，避免与标题下边框重叠 */
.container .info-row:first-of-type {
    margin-top: 25px; /* 调整为更合适的上边距 */
}

/* 使用更精确的选择器 - 选择.header后面的第一个.info-row */
.container .header + .info-row {
    margin-top: 25px;
}

/* 确保在所有情况下都应用上边距 */
.container > .info-row:first-of-type {
    margin-top: 25px;
}

.info-label {
    font-weight: bold;
    color: #333;
    min-width: 95px;
    margin-right: 5px;
    font-size: 16px; /* 与乡级河长字体大小一致 */
}

.info-value {
    color: #333;
    flex: 1;
    font-weight: 500;
    font-size: 16px; /* 与乡级河长字体大小一致 */
}

/* 河长信息整体滚动容器 */
.river-chiefs-scroll-container {
    height: 200px; /* 固定高度，大约可显示7行数据 */
    overflow-y: auto;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 5px;
    margin: 5px 0;
    flex-shrink: 0; /* 防止被压缩 */
}

.river-chiefs-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.river-chiefs-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.river-chiefs-scroll-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.river-chiefs-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 河长信息表格样式 - 简化的虚线分隔格式 */
.river-chiefs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 3px 0;
    font-size: 16px;
    border: 1px solid #999;
}

.river-chiefs-table td {
    padding: 3px 3px; /* 减少内边距，从8px 12px改为4px 8px */
    vertical-align: top;
}

.river-chiefs-table .level-label {
    font-weight: bold;
    color: #333;
    width: 90px;
    min-width: 90px;
    border-right: 2px dotted #666;
    padding-right: 10px;
    white-space: nowrap;
    font-size: 16px;
}

.river-chiefs-table .chief-info {
    color: #333;
    padding-left: 10px;
    padding-bottom: 8px;
    white-space: nowrap;
}

.river-chiefs-table .chief-name {
    font-weight: bold;
    margin-right: 4px;
    font-size: 15px;
}

.river-chiefs-table .chief-position {
    color: #4A90E2; /* 修改为蓝色，类似背景图片中的蓝色 */
    font-size: 14px;
}

.chief-phone {
    display: inline-block;
    margin-left: 1px;
    padding: 1px 3px;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
}

/* 每个级别的第一行 */
.river-chiefs-table .level-start .level-label {
    border-left: 1px solid #999;
    border-top: 1px solid #999;
}

.river-chiefs-table .level-start .chief-info {
    border-top: 1px solid #999;
    border-right: 1px solid #999;
}

/* 普通河长行 */
.river-chiefs-table .chief-row .level-label {
    border-left: 1px solid #999;
}

.river-chiefs-table .chief-row .chief-info {
    border-right: 1px solid #999;
}

/* 每个级别的最后一个河长行 */
.river-chiefs-table .contact-row .level-label {
    border-left: 1px solid #999;
    border-bottom: 1px dotted #999;
}

.river-chiefs-table .contact-row .chief-info {
    border-right: 1px solid #999;
    border-bottom: 1px dotted #999;
}



/* 联系电话样式 - 简化为普通文本 */
.contact-info {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
    display: inline-block;
}

.contact-info::before {
    content: '📞 ';
    font-size: 12px;
}

/* 位置获取区域 - 简化为手机一屏显示 */
.location-section {
    background: transparent; /* 改为全透明 */
    border-radius: 0;
    padding: 13px 13px 12px 16px; /* 增加底部padding，确保与黄色边框有留白 */
    margin: 0;
    border: none;
    border-top: none;
    flex-shrink: 0; /* 防止被压缩，但不占用剩余空间 */
    display: flex;
    flex-direction: column;
    /* 移除min-height，让内容决定高度 */
}

.location-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.get-location-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.get-location-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.get-location-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.coordinates-display {
    background: #f8f9fa; /* 恢复半透明白色背景 */
    border: 1px solid #dee2e6; /* 恢复边框 */
    border-radius: 4px;
    padding: 8px;
    /*margin-top: 5px;*/
    flex-shrink: 0; /* 防止被压缩，但不占用剩余空间 */
    display: flex;
    flex-direction: column;
}

/* 地图容器样式 */
#locationMap {
    width: 100% !important;
    height: 280px !important;
    /* 减少高度，让白色背景与黄色边框之间有合适留白 */
    min-height: 180px !important;
    /* 设置最小高度确保地图可见 */
    max-height: 40vh !important;
    /* 调整最大高度限制 */
    border: 1px solid #ddd;
    border-radius: 4px;
}

.coordinates-display div {
    margin-bottom: 3px;
    font-size: 12px;
}

.error {
    background: #ffebee;
    border: 1px solid #f44336;
    color: #c62828;
    border-radius: 4px;
    padding: 8px;
    margin-top: 5px;
    font-size: 12px;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* 无数据状态样式 */
.container.no-data .info-row {
    opacity: 0.6;
}

.container.no-data .river-chiefs-scroll-container {
    opacity: 0.6;
}

.no-data-message {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    margin: 10px 15px;
}

/* 查询状态指示器 */
.query-status {
    color: #666;
    font-style: italic;
}

.query-status.loading {
    color: #2196F3;
}

.query-status.no-data {
    color: #999;
}

.query-status.error {
    color: #f44336;
}

/* 小字体样式 - 用于"至"和"段"字 */
.small-connector {
    font-size: 0.75em !important;
    font-weight: normal !important;
}

/* 移动端响应式优化 */
@media (max-width: 480px) {
    .container {
        width: calc(100vw - 10px);
        margin: 5px;
    }

    .info-row {
        margin-left: 20px !important;
        margin-right: 20px !important;
        padding: 4px 8px;
    }

    /* 移动端第一个info-row也需要上边距 */
    .container .info-row:first-of-type {
        margin-top: 20px !important; /* 移动端合适的上边距 */
    }

    .container .header + .info-row {
        margin-top: 20px !important;
    }

    .container > .info-row:first-of-type {
        margin-top: 20px !important;
    }

    #locationMap {
        height: 300px !important;
        min-height: 220px !important;
        max-height: 25vh !important;
    }
}