/* Core tippy CSS */
.tippy-box[data-animation=fade][data-state=hidden] {
    opacity: 0;
}

[data-tippy-root] {
    max-width: calc(100vw - 10px);
}

.tippy-box {
    position: relative;
    background-color: #333;
    color: #fff;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    white-space: normal;
    outline: 0;
    transition-property: transform, visibility, opacity;
}

.tippy-box[data-placement^=top] > .tippy-arrow {
    bottom: 0;
}

.tippy-box[data-placement^=top] > .tippy-arrow:before {
    bottom: -7px;
    left: 0;
    border-width: 8px 8px 0;
    border-top-color: initial;
    transform-origin: center top;
}

.tippy-box[data-placement^=bottom] > .tippy-arrow {
    top: 0;
}

.tippy-box[data-placement^=bottom] > .tippy-arrow:before {
    top: -7px;
    left: 0;
    border-width: 0 8px 8px;
    border-bottom-color: initial;
    transform-origin: center bottom;
}

.tippy-box[data-placement^=left] > .tippy-arrow {
    right: 0;
}

.tippy-box[data-placement^=left] > .tippy-arrow:before {
    border-width: 8px 0 8px 8px;
    border-left-color: initial;
    right: -7px;
    transform-origin: center left;
}

.tippy-box[data-placement^=right] > .tippy-arrow {
    left: 0;
}

.tippy-box[data-placement^=right] > .tippy-arrow:before {
    left: -7px;
    border-width: 8px 8px 8px 0;
    border-right-color: initial;
    transform-origin: center right;
}

.tippy-box[data-inertia][data-state=visible] {
    transition-timing-function: cubic-bezier(.54, 1.5, .38, 1.11);
}

.tippy-arrow {
    width: 16px;
    height: 16px;
    color: #333;
}

.tippy-arrow:before {
    content: "";
    position: absolute;
    border-color: transparent;
    border-style: solid;
}

.tippy-content {
    position: relative;
    padding: 5px 9px;
    z-index: 1;
}



/* Custom theme adjustments */


/* Scale animation with inertia effect */
.tippy-box[data-animation=scale-subtle][data-state=hidden] {
    transform: scale(0.8);
    opacity: 0;
}

/* Add inertia/slingshot elastic effect */
.tippy-box[data-animation=scale-subtle] {
    transition-timing-function: cubic-bezier(.25,1.5,.75,1.25);
    transition-duration: 200ms;
}

/* Custom theme adjustments */
.tippy-box[data-theme~='light-border'] {
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.05);
    color: #333;
    box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.1);
    padding: 3px;
}

.tippy-box[data-theme~='light-border'] > .tippy-backdrop {
    background-color: #fff;
}

/* Arrow base styles */
.tippy-box[data-theme~='light-border'] .tippy-arrow {
    color: #fff;
}

.tippy-box[data-theme~='light-border'] > .tippy-arrow:before,
.tippy-box[data-theme~='light-border'] > .tippy-arrow:after {
    position: absolute;
    content: '';
    border-style: solid;
    border-color: transparent;
}

/* Top placement */
.tippy-box[data-theme~='light-border'][data-placement^='top'] > .tippy-arrow:before {
    bottom: -7px;
    border-width: 7px 7px 0;
    border-top-color: rgba(0, 0, 0, 0.1);
    transform-origin: center top;
    margin: 0 -7px;
}

.tippy-box[data-theme~='light-border'][data-placement^='top'] > .tippy-arrow:after {
    bottom: -6px;
    border-width: 6px 6px 0;
    border-top-color: #fff;
    transform-origin: center top;
    margin: 0 -6px;
}

/* Bottom placement */
.tippy-box[data-theme~='light-border'][data-placement^='bottom'] > .tippy-arrow:before {
    top: -7px;
    border-width: 0 7px 7px;
    border-bottom-color: rgba(0, 0, 0, 0.1);
    transform-origin: center bottom;
    margin: 0 -7px;
}

.tippy-box[data-theme~='light-border'][data-placement^='bottom'] > .tippy-arrow:after {
    top: -6px;
    border-width: 0 6px 6px;
    border-bottom-color: #fff;
    transform-origin: center bottom;
    margin: 0 -6px;
}

/* Left placement */
.tippy-box[data-theme~='light-border'][data-placement^='left'] > .tippy-arrow:before {
    right: -7px;
    border-width: 7px 0 7px 7px;
    border-left-color: rgba(0, 0, 0, 0.1);
    transform-origin: center left;
    margin: -7px 0;
}

.tippy-box[data-theme~='light-border'][data-placement^='left'] > .tippy-arrow:after {
    right: -6px;
    border-width: 6px 0 6px 6px;
    border-left-color: #fff;
    transform-origin: center left;
    margin: -6px 0;
}

/* Right placement */
.tippy-box[data-theme~='light-border'][data-placement^='right'] > .tippy-arrow:before {
    left: -7px;
    border-width: 7px 7px 7px 0;
    border-right-color: rgba(0, 0, 0, 0.1);
    transform-origin: center right;
    margin: -7px 0;
}

.tippy-box[data-theme~='light-border'][data-placement^='right'] > .tippy-arrow:after {
    left: -6px;
    border-width: 6px 6px 6px 0;
    border-right-color: #fff;
    transform-origin: center right;
    margin: -6px 0;
}

/* Increase content padding */
.tippy-content {
    padding: 1rem;
}

/* Custom dark compact theme for merge tags */
.tippy-box[data-theme~='dark-compact'] {
    background-color: #1f2937;
    color: #ffffff;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.3;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.3);
}

.tippy-box[data-theme~='dark-compact'] .tippy-content {
    padding: 0.375rem 0.75rem;
}

.tippy-box[data-theme~='dark-compact'] .tippy-arrow {
    color: #1f2937;
}

.tippy-box[data-theme~='dark-compact'] > .tippy-arrow:before {
    border-top-color: #1f2937;
}

.tippy-box[data-theme~='dark-compact'][data-placement^='top'] > .tippy-arrow:before {
    border-top-color: #1f2937;
    border-bottom: none;
}

.tippy-box[data-theme~='dark-compact'][data-placement^='bottom'] > .tippy-arrow:before {
    border-bottom-color: #1f2937;
    border-top: none;
}

.tippy-box[data-theme~='dark-compact'][data-placement^='left'] > .tippy-arrow:before {
    border-left-color: #1f2937;
    border-right: none;
}

.tippy-box[data-theme~='dark-compact'][data-placement^='right'] > .tippy-arrow:before {
    border-right-color: #1f2937;
    border-left: none;
}