/* css/ui-bubble-gradient.css */

/* Segmented Control */
.bp-gradient-segment {
    display: flex;
    background: #f1f1f2;
    border-radius: 8px;
    padding: 2px;
    margin-bottom: 15px;
    width: 120px;
    margin-left: auto;
}

.bp-gradient-segment-btn {
    flex: 1;
    text-align: center;
    font-size: 13px;
    padding: 4px 0;
    color: #8e8e93;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bp-gradient-segment-btn.active {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Gradient Hero Box */
.bp-gradient-hero {
    width: 100%;
    height: 60px;
    border-radius: 14px;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 2px 8px rgba(0,0,0,0.05);
    backdrop-filter: blur(5px);
    display: none; /* hidden by default */
    position: relative;
    overflow: hidden;
}

.bp-gradient-mode .bp-gradient-hero {
    display: block;
}

.bp-gradient-mode .bp-color-swatch-lg,
.bp-gradient-mode .bp-hex-pill-sm {
    display: none; /* hide solid color ui when in gradient mode */
}

/* We still need the color inputs but we can style them differently or keep them hidden and just use presets, wait, the prompt says: "支持显示两个颜色的线性渐变... 可以将选中的两个颜色作为变量传入" 
   We can add two small color pickers inside or near the hero box. */
.bp-gradient-pickers {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
    display: none;
}
.bp-gradient-mode .bp-gradient-pickers {
    display: flex;
}

.bp-gradient-picker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}
.bp-gradient-picker input {
    position: absolute;
    top: -10px; left: -10px; width: 44px; height: 44px;
    border: none; padding: 0; margin: 0; cursor: pointer;
}

/* Preset List */
.bp-preset-list {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
    display: none;
}
.bp-gradient-mode .bp-preset-list {
    display: flex;
}

.bp-preset-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 1.5px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.bp-preset-dot:hover {
    transform: scale(1.1);
}

/* Ensure the header flexes correctly */
.bp-section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.msg-bubble {
    position: relative !important;
    overflow: visible !important;
}

.bubble-decor-img {
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    z-index: 10;
}

/* Bubble Effects — 用双类选择器提升权重 */
.bubble-effect-none { }
.msg-bubble.bubble-effect-stroke,
.msg-blue-card.bubble-effect-stroke,
.bp-pb-bubble.bubble-effect-stroke {
  border: var(--bubble-effect-intensity, 1.5px) solid var(--bubble-effect-color, rgba(0,0,0,0.15)) !important;
  box-shadow: none !important;
}
.msg-bubble.bubble-effect-glow,
.msg-blue-card.bubble-effect-glow,
.bp-pb-bubble.bubble-effect-glow {
  box-shadow: 0 0 calc(var(--bubble-effect-intensity, 1.5px) * 5) var(--bubble-effect-color, rgba(255,255,255,0.8)) !important;
  border: 1px solid transparent !important;
}
.msg-bubble.bubble-effect-frosted,
.msg-blue-card.bubble-effect-frosted,
.bp-pb-bubble.bubble-effect-frosted {
  box-shadow: inset 0 0 calc(var(--bubble-effect-intensity, 1.5px) * 10) var(--bubble-effect-color, rgba(255,255,255,0.5)),
              0 4px 15px rgba(0,0,0,0.05) !important;
  backdrop-filter: blur(calc(var(--bubble-effect-intensity, 1.5px) * 5));
  -webkit-backdrop-filter: blur(calc(var(--bubble-effect-intensity, 1.5px) * 5));
  border: 1px solid rgba(255,255,255,0.4) !important;
}
