/* Tips Link Format Styles */

/* Frontend and Editor styles for tips links */
.tips-link,
.editor-styles-wrapper .tips-link,
.block-editor-block-list__layout .tips-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    border-bottom: 1px dashed #0073aa;
    transition: all 0.2s ease;
    cursor: pointer;
}

.tips-link a,
.editor-styles-wrapper .tips-link a,
.block-editor-block-list__layout .tips-link a {
    text-decoration: none;
}

.tips-link::before,
.editor-styles-wrapper .tips-link::before,
.block-editor-block-list__layout .tips-link::before {
    content: '';
    width: 16px;
    height: 16px;
    background-color: #0073aa; /* Default blue color */
    mask: url('../img/lightbulb-off.svg') no-repeat center;
    mask-size: contain;
    -webkit-mask: url('../img/lightbulb-off.svg') no-repeat center;
    -webkit-mask-size: contain;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.tips-link:hover,
.editor-styles-wrapper .tips-link:hover,
.block-editor-block-list__layout .tips-link:hover {
    border-bottom-color: #005a87;
}

.tips-link:hover::before,
.editor-styles-wrapper .tips-link:hover::before,
.block-editor-block-list__layout .tips-link:hover::before {
    background-color: #ffd700; /* Gold color on hover */
}

.tips-link:visited {
    color: #0073aa;
}

/* CSS-only Tooltip */
[data-tooltip] {
    cursor: pointer;
    position: relative;
}

[data-tooltip]::after {
    background-color: #333;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    height: fit-content;
    width: fit-content;
    border-radius: 4px;
    position: absolute;
    text-align: center;
    top: 0px;
    left: 50%;
    content: attr(data-tooltip);
    transform: translate(-50%, -110%) scale(0);
    transform-origin: bottom;
    transition: 0.14s;
    box-shadow: 0 4px 14px 0 rgba(0,0,0,.2), 0 0 0 1px rgba(0,0,0,.05);
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

[data-tooltip]:hover::after {
    display: block;
    transform: translate(-50%, -110%) scale(1);
}

/* Editor popover styles */
.tips-link-format-popover .components-popover__content {
    padding: 16px;
    min-width: 300px;
}

.tips-link-format-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tips-link-format-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* Button styles in the editor */
.tips-link-format-popover .components-button {
    min-height: 36px;
}

/* Active state for the tips link button in toolbar */
.block-editor-rich-text__inline-format-toolbar .components-button.is-pressed {
    background-color: #0073aa;
    color: white;
} 