/**
 * 子比主题IP归属地增强插件 - 前台样式
 *
 * @package Zibll_DWY_IP
 * @version 1.0.0
 */

/* IP归属地显示容器 */
.zibll-dwy-ip-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.zibll-dwy-ip-location:hover {
    background: #e8e8e8;
    color: #333;
}

/* IP图标 */
.zibll-dwy-ip-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
    font-size: 10px;
}

/* 加载动画 */
.zibll-dwy-ip-loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: zibll-dwy-ip-spin 1s linear infinite;
}

@keyframes zibll-dwy-ip-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态 */
.zibll-dwy-ip-error {
    color: #e74c3c;
    font-style: italic;
}

/* 成功状态 */
.zibll-dwy-ip-success {
    color: #27ae60;
}

/* 数据源标识徽章 */
.zibll-dwy-ip-badge {
    display: inline-block;
    padding: 1px 5px;
    font-size: 10px;
    border-radius: 2px;
    background: #ecf0f1;
    color: #7f8c8d;
    margin-left: 4px;
}

/* 评论区域IP显示 */
.comment-metadata .zibll-dwy-ip-location {
    margin-left: 8px;
    vertical-align: middle;
}

/* 用户信息卡片IP显示 */
.user-card .zibll-dwy-ip-location {
    margin-top: 4px;
    justify-content: flex-start;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .zibll-dwy-ip-location {
        font-size: 11px;
        padding: 2px 6px;
    }

    .comment-metadata .zibll-dwy-ip-location {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .zibll-dwy-ip-location {
        background: rgba(255, 255, 255, 0.1);
        color: #ccc;
    }

    .zibll-dwy-ip-location:hover {
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
    }

    .zibll-dwy-ip-badge {
        background: rgba(255, 255, 255, 0.05);
        color: #999;
    }
}
