/* 遮罩层 */
.kfz-popover-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.kfz-popover-overlay.show {
    display: block;
}

/* Popover 容器 */
.kfz-popover-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

/* 传入 anchor 时，用 fixed 定位跟随参考元素，挂载在 body 避免被父容器裁剪 */
.kfz-popover-container.kfz-popover-container-anchor {
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
}

.kfz-popover-container.show {
    display: block;
}

/* Popover 内容（默认 260x234，可通过 show({ width, height }) 覆盖） */
.kfz-popover-content {
    width: 260px;
    height: 234px;
    border-radius: 2px;
    border: 1px solid #F0F0F0;
    box-sizing: border-box;
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.10);
    background-color: #fff;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.kfz-popover-inner {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 标题（默认左对齐，center: true 时居中） */
.kfz-popover-title {
    color: #1a1a1a;
    text-align: left;
    font-size: 14px;
    font-style: normal;
    font-weight: bold;
    line-height: 22px;
    margin-bottom: 8px;
    width: 100%;
}

.kfz-popover-center .kfz-popover-title {
    text-align: center;
}

/* 内容区域（默认左对齐，center: true 时居中，flex: 1 占据剩余空间） */
.kfz-popover-body {
    width: 100%;
    flex: 1;
    min-height: 0;
}

.kfz-popover-center .kfz-popover-body {
    align-items: center;
}

/* content 内容区域 */
.kfz-popover-slot {
    text-align: left;
    width: 100%;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 22px;
    color: #666;
    word-wrap: break-word;
    word-break: break-all;
}

/* 无 title 时 body 文字颜色 */
.kfz-popover-no-title .kfz-popover-slot {
    color: #1a1a1a;
}

.kfz-popover-center .kfz-popover-slot {
    text-align: center;
}

.kfz-popover-body-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #666666;
}

/* 箭头包装器 */
.kfz-popover-arrow-wrapper {
    margin-top: 46.40px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 35.14px;
    height: 27.16px;
}

.kfz-popover-arrow {
    width: 35.14px;
    height: 27.16px;
}

/* 收藏夹包装器 */
.kfz-popover-favorite-wrapper {
    margin-top: 0.44px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 123.24px;
    height: 128.56px;
}

.kfz-popover-favorite-box {
    width: 123.24px;
    height: 128.56px;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.kfz-popover-favorite-bg {
    margin-top: 3.06px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: 123.24px;
    height: 120px;
}

.kfz-popover-favorite-icon {
    width: 63.66px;
    height: 56px;
    margin-top: 12.50px;
    margin-left: 30.44px;
}

.kfz-popover-favorite-text {
    margin-top: 4px;
    margin-left: 26.44px;
    font-family: PingFang SC, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    white-space: nowrap;
    color: rgba(189, 117, 9, 1);
    line-height: 36px;
    font-weight: normal;
    flex-shrink: 0;
}

.kfz-popover-favorite-text span {
    font-size: inherit;
}

/* 底部按钮区域（始终在最下方，默认左对齐，center: true 时居中） */
.kfz-popover-footer {
    flex-shrink: 0;
    width: 100%;
}

.kfz-popover-footer-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
}

.kfz-popover-center .kfz-popover-footer-buttons {
    justify-content: center;
}

/* 按钮基础样式 */
.kfz-popover-ok-btn,
.kfz-popover-cancel-btn {
    height: 32px;
    border-radius: 2px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
    font-size: 14px;
    white-space: nowrap;
}

/* primary 主题 + fill 类型 */
.kfz-popover-theme-primary .kfz-popover-btn-fill {
    background-color: #b8333c;
    color: #fff;
    border: none;
}

.kfz-popover-theme-primary .kfz-popover-btn-fill:hover {
    background-color: #d34a50;
}

.kfz-popover-theme-primary .kfz-popover-btn-fill:active {
    background-color: #872027;
}

.kfz-popover-theme-primary .kfz-popover-btn-fill span {
    color: #fff;
}

/* primary 主题 + plain 类型 */
.kfz-popover-theme-primary .kfz-popover-btn-plain {
    background-color: #fff;
    border: 1px solid #bfbfbf;
    color: #595959;
}

.kfz-popover-theme-primary .kfz-popover-btn-plain:hover {
    border: 1px solid #d34a50;
    color: #d34a50;
}

.kfz-popover-theme-primary .kfz-popover-btn-plain:active {
    border: 1px solid #872027;
    color: #872027;
    background-color: rgba(184, 51, 60, 0.1);
}

.kfz-popover-theme-primary .kfz-popover-btn-plain span {
    color: inherit;
}

/* primary 主题 + outline 类型 */
.kfz-popover-theme-primary .kfz-popover-btn-outline {
    background-color: transparent;
    color: #b8333c;
    border: 1px solid #b8333c;
}

.kfz-popover-theme-primary .kfz-popover-btn-outline:hover {
    background-color: #b8333c;
    color: #fff;
}

.kfz-popover-theme-primary .kfz-popover-btn-outline span {
    color: inherit;
}

.kfz-popover-theme-primary .kfz-popover-btn-outline:hover span {
    color: #fff;
}

/* seller 主题 + fill 类型 */
.kfz-popover-theme-seller .kfz-popover-btn-fill {
    background-color: #365899;
    color: #fff;
    border: none;
}

.kfz-popover-theme-seller .kfz-popover-btn-fill:hover {
    background-color: #5677ba;
}

.kfz-popover-theme-seller .kfz-popover-btn-fill:active {
    background-color: #1f4484;
}

.kfz-popover-theme-seller .kfz-popover-btn-fill span {
    color: #fff;
}

/* seller 主题 + plain 类型 */
.kfz-popover-theme-seller .kfz-popover-btn-plain {
    background-color: #fff;
    border: 1px solid #bfbfbf;
    color: #595959;
}

.kfz-popover-theme-seller .kfz-popover-btn-plain:hover {
    border-color: #5677ba;
    color: #5677ba;
}

.kfz-popover-theme-seller .kfz-popover-btn-plain:active {
    border: 1px solid #1f4484;
    color: #1f4484;
    background-color: rgba(54, 88, 153, 0.1);
}

.kfz-popover-theme-seller .kfz-popover-btn-plain span {
    color: inherit;
}

/* seller 主题 + outline 类型 */
.kfz-popover-theme-seller .kfz-popover-btn-outline {
    background-color: transparent;
    border: 1px solid #365899;
    color: #365899;
}

.kfz-popover-theme-seller .kfz-popover-btn-outline:hover {
    background-color: #365899;
    color: #fff;
}

.kfz-popover-theme-seller .kfz-popover-btn-outline span {
    color: inherit;
}

.kfz-popover-theme-seller .kfz-popover-btn-outline:hover span {
    color: #fff;
}
